rag-mcp-server
Exposes an existing Anthropic documentation RAG service as tools (search_anthropic_docs, list_available_topics) for Claude Desktop via the Model Context Protocol.
README
rag-mcp-server
A lightweight MCP server that exposes an existing Anthropic documentation RAG service as tools for Claude Desktop.
What this is
This project wraps the anthropic-docs-rag API (a separately running RAG service) and makes it accessible to Claude Desktop via the Model Context Protocol (MCP). Claude Desktop can then call search_anthropic_docs or list_available_topics as native tools during a conversation — without any copy-pasting or manual API calls.
The actual intelligence (embedding, retrieval, answer generation) lives entirely in the RAG service. This server is purely a protocol adapter.
Architecture
Claude Desktop
│
│ stdio (stdin/stdout)
▼
MCP Server (src/server.py — FastMCP)
│
│ HTTP POST /ask
▼
RAG Service (localhost:8002 — anthropic-docs-rag)
│
├──▶ ChromaDB (vector store)
└──▶ Claude API (answer generation)
Transport: stdio vs. HTTP/SSE
This server uses stdio transport — Claude Desktop launches the Python process directly and communicates over stdin/stdout. It's the standard for local MCP servers: simple, no port conflicts, no auth needed.
For remote or production MCP servers (shared across multiple users or machines), you'd switch to HTTP/SSE transport, where the MCP server runs as a persistent web service and clients connect via Server-Sent Events. FastMCP supports both; only the mcp.run() call changes.
Tools
| Tool | Signature | Description |
|---|---|---|
search_anthropic_docs |
(query: str) -> str |
Sends a question to the RAG service and returns the generated answer |
list_available_topics |
() -> list[str] |
Returns the static list of topics covered in the indexed documentation |
Prerequisites
The anthropic-docs-rag service must be running on port 8002 before starting this server or using the tools in Claude Desktop. This MCP server will start successfully either way, but tool calls will fail with a connection error if the RAG service is unavailable.
Setup
source .venv/bin/activate
pip install -r requirements.txt
# Optional: override the RAG service URL
cp .env.example .env
Claude Desktop Configuration
Add this to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"anthropic-docs-rag": {
"command": "/absolute/path/to/rag-mcp-server/.venv/bin/python",
"args": ["/absolute/path/to/rag-mcp-server/src/server.py"],
"env": {
"RAG_SERVICE_URL": "http://localhost:8002"
}
}
}
}
Restart Claude Desktop — the two tools will appear automatically in the tool list.
Tests
pytest tests/ -v
3 tests, all HTTP calls to the RAG service are mocked with unittest.mock.
Note
This is a learning project for understanding MCP — how tools are defined, how Claude Desktop discovers and calls them, and how stdio transport works. It is not a standalone production system. All the interesting logic (RAG pipeline, embeddings, vector search) lives in the anthropic-docs-rag service.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.