api-docs-mcp
Index and semantically search Rust crate documentation hosted on docs.rs (e.g., tokio) for API references and code examples.
Index and semantically search Kotlin language documentation (e.g., from kotlinlang.org) for coroutines, standard functions, and more.
Index and semantically search NumPy reference documentation (e.g., from numpy.org) for array and numerical operations.
Index and semantically search Python standard library documentation (e.g., from docs.python.org) for accurate API lookups.
Index and semantically search Rust standard library documentation (e.g., from doc.rust-lang.org) for precise API references.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@api-docs-mcpsearch Python docs for how to read a file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
api-docs-mcp
An MCP (Model Context Protocol) server that gives AI coding assistants access to up-to-date API documentation via Retrieval-Augmented Generation (RAG). Crawl any documentation site, index it into a vector store, and query it semantically — so your LLM always has accurate, current docs at its fingertips.
Problem
LLMs have stale or incomplete knowledge of specific APIs and libraries. This project solves that by letting you:
Crawl any documentation website
Index the content into a local vector database
Query it semantically through an MCP server
AI assistants (like GitHub Copilot, Claude Desktop, Cursor, etc.) can then retrieve precise, current API documentation on demand.
Related MCP server: Documentation Retrieval MCP Server (DOCRET)
How It Works
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Crawling │ ──▶│ Chunking │ ──▶│ Embedding │ ──▶│ Storage │
│ (crawl4ai) │ │ (headings + │ │ (sentence- │ │ (ChromaDB) │
│ │ │ paragraphs) │ │ transformers)│ │ │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
▲
┌──────────────┐ ┌──────────────┐ │
│ MCP Client │ ──▶│ Retrieval │ ──▶ Similarity Search ─────┘
│ (Copilot, │ │ Engine │
│ Claude, │ │ │
│ Cursor…) │ └──────────────┘
└──────────────┘Pipeline Stages
Crawling — Uses
crawl4ai(headless browser) to recursively crawl a documentation site from a root URL, following links within the same domain/path prefix. Extracts clean markdown from each page.Chunking — Splits markdown on
h1/h2/h3headings to preserve logical structure. Builds breadcrumb heading paths (e.g.,std > HashMap > insert). Sub-splits oversized sections at paragraph boundaries with overlap. Tags chunks withhas_code=trueif they contain fenced code blocks.Embedding & Storage — Embeds chunks using
all-MiniLM-L6-v2(384-dim vectors viasentence-transformers), then upserts them into ChromaDB collections (one collection per programming language).Retrieval — Embeds the user's query, performs filtered similarity search in ChromaDB, and returns formatted results with source URLs and context.
Incremental Updates
Re-running an ingestion for the same library is efficient:
Pages are hashed (MD5) and compared against stored hashes
Unchanged pages are skipped entirely
Pages removed from the site have their chunks automatically deleted
Installation
Prerequisites
Python 3.10+
uvpackage manager
Setup
git clone https://github.com/akshaysadanand/api-docs-mcp.git
cd api-docs-mcp
uv syncUsage
CLI
The project ships with a api-docs-mcp command-line tool for managing documentation indexes.
Index a Documentation Site
# Index Rust standard library docs
uv run api-docs-mcp add "https://doc.rust-lang.org/std/" --language rust --library std
# Index Python docs with custom limits
uv run api-docs-mcp add "https://docs.python.org/3/library/" \
--language python --library stdlib --max-pages 100 --max-depth 2
# Index with a specific version
uv run api-docs-mcp add "https://numpy.org/doc/stable/reference/" \
--language python --library numpy --version 1.26Search Indexed Documentation
# Search across all indexed docs for a language
uv run api-docs-mcp search "how to parse JSON" --language python
# Search within a specific library
uv run api-docs-mcp search "HashMap insert or update" --language rust --library std
# Get more results (default: 5)
uv run api-docs-mcp search "async await coroutine" --language kotlin -k 10List Indexed Sources
# List all indexed sources
uv run api-docs-mcp list
# Filter by language
uv run api-docs-mcp list --language rustRemove Indexed Documentation
uv run api-docs-mcp remove --language rust --library tokioCLI Reference
Command | Description | Key Arguments |
| Crawl and index a documentation URL |
|
| Search indexed docs semantically |
|
| List all indexed sources |
|
| Remove indexed docs for a library |
|
MCP Server
Configure the MCP server in your AI assistant's settings to enable documentation search from within your editor.
VS Code (GitHub Copilot)
Add to your .vscode/mcp.json or user MCP settings:
{
"inputs": [],
"servers": {
"api-docs-mcp": {
"command": "bash",
"args": ["<path-to-project>/start.sh"]
}
}
}Or start the server directly:
uv run api-docs-mcp serveClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"api-docs-mcp": {
"command": "uv",
"args": ["run", "api-docs-mcp", "serve"],
"cwd": "<path-to-project>"
}
}
}Available MCP Tools
Tool | Description | Parameters |
| Semantic search across indexed docs |
|
| Crawl and index a new doc site |
|
| List all indexed sources with statistics |
|
| Search specifically for code snippets |
|
| Exact-match symbol lookup (e.g., |
|
Storage
Database: ChromaDB (persistent, disk-based)
Default location:
~/.local/share/api-docs-mcp/(followsXDG_DATA_HOME)Structure: One ChromaDB collection per programming language
Chunk metadata:
library,version,source_url,page_hash,heading_path,has_code,chunk_indexEmbeddings: 384-dimensional normalized vectors from
all-MiniLM-L6-v2(~80MB model)
Configuration
Option | Default | Description |
| 200 | Maximum pages to crawl per run |
| 3 | Maximum link depth from start URL |
|
| Documentation version string |
| 5 | Number of search results (max: 20) |
Embedding batch size | 32 | Chunks processed per embedding batch |
Upsert batch size | 5000 | Chunks upserted to ChromaDB per batch |
Project Structure
api-docs-mcp/
├── pyproject.toml # Project metadata & dependencies
├── start.sh # MCP server startup script
├── api_docs_mcp/
│ ├── cli.py # Click-based CLI commands
│ ├── server.py # MCP server (stdio transport)
│ ├── embeddings/
│ │ └── model.py # Sentence-transformer embedding model
│ ├── ingestion/
│ │ ├── crawler.py # Headless browser web crawler
│ │ ├── chunker.py # Markdown-aware document chunking
│ │ └── processor.py # Orchestration & incremental updates
│ ├── retrieval/
│ │ └── engine.py # Semantic search engine
│ └── storage/
│ └── vector_store.py # ChromaDB vector store wrapper
├── tests/
│ ├── test_vector_store.py
│ └── test_get_metadata.py
└── docs/
└── implementation_plan.mdDependencies
Package | Purpose |
MCP server framework (stdio transport) | |
CLI framework | |
Vector database for persistent storage | |
Text embedding model ( | |
Headless browser web crawler with markdown extraction |
Examples
Indexing Multiple Libraries
# Rust ecosystem
uv run api-docs-mcp add "https://doc.rust-lang.org/std/" -l rust -L std
uv run api-docs-mcp add "https://docs.rs/tokio/latest/tokio/" -l rust -L tokio
# Python ecosystem
uv run api-docs-mcp add "https://docs.python.org/3/library/" -l python -L stdlib --max-pages 150
uv run api-docs-mcp add "https://numpy.org/doc/stable/reference/" -l python -L numpy
# Kotlin
uv run api-docs-mcp add "https://kotlinlang.org/docs/home.html" -l kotlin -L standard --max-pages 200Typical Workflow
Index the documentation you work with most frequently
Configure the MCP server in your editor
Ask your AI assistant questions like:
"How do I use
HashMap::entryin Rust?""Show me examples of pandas DataFrame filtering"
"What's the Kotlin coroutine flow API?"
License
This project is open-sourced under the MIT License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/akshaysadanand/api-docs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server