About langchain-mcp
langchain-mcp provides documentation and code search for LangChain, LangGraph, LangSmith, and DeepAgents developers, alongside LangGraph agent debugging. It connects to a local development server to inspect threads, runs, state, and traces, and offers failure analysis and prompt suggestions.
Key features
- 01Search documentation, tutorials, and source code
- 02List LangGraph threads and runs
- 03Inspect agent state, checkpoints, and traces
- 04Analyze why a run failed
- 05Get suggestions for improving prompts
Use cases
- 01Find implementation references for LangChain or DeepAgents
- 02Review local LangGraph threads and runs
- 03Investigate failed runs and agent issues
- 04Refine agent prompts based on debugging
MCP support
Provides documentation and code search and LangGraph debugging tools to MCP clients. Debugging tools connect to a local langgraph dev server, at localhost:2024 by default.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
10Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Max results (1-20) |
| query | string | Yes | Search query |
Details
From the project READMEFeatures
Knowledge Search
Search LangChain, LangGraph, LangSmith & DeepAgents documentation and source code instantly from Claude.
LangGraph Agent Debugging (New in v2!)
Debug your LangGraph agents like Polly - connect to your local langgraph dev server and:
- List threads, runs, and traces
- Inspect agent state and checkpoints
- Ask "Why did this fail?" and get AI-powered analysis
- Get suggestions to improve your agent's prompts
Install
npm i -g langchain-mcp
langchain-mcp login
claude mcp add langchain-mcp -- langchain-mcp
Claude Desktop config
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"langchain-mcp": {
"command": "langchain-mcp"
}
}
}
Tools
Search (requires login)
| Tool | Description |
|---|---|
search_docs | Search documentation and tutorials |
search_langchain_code | Search LangChain source code |
search_langgraph_code | Search LangGraph source code |
search_deepagents_code | Search DeepAgents source code |
Debug LangGraph Agents (free, no login)
| Tool | Description |
|---|---|
langgraph_list_threads | List threads from local server |
langgraph_get_thread | Get thread details |
langgraph_get_thread_state | Get state/checkpoint |
langgraph_list_runs | List runs for a thread |
langgraph_get_run | Get run trace details |
Debug Your Agents
# Start your LangGraph server
langgraph dev
Then ask Claude:
- "List my LangGraph threads"
- "What went wrong with thread abc123?"
- "Summarize the last run"
- "How can I improve this agent?"
Connects to localhost:2024 by default.
Pricing
| Feature | Cost |
|---|---|
| Doc/Code Search | $5 free credits (~2000 searches) |
| LangGraph Debugging | Free forever |
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.