npm langchain-mcpstdioupdated 1mo ago
---|-------------|------------| | searchdocs | Search documentation, references, and tutorials | query, limit (default: 5) | | searchlangchaincode | Search LangChain source code | query, language (py/js), limit | | searchlanggraphcode | Search LangGraph source code | query, language (py/js), limit | | searchdeepagentscode | Search DeepAgents source code | query, language (py/js), limit |
What can you do with langchain mcp?
LangChain MCP
Give your AI assistant complete knowledge of LangChain, LangGraph & LangSmith
Website ⢠Installation ⢠Features ⢠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
Install
Add langchain mcp to your client. Pick the one you use.
claude mcp add langchain-mcp -- npx -y langchain-mcpcodex mcp add langchain-mcp -- npx -y langchain-mcpamp mcp add langchain-mcp -- npx -y langchain-mcp{
"mcpServers": {
"langchain-mcp": {
"command": "npx",
"args": [
"-y",
"langchain-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"langchain-mcp": {
"command": "npx",
"args": [
"-y",
"langchain-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"langchain-mcp","command":"npx","args":["-y","langchain-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"langchain-mcp": {
"command": "npx",
"args": [
"-y",
"langchain-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"langchain-mcp": {
"command": "npx",
"args": [
"-y",
"langchain-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"langchain-mcp": {
"command": "npx",
"args": [
"-y",
"langchain-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"langchain-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"langchain-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"langchain-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"langchain-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y langchain-mcpRun `goose configure`, choose **Add Extension ā Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance16/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 44 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint ā no local install
Version history
| Versions | Published |
|---|---|
| 2.0.0Latest | Jan 8, 2026 |
| 1.2.8 | Jan 3, 2026 |