Reflex Docs MCP Server
Version 0.2.0 — 14 tools, connection pooling, FTS5 query upgrades, TTL caching
New in 0.2.0
New Tools
get_code_examples(topic)— Find Python code examples from docs for a topicdecode_error(error_text)— Analyze a Reflex error and find relevant docsget_changelog(version?)— Fetch Reflex release notes from GitHubget_migration_guide(from_version, to_version)— Get migration guidance between versionssearch_api_reference(symbol)— Look up API reference for a Reflex symbolget_component_props(name)— Get only the props table for a componentlist_recipes(category?)— Browse recipe/tutorial pages
Enhancements
search_docs— Newfuzzyflag (prefix expansion),include_contentflag (full page content)get_doc— Newextract_codeflag (return only fenced code blocks)
Performance
- SQLite connection pooling via
threading.local()with persistent per-thread connections - WAL journal mode, 64 MB page cache, 256 MB mmap for concurrent reads
- LRU cache (512 entries) on slug lookups
- In-process TTL cache (300s default) on search results
- FTS5 query preprocessor: phrase match + prefix expansion
- Incremental indexing — skips re-index if git commit unchanged
Ground AI agents in real, up-to-date Reflex docs via a fast, local MCP server.
Python: 3.14 recommended. Compatible with 3.13+.
What It Does
- Full‑text search over Reflex docs (SQLite FTS5)
- Section‑level retrieval for precise context
- Component index for
rx.*lookups - FastMCP server with stdio and SSE transports
Quickstart
# Create venv
python3.14 -m venv .venv
. .venv/bin/activate
# Install (local checkout)
pip install -e .
# Index docs (clones Reflex docs and builds search index)
python -m reflex_docs_mcp.indexer
# Run MCP server (stdio)
python -m reflex_docs_mcp.server
# Run MCP server over SSE
python -m reflex_docs_mcp.server --transport sse --host 127.0.0.1 --port 8000
Install From PyPI
pip install reflex-docs-mcp
MCP Tools
search_docs(query, limit?, include_content?, fuzzy?)— Full-text search with fuzzy matchingget_doc(slug, extract_code?)— Retrieve a full doc page by sluglist_pages(prefix?, limit?)— List doc pages by slug prefixlist_components(category?)— List all Reflex componentssearch_components(query, limit?)— Search components by name/descriptionget_component(name)— Get details about a specific componentget_component_props(name, filter?)— Get component props tableget_stats()— Database statisticsget_code_examples(topic, limit?)— Find Python code examples for a topicdecode_error(error_text, context?)— Analyze errors against docsget_changelog(version?, limit?)— Fetch Reflex release notesget_migration_guide(from_version, to_version)— Migration guidance between versionssearch_api_reference(symbol)— API reference lookuplist_recipes(category?)— Browse recipe/tutorial pages
Local MCP Config (VS Code)
The repository includes a ready-to-use config at .vscode/mcp.json that runs the server with the local venv.
Global Install MCP Config (VS Code)
If you install the package globally with pip, use one of these in .vscode/mcp.json:
Using module invocation:
{
"servers": {
"reflex-docs": {
"type": "stdio",
"command": "python3",
"args": ["-m", "reflex_docs_mcp.server"],
"env": {
"REFLEX_DOCS_AUTO_INDEX": "true"
}
}
},
"inputs": []
}
Using the CLI entry point:
{
"servers": {
"reflex-docs": {
"type": "stdio",
"command": "reflex-docs-mcp",
"args": [],
"env": {
"REFLEX_DOCS_AUTO_INDEX": "true"
}
}
},
"inputs": []
}
Project Layout
├── main.py # MCP stdio entry point
├── src/reflex_docs_mcp/
│ ├── models.py # Pydantic data models
│ ├── database.py # SQLite + FTS5 operations
│ ├── parser.py # Markdown parser
│ ├── http.py # Shared HTTP client with TTL cache
│ ├── indexer.py # Docs cloning & indexing
│ └── server.py # MCP server (stdio + SSE)
├── render.yaml # Render deployment config
├── Procfile # Process definition
└── test.py # Groq + MCP demo client
Demo (Optional)
The demo client uses Groq (OpenAI-compatible API) and the MCP Python client.
pip install reflex-docs-mcp[demo]
cp env.example .env
# Add GROQ_API_KEY to .env
python test.py
Notes
env.examplecontains Groq settings.- The indexer writes to
data/reflex_docs.dbby default. - On startup, the server auto-builds the index if missing. Controls:
REFLEX_DOCS_AUTO_INDEX(default: true)REFLEX_DOCS_DOCS_SRC(path to clone docs into, default:docs_src)REFLEX_DOCS_SKIP_CLONE/REFLEX_DOCS_FORCE_CLONEREFLEX_DOCS_KEEP_EXISTINGREFLEX_DOCS_CACHE_TTL(default: 300) — Seconds for search cache TTLREFLEX_DOCS_HTTP_TIMEOUT(default: 10) — Seconds for outbound HTTP requestsREFLEX_DOCS_MAX_SEARCH_LIMIT(default: 30) — Hard cap on search result limitREFLEX_DOCS_ENABLE_LIVE_FETCH(default: true) — If false, disable live HTTP fetches
License
MIT
Release files for reflex-docs-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| reflex_docs_mcp-0.2.0.tar.gz | 19.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| reflex_docs_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.0 kB
Release files / reflex_docs_mcp-0.2.0.tar.gz
| Download URL | reflex_docs_mcp-0.2.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
756924cf81a72b088db11a5567217de550822a3c2d7648553582d6ac1a72683c
|
|
BLAKE2b-256 checksum How to use checksums |
dbfd7824a2966e40422f7dda42da0228af845fe24973da1207bbf3ed3c188573
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.
Transparency logRelease files / reflex_docs_mcp-0.2.0-py3-none-any.whl
| Download URL | reflex_docs_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7931693b8fa6bf01dd56c6bdbd233d65651e1dafb5ef25eaf2aeb3028862fc39
|
|
BLAKE2b-256 checksum How to use checksums |
c594b31fce5cb4d19e3701f84668b2f7fb7f0366a8b051becdc7ec431f30b5e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2026.
Transparency log