FastAPI Docs Server
БесплатноНе проверенProvides AI assistants with real-time access to FastAPI documentation, enabling search, browsing, code examples, and comparisons.
Описание
Provides AI assistants with real-time access to FastAPI documentation, enabling search, browsing, code examples, and comparisons.
README
🐍 FastAPI Docs MCP Server 🤖
Real-time FastAPI documentation access for AI assistants
An MCP (Model Context Protocol) server that provides real-time access to FastAPI documentation. Use it with Claude, GitHub Copilot, or any MCP-compatible client to instantly query FastAPI docs.
Features
- Real-time documentation — Fetches directly from fastapi.tiangolo.com
- Smart search — Find docs by keyword with common alias support
- Full sitemap access — Browse all available documentation pages
- Code examples — Get just the code, no prose
- Compare approaches — Side-by-side comparisons of different patterns
Tools
| Tool | Description |
|---|---|
get_fastapi_docs(path) |
Fetch any documentation page by path |
search_fastapi_docs(query) |
Search docs by keyword (with alias support) |
list_fastapi_pages() |
List all available documentation pages |
get_fastapi_example(topic) |
Get just the code examples, no prose |
compare_fastapi_approaches(topic) |
Compare different approaches side-by-side |
get_fastapi_best_practices(topic) |
Get combined best practices from multiple pages |
Examples
Once connected, ask your AI assistant:
- "How do I set up CORS in FastAPI?"
- "Show me the FastAPI security documentation"
- "What are FastAPI dependencies?"
- "List all FastAPI tutorial pages"
- "Give me a code example for JWT authentication"
- "Compare sync vs async in FastAPI"
- "What are the best practices for testing in FastAPI?"
Installation
git clone https://github.com/jaredthivener/fastapi-docs-mcp.git
cd fastapi-docs-mcp
uv sync
Usage
With Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"fastapi-docs": {
"command": "uv",
"args": ["run", "--directory", "/path/to/fastapi-docs-mcp", "python", "main.py"]
}
}
}
With VS Code (GitHub Copilot)
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"fastapi-docs": {
"command": "uv",
"args": ["run", "--directory", "/path/to/fastapi-docs-mcp", "python", "main.py"]
}
}
}
With Docker
Build the image locally:
docker build -t fastapi-docs-mcp .
Then use this MCP server config:
{
"servers": {
"fastapi-docs": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"fastapi-docs-mcp"
],
"type": "stdio"
}
}
}
Standalone
uv run python main.py
Development
# Install dev dependencies
uv sync --extra dev
# Run tests
uv run pytest
# Lint
uv run ruff check .
# Format
uv run ruff format .
# Type check
uv run mypy main.py
How It Works
The server fetches documentation directly from the official FastAPI website:
- Sitemap-based discovery — Uses
sitemap.xmlto find all available pages - Real-time fetching — Retrieves current documentation on each request
- Smart extraction — Extracts readable content from HTML pages
- Keyword aliases — Maps common terms (e.g., "auth" → "security")
Content Limits
To keep responses fast and avoid overloading AI context windows, documentation content is truncated to a maximum length (currently 15,000 characters). If a page exceeds that limit, the response ends with a truncation notice and a link to the full page.
License
MIT
Установка FastAPI Docs Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/jaredthivener/fastapi-docs-mcpFAQ
FastAPI Docs Server MCP бесплатный?
Да, FastAPI Docs Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для FastAPI Docs Server?
Нет, FastAPI Docs Server работает без API-ключей и переменных окружения.
FastAPI Docs Server — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить FastAPI Docs Server в Claude Desktop, Claude Code или Cursor?
Открой FastAPI Docs Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare FastAPI Docs Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
