--- id: langchain-mcp-adapters version: "0.3.2" license: MIT license_treatment: permissive maintenance: active --- # langchain-mcp-adapters — Make Anthropic Model Context Protocol (MCP) tools compatible with LangChain and LangGraph agents. License: permissive · Maintenance: active · Downloads: 8.0M/mo ## What it is and what it does This library bridges Anthropic's Model Context Protocol (MCP) and LangChain by wrapping MCP tools so they work with LangChain agents and LangGraph workflows. It provides two main entry points: a tool loader that converts a single MCP session's tools into LangChain-compatible objects, and a multi-server client that manages connections to multiple MCP servers and aggregates their tools. The library handles both stdio and HTTP transports, supports custom headers for authentication, and distinguishes between tool execution errors (which it returns as error messages to the agent) and protocol failures. Typical usage involves creating an MCP server with decorated functions, then on the client side instantiating either a direct session or a MultiServerMCPClient, loading tools from it, and passing those tools to a LangChain agent or LangGraph workflow. The library is actively maintained and requires Python 3.10 or later, with dependencies on langchain-core, mcp, and typing-extensions. Use it for: - Build LangGraph agents that call external MCP-based tools (e.g., math operations, weather lookups) as part of agentic workflows - Aggregate tools from multiple MCP servers and expose them to a single LangChain agent without managing individual connections - Add authentication headers to MCP server connections for secure tool access in production environments - Convert existing MCP tool definitions into LangChain tool objects for use with OpenAI or other LLM-based agents ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts Anthropic Model Context Protocol (MCP) tools into LangChain-compatible tools for use with LangGraph agents, and provides a client to connect to multiple MCP servers and load their tools. Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a clear integration problem between two widely-used frameworks. Use it if you have MCP tools and want to use them in LangChain or LangGraph agents. ## Install pip install langchain-mcp-adapters uv add langchain-mcp-adapters poetry add langchain-mcp-adapters ## Installing langchain-mcp-adapters Before you install: Low install friction with a pure Python wheel. Active maintenance: released 8 days ago with 3628 repository stars and ongoing commits. Requires Python 3.10 or later. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for commercial and proprietary projects. Quickstart: pip install langchain-mcp-adapters from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client from langchain_mcp_adapters.tools import load_mcp_tools server_params = StdioServerParameters(command="python", args=["/path/to/server.py"]) async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: await session.initialize() tools = await load_mcp_tools(session) Requires Python 3.10 or later; MCP server must be running or accessible at the specified path/URL. Verify before relying: - Whether the library handles all MCP transport types (stdio, http, streamable-http, sse) equally well or if some have known limitations - Performance characteristics when connecting to many MCP servers simultaneously - Compatibility guarantees with specific versions of langchain-core and mcp ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 8.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mcp tools langchain integration, model context protocol langchain, langgraph agent tools mcp, mcp server client adapter, anthropic mcp langchain bridge, mcp-integration, agent-tools, langgraph [View on SkillFed](https://skillfed.io/packages/langchain-mcp-adapters) · [View on PyPI](https://pypi.org/project/langchain-mcp-adapters/)