langchain-mcp
@rectalogic
langchain-mcp について
Model Context Protocol tool support for LangChain
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"langchain-mcp": {
"command": "uv",
"args": [
"run",
"tests/demo.py",
"Read and summarize the file ./LICENSE"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is langchain-mcp?
langchain-mcp provides Model Context Protocol (MCP) tool calling support within LangChain. It enables LangChain applications to use tools exposed by any MCP server by wrapping them as LangChain BaseTool instances. This is for developers building LangChain-based agents or chains that need to call external tools via the MCP standard.
How to use langchain-mcp?
Create a langchain_mcp.MCPToolkit by passing it an mcp.ClientSession, then call await toolkit.initialize() followed by toolkit.get_tools() to retrieve a list of LangChain BaseTools. The toolkit handles the MCP client‑server lifecycle and tool discovery.
Key features of langchain-mcp
- Integrates MCP tool calling into LangChain workflows
- Exposes an async
MCPToolkitclass for session management - Automatically converts MCP tools into
BaseToolobjects - Works with any MCP server that communicates over a
ClientSession
Use cases of langchain-mcp
- Adding filesystem, database, or API tools from MCP servers to a LangChain agent
- Combining MCP tools with LangChain’s chat models and chains in a unified pipeline
FAQ from langchain-mcp
Is this the official LangChain MCP integration?
No. LangChain now has a more official implementation called langchain-mcp-adapters. This repository is a community alternative.
What does langchain-mcp require?
It requires Python and can be installed via PyPI as langchain-mcp. The demo also uses the uv tool for running.
How do I run the included demo?
Set the GROQ_API_KEY environment variable and execute uv run tests/demo.py "Read and summarize the file ./LICENSE" (or equivalent) against an MCP filesystem server.
Does langchain-mcp support authentication or transport customization?
—
「AI とエージェント」の他のコンテンツ
MCP-LLM Bridge
patruffBridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools
🛡️ A.I.G(AI-Infra-Guard)
TencentA full-stack AI Red Teaming platform securing AI ecosystems via OpenClaw Security Scan, Agent Scan, Skills Scan, MCP scan, AI Infra scan and LLM jailbreak evaluation.
Mcp Agent
lastmile-aiBuild effective agents using Model Context Protocol and simple workflow patterns
Perplexity MCP Server
DaInfernalCoderA Model Context Protocol (MCP) server for research and documentation assistance using Perplexity AI. Won 1st @ Cline Hackathon
Web Agent Protocol
OTA-Tech-AI🌐Web Agent Protocol (WAP) - Record and replay user interactions in the browser with MCP support
コメント