langchain-mcp
LangChain/LangGraph/DeepAgents knowledge + LangGraph agent debugging (Polly-like)
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"langchain-mcp": {
"args": [
"langchain-mcp@2.0.0"
],
"command": "npx"
}
}
}
可用工具 (5 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
tavily_search 14 个参数 需填 1 项
Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.
必填参数:query
tavily_extract 6 个参数 需填 1 项
Extract content from URLs. Returns raw page content in markdown or text format.
必填参数:urls
tavily_crawl 11 个参数 需填 1 项
Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.
必填参数:url
tavily_map 8 个参数 需填 1 项
Map a website's structure. Returns a list of URLs found starting from the base URL.
必填参数:url
tavily_research 2 个参数 需填 1 项
Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources to answer a question or complete a task. Returns a detailed response based on the research findings.
必填参数:input
服务介绍
LangChain MCP
# # Give your AI assistant complete knowledge of LangChain, LangGraph & LangSmith

Website • [Installation](# installation) • [Features](# features) • [Documentation](# documentation)
# Overview
LangChain MCP is a Model Context Protocol (MCP) server that provides semantic search across the entire LangChain ecosystem. Build AI applications faster with instant access to documentation and source code for LangChain, LangGraph, LangSmith, and DeepAgents.
# Features
- Semantic Search - Natural language queries across all LangChain ecosystem docs
- Source Code Search - Find code examples in Python and JavaScript repositories
- MCP Protocol - Works seamlessly with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client
- Production Ready - Scalable API with authentication and usage tracking
- Fast & Accurate - Powered by ChromaDB and OpenRouter embeddings
# Installation
# # Quick Start (Recommended)
# Install globally
npm install -g langchain-mcp
# Login with Google
langchain-mcp login
# Add to Claude Code
claude mcp add langchain-mcp - - npx langchain-mcp
# # Manual Configuration
Add the following configuration to your client's config file:
Claude Desktop
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Cursor
- macOS/Linux:
~/.cursor/mcp.json - Windows:
%USERPROFILE%\.cursor\mcp.json
{
"mcpServers": {
"langchain-mcp": {
"command": "npx",
"args": ["langchain-mcp"]
}
}
}
# Usage
# # CLI Commands
langchain-mcp login # Login via Google OAuth
langchain-mcp status # Check usage and remaining credits
langchain-mcp logout # Logout and clear credentials
# # Available MCP Tools
| Tool | Description | Parameters |
|- -- -- -|- -- -- -- -- -- --|- -- -- -- -- -- -|
| search_docs | Search documentation, references, and tutorials | query, limit (default: 5) |
| search_langchain_code | Search LangChain source code | query, language (py/js), limit |
| search_langgraph_code | Search LangGraph source code | query, language (py/js), limit |
| search_deepagents_code | Search DeepAgents source code | query, language (py/js), limit |
# Pricing
- Free tier available for new users
- Donation bonus for supporters
# Documentation
# # Self-deploy
# # # Project Structure
langchain-MCP/
├── packages/
│ ├── ingest/ # Python - Data ingestion (uv)
│ ├── api/ # TypeScript - API server (Express)
│ ├── mcp-server/ # TypeScript - MCP client (npm package)
│ └── mcp-server-local/ # TypeScript - Local MCP server (dev)
├── config/
│ └── settings.json # Shared configuration
└── deploy.sh # Deployment script
# # # Architecture
# # # Setup Development Environment
1. Ingest Documentation & Source Code
cd packages/ingest
uv sync
uv run ingest - -list # List available repositories
uv run ingest docs # Ingest documentation only
uv run ingest # Ingest all (docs + code)
2. Run API Server
cd packages/api
npm install
npm run dev # Development server on port 3000
3. Test Local MCP Server
cd packages/mcp-server-local
npm install
npm run dev
# # # Configuration
All settings in config/settings.json:
{
"embedding": {
"provider": "openrouter",
"model": "qwen/qwen3-embedding-8b"
},
"chromadb": {
"path": "./data/chroma"
},
"chunking": {
"docs": { "chunk_size": 2000, "chunk_overlap": 200 },
"code": { "chunk_size": 4000, "chunk_overlap": 200 }
},
"repos": [
{
"name": "langchain",
"url": "https://github.com/langchain-ai/langchain",
"type": "code",
"languages": ["python", "javascript"]
}
]
}
# # # Supported Embedding Providers
sentence-transformer(local)openaicoheregoogleollamaopenrouter(default)
See ChromaDB Integrations for more options.
# Deployment
The project includes automated deployment scripts for VPS hosting:
# Manual deployment
./deploy.sh
# GitHub Actions (production branch)
git push origin main:production
Deployment includes:
- Code synchronization via rsync
- Automatic npm installation and build
- PM2 process management
- Nginx static file serving
- Environment variable management
# Roadmap
- Semantic search across docs and code
- Google OAuth authentication
- Usage tracking and credits system
- MCP registry registration
- Claude Code, Desktop, and Cursor support
- Rate limiting (per user / per IP)
- Additional embedding model options
- Local mode (no API key required)
- Browser extension for quick searches
- VSCode extension integration
# Contributing
Forking and contributions are welcome!
# Support
- Website: langchain-mcp.xyz
- Issues: GitHub Issues
- Donate: Support development at Ko-fi
# License
MIT License - see the LICENSE file for details.
Built with ❤️ by baixianger