.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/langchain-ai/langchain-mcp-adapters
home/mcp-servers/langchain-ai/langchain-mcp-adapters
langchain-ai avatar

langchain-mcp-adapters

bylangchain-ai· 1 MCP server

Installs

7.0M

Stars

3.6k

Forks

465

Category

AI Agents & MCP

View on GitHub

TL;DR

This library provides a lightweight wrapper that makes Anthropic Model Context Protocol (MCP) tools compatible with LangChain and LangGraph.

How to install langchain-mcp-adapters?

langchain-ai/langchain-mcp-adapters
$git clone https://github.com/langchain-ai/langchain-mcp-adapters

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Install & use

Install langchain-mcp-adapters by running `git clone https://github.com/langchain-ai/langchain-mcp-adapters`, then use it for the current task and follow its documentation at https://github.com/langchain-ai/langchain-mcp-adapters.

Files · 1

View on GitHub
README.md
1# LangChain MCP Adapters
2 
3This library provides a lightweight wrapper that makes [Anthropic Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) tools compatible with [LangChain](https://github.com/langchain-ai/langchain) and [LangGraph](https://github.com/langchain-ai/langgraph).
4 
5![MCP](static/img/mcp.png)
6 
7> [!note]
8> A JavaScript/TypeScript version of this library is also available at [langchainjs](https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-mcp-adapters/).
9 
10## Features
11 
12- 🛠️ Convert MCP tools into [LangChain tools](https://python.langchain.com/docs/concepts/tools/) that can be used with [LangGraph](https://github.com/langchain-ai/langgraph) agents
13- 📦 A client implementation that allows you to connect to multiple MCP servers and load tools from them
14 
15## Installation
16 
17```bash
18pip install langchain-mcp-adapters
19```
20 
21## Quickstart
22 
23Here is a simple example of using the MCP tools with a LangGraph agent.
24 
25```bash
26pip install langchain-mcp-adapters langgraph "langchain[openai]"
27 
28export OPENAI_API_KEY=<your_api_key>
29```
30 
31### Server
32 
33First, let's create an MCP server that can add and multiply numbers.
34 
35```python
36# math_server.py
37from mcp.server.fastmcp import FastMCP
38 
39mcp = FastMCP("Math")
40 
41@mcp.tool()
42def add(a: int, b: int) -> int:
43 """Add two numbers"""
44 return a + b
45 
46@mcp.tool()
47def multiply(a: int, b: int) -> int:
48 """Multiply two numbers"""
49 return a * b
50 
51if __name__ == "__main__":
52 mcp.run(transport="stdio")
53```
54 
55### Client
56 
57```python
58# Create server parameters for stdio connection
59from mcp import ClientSession, StdioServerParameters
60from mcp.client.stdio import stdio_client
61 
62from langchain_mcp_adapters.tools import load_mcp_tools
63from langchain.agents import create_agent
64 
65server_params = StdioServerParameters(
66 command="python",
67 # Make sure to update to the full absolute path to your math_server.py file
68 args=["/path/to/math_server.py"],
69)
70 
71async with stdio_client(server_params) as (read, write):
72 async with ClientSession(read, write) as session:
73 # Initialize the connection
74 await session.initialize()
75 
76 # Get tools
77 tools = await load_mcp_tools(session)
78 
79 # Create and run the agent
80 agent = create_agent("openai:gpt-4.1", tools)
81 agent_response = await agent.ainvoke({"messages": "what's (3 + 5) x 12?"})
82```
83 
84## Multiple MCP Servers
85 
86The library also allows you to connect to multiple MCP servers and load tools from them:
87 
88### Server
89 
90```python
91# math_server.py
92...
93 
94# weather_server.py
95from typing import List
96from mcp.server.fastmcp import FastMCP
97 
98mcp = FastMCP("Weather")
99 
100@mcp.tool()
101async def get_weather(location: str) -> str:
102 """Get weather for location."""
103 return "It's always sunny in New York"
104 
105if __name__ == "__main__":
106 mcp.run(transport="http")
107```
108 
109```bash
110python weather_server.py
111```
112 
113### Client
114 
115```python
116from langchain_mcp_adapters.client import MultiServerMCPClient
117from langchain.agents import create_agent
118 
119client = MultiServerMCPClient(
120 {
121 "math": {
122 "command": "python",
123 # Make sure to update to the full absolute path to your math_server.py file
124 "args": ["/path/to/math_server.py"],
125 "transport": "stdio",
126 },
127 "weather": {
128 # Make sure you start your weather server on port 8000
129 "url": "http://localhost:8000/mcp",
130 "transport": "http",
131 }
132 }
133)
134tools = await client.get_tools()
135agent = create_agent("openai:gpt-4.1", tools)
136math_response = await agent.ainvoke({"messages": "what's (3 + 5) x 12?"})
137weather_response = await agent.ainvoke({"messages": "what is the weather in nyc?"})
138```
139 
140> [!note]
141> Example above will start a new MCP `ClientSession` for each tool invocation. If you would like to explicitly start a session for a given server, you can do:
142>
143> ```python
144> from langchain_mcp_adapters.tools import load_mcp_tools
145>
146> client = MultiServerMCPClient({...})
147> asy

Preview

langchain-ai/langchain-mcp-adapterslangchain-ai/langchain-mcp-adapters

# LangChain MCP Adapters

This library provides a lightweight wrapper that makes [Anthropic Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) tools compatible w

![MCP](static/img/mcp.png)

> [!note]

Repolangchain-ai/langchain-mcp-adapters
TypeMCP Servers
CategoryAI Agents & MCP
UpdatedJul 2026
LicenseMIT
First seenJul 27, 2026

Tags

MCPlangchainlanggraph

Related

6 picks
Type
  1. openclaw avatarmcporterTypeScript runtime and CLI for connecting to configured Model Context Protocol servers.MCP ServersJul 20262.5M4.8k
  2. sparfenyuk avatarmcp-proxyA MCP server which proxies requests to a remote MCP server over streamable HTTP or SSE.MCP ServersJul 20262.2M2.7k
  3. sooperset avatarmcp-atlassianThe Model Context Protocol (MCP) Atlassian integration is an open-source implementation that bridges Atlassian products (Jira and Confluence) with AI language models following Anthropic's MCP specification.MCP ServersJul 20261.7M5.6k
  4. open-webui avataropen-webuiOpen WebUIMCP ServersJul 20261.4M147k
  5. dyoshikawa avatarrulesyncUnified AI rules management CLI tool that generates configuration files for various AI development toolsMCP ServersJul 2026889k1.3k
  6. czlonkowski avatarn8n-mcpIntegration between n8n workflow automation and Model Context Protocol (MCP)MCP ServersJul 2026495k22k