LangChain vs MCP
LangChain builds AI agents in code. MCP is the open standard that connects AI apps to outside tools and data.
LangChain and MCP are not rivals. LangChain is a code framework for building your own AI agent. MCP is an open standard that lets an AI app, such as Claude or ChatGPT, connect to tools and data.
If you only want Claude or ChatGPT to use an app, you need MCP and no LangChain. If you are writing your own agent in code, LangChain can call MCP servers, so you reuse tools other people built. The MCP part of LangChain is still marked beta. See what MCP is.
Good for
- Developers deciding whether to build with LangChain, MCP servers, or both
- Teams with LangChain agents that need to reach more tools
- People who saw both names and want to know which one they need
- Claude and ChatGPT users who want to connect apps without writing code
Side by side
Our advice: use MCP to connect an existing AI app to tools. Use LangChain when you are writing your own agent, and add MCP servers to it for the tools you do not want to write.
| Option | LangChain | MCP |
|---|---|---|
| What it is | Agent framework | Open standard |
| You use it to | Build your own agent in code | Connect AI apps to tools and data |
| Where it lives | Inside your program | Between an AI app and a server |
| Where tools come from | Callable functions passed to the model; MCP tools via the adapter | MCP servers |
| Works with the other | Calls MCP servers | Servers can feed LangChain agents |
| Used by | Developers building agents | Claude, ChatGPT, VS Code, Cursor |
Which to pick
Our advice: pick MCP if you want Claude, ChatGPT or Cursor to reach an app. Pick LangChain if you are building your own agent in code. Use both when your LangChain agent needs tools that already exist as MCP servers.
The limit on each side: MCP is not an agent framework, and LangChain's MCP support is in beta and may change.
Best for
- MCP: connecting Claude, ChatGPT or Cursor to Notion, GitHub or a database
- MCP: reusing one server across several AI apps
- LangChain: an agent in your own Python app that you control end to end
- LangChain: adding model, prompt and middleware choices around your tools
- Both: a LangChain agent that calls existing MCP servers
Skip it if
- MCP: you need a full agent loop in your own code, since MCP is a connection standard and LangChain's create_agent is the agent harness
- LangChain: you only want an assistant like Claude to use an app, since an MCP connection does that without code
Related plugs
6
Notion MCPOfficialHostedOAuthNotion's hosted remote MCP server at mcp.notion.com. Sign in with OAuth and an AI client can search, read, create and update the pages and databases you can access. No local install.
GitHub MCP ServerOfficialHosted or LocalOAuthGitHub's official MCP server. Lets an AI assistant read code, manage issues and pull requests, check Actions runs and security alerts. Hosted at api.githubcopilot.com/mcp or run locally with Docker or a Go binary.
34.1K GitHub stars
LinearOfficialHostedOAuthFind and manage issues, projects, and documents in your Linear workspace.
SupabaseOfficialHosted or LocalOAuthMCP server for interacting with the Supabase platform
3K GitHub stars
Playwright MCPOfficialLocalPlaywright MCP server
38.9K GitHub stars
Context7OfficialHosted or LocalAPI keyUp-to-date docs for AI agents
64K GitHub stars
Questions
Is LangChain the same as MCP?
No. LangChain is a framework for building AI agents in code. MCP is an open standard for connecting AI applications to external tools and data. They solve different problems.
Does LangChain use MCP?
Yes. LangChain agents can call tools defined on MCP servers through its MCP adapter, which turns a server's tools into LangChain tools. The adapter is in beta, so the API may change.
Do I need LangChain to use MCP?
No. Claude, ChatGPT, VS Code and Cursor support MCP directly. You add a server and use it. LangChain is only for developers writing their own agent.
Do I need MCP to use LangChain?
No. LangChain tools can be plain functions you write. MCP is an option when you want tools that other people already built as servers.
When should I use MCP instead of writing a LangChain tool?
When the tool already exists as an MCP server, or when you want several apps to share it. Write a LangChain tool when it is small, private to your program and not worth a server.
How do I connect a LangChain agent to an MCP server?
Install LangChain with its mcp extra, open the MCP adapter on the server's address, list its tools and pass them to create_agent. LangChain's MCP page has the full example.
Is LangChain open source?
Yes. The LangChain repository on GitHub is under the MIT license.
Is MCP a library I install?
No. MCP is a standard that clients and servers follow. You use it through a client such as Claude or through an SDK. See how to build an MCP server in Python.
Is MCP only for Claude?
No. The MCP docs name Claude, ChatGPT, Visual Studio Code and Cursor among the clients that support it. See MCP tools for what a server can offer a client.
Sources
Docs, issue trackers and discussions this page is built from.
Show all 6Hide
- LangChain overview · docs.langchain.com
- What is the Model Context Protocol? · modelcontextprotocol.io
- Model Context Protocol (MCP) in LangChain · docs.langchain.com
- Tools · docs.langchain.com
- Architecture overview · modelcontextprotocol.io
- langchain-ai/langchain · github.com