MerchantryTidbits

agent-tooling / library

LangChain MCP Adapters

Capability: LangChain MCP Adapters

Use it when

  • You have tools exposed by one or more MCP servers and want a LangGraph or LangChain agent to call them without hand-writing a wrapper per tool
  • You need a single client that connects to multiple MCP servers over stdio and streamable HTTP, with auth headers and tool execution errors surfaced back to the model instead of crashing the run

What it solves

Not the fit when

  • writing new MCP servers
  • agent frameworks other than LangChain/LangGraph
  • JavaScript projects (use the langchainjs port instead)
  • authoring new MCP servers
  • JavaScript MCP adapters
  • non-LangChain agent frameworks

Install

pip install langchain-mcp-adapters

Invoke

from langchain.agents import create_agent; from langchain_mcp_adapters.client import MultiServerMCPClient; client = MultiServerMCPClient({"math": {"command": "python", "args": ["/path/to/math_server.py"], "transport": "stdio"}}); tools = await client.get_tools(); agent = create_agent("openai:gpt-4.1", tools)

Alternatives

No reviewed alternatives recorded yet.