fastapi-docs-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DOCS_MCP_CACHE | No | Where embeddings are cached (default `~/.cache/fastapi-docs-mcp/`). The docs are embedded once (< $0.01). | ~/.cache/fastapi-docs-mcp/ |
| OPENAI_API_KEY | No | If set and the `dense` extra is installed, search uses `text-embedding-3-small`; otherwise it falls back to BM25 instead of failing. | |
| DOCS_MCP_RETRIEVER | No | Force `bm25` or `dense`. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Search the official FastAPI documentation (snapshot, English). Use search_docs first with a natural-language question; cite the returned urls in your answer. Use get_page when a search result is relevant but you need the whole page. If nothing relevant comes back, say the docs don't cover it instead of guessing.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_docsA | Find the most relevant passages in the FastAPI documentation for a question. |
| get_pageA | Return the full text of one documentation page. |
| list_pagesA | List documentation pages, optionally only those under a section. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 3 tools
The three tools cover clearly distinct retrieval modes: search returns snippets, get_page returns full page text, and list_pages enumerates the corpus. An agent can unambiguously pick among discovery, enumeration, and full read.
All three follow a consistent verb_noun snake_case pattern (search_docs, get_page, list_pages). No stylistic deviations.
Three tools is on the thin side, but for a read-only documentation lookup server each tool earns its place and covers a distinct retrieval strategy. Nothing feels redundant or padding.
Search, list, and full-page fetch cover the core documentation retrieval lifecycle with no dead ends. Minor gaps like section metadata or version/target-version awareness are missing but not blocking.