Docs MCP Server
Enables LLM hosts to retrieve live, relevant documentation excerpts from official library docs sites via a search-and-RAG tool, avoiding reliance on training data.
README
Docs MCP Server
An MCP (Model Context Protocol) server that gives an LLM host (Claude Desktop, an IDE, etc.) a tool for pulling live documentation, instead of relying on the model's training data. Searches are scoped to a library's official docs site, fetched pages are chunked and embedded into a local vector store, and the tool returns only the most relevant excerpts — not raw scraped HTML — for the query.

How it works
LLM host (e.g. Claude Desktop)
│ calls get_docs(query, library) over MCP (stdio)
▼
main.py
│ 1. site-scoped Google search via Serper API
│ 2. fetches matching pages concurrently (httpx + asyncio.gather)
│ 3. strips HTML → plain text (BeautifulSoup)
▼
rag.py
│ 4. chunks each page (langchain-text-splitters)
│ 5. embeds + upserts chunks into a local Chroma collection,
│ scoped by library, keyed by URL (idempotent — re-fetching
│ a page doesn't duplicate it)
│ 6. queries the collection for the top-k chunks most relevant
│ to the original query
▼
Returns the top-k excerpts (with source URLs) back to the LLM host
Embeddings run locally via Chroma's bundled model — no external embedding API key required.
Project structure
| File | Responsibility |
|---|---|
main.py |
MCP server entry point; defines the get_docs tool; search + fetch logic |
rag.py |
Chunking, embedding, and retrieval against a local Chroma vector store |
web.py |
Minimal FastAPI dashboard for exercising get_docs from a browser (no MCP host needed) |
tests/ |
pytest suite; all HTTP calls mocked via respx, vector store tests use an in-memory Chroma client |
.github/workflows/ci.yml |
Lint (ruff) + test on every push/PR |
Requirements
Setup
uv sync --all-groups
cp .env.example .env # then add your SERPER_API_KEY
Running the MCP server
uv run main.py
This starts the server over stdio — it's meant to be launched by an MCP host, not run standalone for interactive use (see below).
Running the web dashboard
To try the tool from a browser instead of an MCP host:
uv run uvicorn web:app --reload
Then open http://127.0.0.1:8000.
Connecting to Claude Desktop
Edit your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"docs": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/THIS/PROJECT",
"run",
"main.py"
]
}
}
}
Restart Claude Desktop, then ask something like "how do I use Chroma DB
with LangChain?" — Claude will call get_docs and answer from the live
docs instead of its training data.
Supported libraries
Currently langchain, llama-index, and openai — see DOCS_URLS in
main.py. Add your own by adding an entry mapping a library
name to its docs site.
Testing
uv run pytest -v
uv run ruff check .
License
MIT — see LICENSE.
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.