Model Context Protocol tool support for LangChain
langchain-mcp
Model Context Protocol tool calling support in LangChain.
Create a langchain_mcp.MCPToolkit
with an mcp.ClientSession
,
then await toolkit.initialize()
and toolkit.get_tools()
to get the list of langchain_core.tools.BaseTool
s.
Example:
Demo
You can run the demo against Groq llama-3.1-8b-instant
:
$ export GROQ_API_KEY=xxx
$ uv run tests/demo.py "Read and summarize the file ./LICENSE"
Secure MCP Filesystem Server running on stdio
Allowed directories: [ '/users/aw/projects/rectalogic/langchain-mcp' ]
The file ./LICENSE is a MIT License agreement. It states that the software is provided "as is" without warranty and that the authors and copyright holders are not liable for any claims, damages, or other liability arising from the software or its use.
前提条件
- •サーバーのドメインに精通している
- •関連技術の基本的な理解
- •Developer Toolsの知識
おすすめのサーバー
詳細
もっと見る
Redis Mcp Server
A Redis Model Context Protocol (MCP) server implementation for interacting with Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Gmail Mcp Server
A Model Context Protocol (MCP) server for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.
Mcp Server Redis
MCP server to interact with Redis Server, AWS Memory DB, etc for caching or other use-cases where in-memory and key-value based storage is appropriate
Lightdash Mcp Server
A MCP(Model Context Protocol) server that accesses to Lightdash