Authentication and authorization are not currently part of the core MCP specification, but we are considering ways to introduce them in future. Join us in GitHub Discussions to help shape the future of the protocol!
Clients and servers MAY negotiate their own custom authentication and authorization strategies.
Claude Desktopでのシステム構成を図にすると、以下になります。
Claude DesktopはMCPクライアントとして位置し、必要なMCPサーバーを自ら起動して、stdioタイプのトランスポートで接続します。
そして、起動したMCPサーバーのプロセスからデスクトップのファイルにアクセスしています。
Azure AI Foundryで作成したエンドポイントもlangchain_azure_aiに含まれるAzureAIChatCompletionsModelを使えば呼び出せるような記事はありました。ただし、現時点(2024/12/12)ではlangchain_azure_aiはままだ非公開のようです。
🚀 create_final_nodes
level title type description ... graph_embedding top_level_node_id x y
0 0 "おじいさん" "PERSON" おじいさん (Grandfather) is an elderly character wh... ... None b45241d70f0e43fca764df95b2b81f77 0 0
1 0 "おばあさん" "PERSON" おばあさん is an elderly woman who plays a signific... ... None 4119fd06010c494caa07f439b333f4c5 0 0
2 0 "川" "GEO" "川 (river) is a geographical feature where おばあ... ... None d3835bf3dda84ead99deadbeac5d0d7d 0 0
3 0 "桃" "EVENT" "\u6843" (peach) is a significant element in t... ... None 077d2820ae1845bcbb1803379a3d1eae 0 0
classCustomStuffDocumentsChain(StuffDocumentsChain):
def_get_inputs(self, docs: List[Document], **kwargs: Any) -> dict:
"""Construct inputs from kwargs and docs."""# Format each document according to the prompt
doc_strings = [format_document(doc, self.document_prompt) for doc in docs ifnot"type"in doc.metadata or doc.metadata["type"] == "text"]
# Join the documents together to put them in the prompt.
inputs = {
k: v
for k, v in kwargs.items()
if k in self.llm_chain.prompt.input_variables
}
inputs[self.document_variable_name] = self.document_separator.join(doc_strings)
# images
image_docs = list(filter(lambda doc: "type"in doc.metadata and doc.metadata["type"] in ["summary_image", "image"], docs))
if (hasattr(self.llm_chain.llm, "model_name") \and self.llm_chain.llm.model_name in ["gpt-4-vision-preview", "gpt-4o"] \andlen(image_docs) > 0:
images = []
for doc in image_docs:
if doc.metadata["type"] == "summary_image":
metadata = {
"file_id": doc.metadata["file_id"],
"source": doc.metadata["source"],
"type": doc.metadata["type"],
"summary": doc.page_content,
}
images.append(Document(page_content=doc.metadata["original"], metadata=metadata))
elif doc.metadata["type"] == "image":
images.append(doc)
inputs["images"] = images
ifnot"images"in self.llm_chain.prompt.input_variables:
self.llm_chain.prompt.input_variables.append("images")
return inputs