Langchain MCP server

Developer tools

Model Context Protocol tool support for LangChain.

Your AI app calls the Langchain MCP server, which does the developer tools work and sends the result back to the chat.

About Langchain

Langchain is a community MCP server from rectalogic, filed in our directory under developer tools. Model Context Protocol tool support for LangChain.

At a glance

Publisher
rectalogic (community)
Runs
See the README for setup
Written in
Python
License
MIT
GitHub stars
203

How to set up Langchain

  1. Follow the install steps in the Langchain README; it is written in Python, so have that toolchain ready.
  2. Check the Langchain README for keys or settings; the registry lists none that Langchain requires.
  3. Add Langchain to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Langchain tools to confirm the connection.
  5. Run one read-only task with Langchain first, and keep your app asking before each tool call until the results look right.

Langchain compared with similar servers

  • Sanity by sanity-io has fewer GitHub stars than Langchain (203 against 203); Sanity is official while Langchain is a community server, and Sanity runs as a remote server and Langchain runs on your own machine.
  • Dotnet Samples by microsoft has fewer GitHub stars than Langchain (203 against 203); Dotnet Samples is official while Langchain is a community server, and both run locally.
  • Sap Data by w1ccc has fewer GitHub stars than Langchain (203 against 203); both are community servers, and both run locally.

Before you connect Langchain

  • Give Langchain its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Langchain tool call until you trust what it does with them.
  • Treat text that Langchain fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Langchain on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Langchain

How marketing and sales teams put Langchain to work, by company size. Pick the size closest to yours and start Langchain on one use case.

Small business

  • A small business with a developer can use Langchain to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Langchain to explain and fix a marketing site issue without context switching between tools.
  • Langchain runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Langchain to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Langchain to keep scripts and automations documented and versioned as they change.
  • Start Langchain on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Langchain with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Langchain so web and marketing engineering share one reviewed way of working with AI.
  • Langchain is a community server, so have security review the code and pin a version before Langchain touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Langchain README

From rectalogic/langchain-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

langchain-mcp

Note: langchain now has a more official implementation langchain-mcp-adapters

Model Context Protocol tool calling support in LangChain.

Create a langchain_mcp.MCPToolkit with an mcp.ClientSession, then await toolkit.initialize() and toolkit.get_tools() to get the list of langchain_core.tools.BaseTools.

Example:

https://github.com/rectalogic/langchain-mcp/blob/8fa8445a24755bf91789f52718c32361ed916f46/tests/demo.py#L34-L43

Demo

You can run the demo against Groq llama-3.1-8b-instant:

$ export GROQ_API_KEY=xxx
$ uv run tests/demo.py "Read and summarize the file ./LICENSE"
Secure MCP Filesystem Server running on stdio
Allowed directories: [ '/users/aw/projects/rectalogic/langchain-mcp' ]
The file ./LICENSE is a MIT License agreement. It states that the software is provided "as is" without warranty and that the authors and copyright holders are not liable for any claims, damages, or other liability arising from the software or its use.

Questions about Langchain

What is the Langchain MCP server?

Model Context Protocol tool support for LangChain. Langchain is maintained by rectalogic on GitHub at rectalogic/langchain-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Langchain MCP server?

Langchain doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (rectalogic/langchain-mcp). Like most servers, Langchain ends with a command or URL you paste into your AI app's MCP config.

Does Langchain need an API key?

The registry lists no required keys for Langchain. Check the Langchain README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Langchain an official MCP server?

No. Langchain is a community server maintained by rectalogic. Community servers can be excellent; read the code and the open issues before you give Langchain access to company data.

What license is Langchain under?

Langchain is released under the MIT license, according to its GitHub repository. The license covers the code of Langchain; the service it connects to has its own terms.