Offline MCP server for local Qt 4.8, Qt 5, and Qt 6 documentation with full-text search.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
mcp-name: io.github.jztan/qt4-doc-mcp-server
Bring locally installed Qt 4.8, Qt 5, or Qt 6 documentation to your AI coding assistant. Works offline with one selected documentation set at a time.
QT_DOC_BASE directly at an existing Qt 5/6 offline documentation root.The helper script ships with the repo, not the PyPI package. Installed from PyPI only? Download the docs manually instead:
Then create a .env with QT_DOC_BASE pointing at that directory (see Configuration below).
The legacy qt4-doc-mcp-server command remains available as an alias for existing client configurations.
After building the index, agents can search and receive materialized absolute Markdown paths:
The command reads the same .env settings as the server. Before searching, it automatically builds a missing/outdated FTS index and fully warms an incomplete Markdown cache. It then prints each result's title, absolute .md path, and FTS snippet to stdout; preparation messages, errors, and warnings go to stderr. Use qt-doc-warm-md --force after changing documentation in place.
Prebuilt multi-arch images (amd64/arm64) are published to GitHub Container Registry on every release. The container is offline-only: you mount your prepared Qt doc/html directory read-only at /docs, and all derived state (Markdown cache and search index) lives in a volume at /data.
Using only the published image, without cloning this repo? Download the Qt 4.8.4 docs directly instead of running the prepare script:
Any existing Qt 5 or Qt 6 doc/html tree (from the Qt installer or distro documentation packages) works as the mount source too.
First start converts and indexes the documentation into the /data volume; subsequent starts reuse it. Depending on the docset size, the first start can take a minute or two before the health endpoint responds.
With docs in the default ./qt4-docs-html location, no configuration is needed:
For docs elsewhere (including Qt 5 or Qt 6 doc/html trees, which the server also supports), point QT_DOC_HTML_PATH at them. If port 8000 is taken on the host, set HOST_PORT in the same file (with plain docker run, change the left side of -p instead):
Or use the convenience script, which checks Docker is running, creates .env.docker on first run, builds and starts the service, and waits for the health endpoint:
Point your MCP client at http://127.0.0.1:8000/mcp (streamable HTTP). Qt documentation is licensed under GFDL 1.3; the container serves your local copy and never redistributes it.
These settings apply to native (pip or source) runs. In Docker they are already set inside the container (QT_DOC_BASE=/docs, QT_DOC_STATE_DIR=/data, SERVER_HOST=0.0.0.0); the QT_DOC_HTML_PATH variable in .env.docker is not a server setting, just the host path mounted at /docs.
Create a .env file in the repo root. The helper script writes sensible defaults; adjust as needed:
| Variable | Default | Purpose |
|---|---|---|
QT_DOC_BASE | required | Absolute path to one Qt 4.8, Qt 5, or Qt 6 HTML documentation root. The server detects the active docset. |
QT_DOC_STATE_DIR | $QT_DOC_BASE/.index | Optional writable directory for the FTS index and Markdown cache. Use this when the documentation root is read-only. |
PREINDEX_DOCS | true | Build search index automatically at startup if not present. |
PRECONVERT_MD | false | Warm the Markdown cache automatically at MCP startup. |
SERVER_HOST | 127.0.0.1 | Bind address for the FastMCP server (0.0.0.0 for containers). |
SERVER_PORT | 8000 | TCP port for streamable HTTP transport. |
MCP_LOG_LEVEL | WARNING | Logging verbosity (DEBUG/INFO/WARNING/ERROR). |
MD_CACHE_SIZE | 512 | In-memory CachedDoc LRU capacity (counts pages). |
DEFAULT_MAX_MARKDOWN_LENGTH | 20000 | Default maximum characters returned per request (prevents token limit issues). |
The tools identify documents by their exact root-relative Markdown path, not an online URL. For example, use qcompleter.md for a Qt 4 page, qtdoc/accessible.md for a Qt 5/6 global page, or qtcore/qobject.md for a Qt 5/6 Core page. By default, each docset stores its own index and Markdown cache under $QT_DOC_BASE/.index/, so switching QT_DOC_BASE reuses its existing derived state. Set QT_DOC_STATE_DIR to relocate both to a writable directory. The Markdown cache mirrors the documentation tree: for example, qtcore/qobject.md is cached as .index/md/qtcore/qobject.md plus qobject.meta.json with the default state directory.
By default, the server exposes an HTTP endpoint at http://127.0.0.1:8000/mcp. Register it with your preferred MCP-compatible agent using the instructions below.
Run the server over stdio instead of HTTP with:
For stdio-only MCP clients, configure that command with args: ["--transport", "stdio"]. Startup indexing and Markdown-cache progress are written to stderr, leaving stdout exclusively for MCP protocol messages.
VS Code has built-in MCP support via GitHub Copilot (requires VS Code 1.102+).
Using CLI (Quickest):
Using Command Palette:
Cmd/Ctrl+Shift+P)MCP: Open User Configuration (for global) or MCP: Open Workspace Folder Configuration (for project-specific)Manual Configuration:
Create .vscode/mcp.json in your workspace (or mcp.json in your user profile directory):
Add to Claude Code using the CLI command:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/qt4-doc-mcp-server)<a href="https://allmcps.com/mcp/qt4-doc-mcp-server"><img src="https://allmcps.com/api/badge/qt4-doc-mcp-server?style=directory" alt="Qt4 Doc MCP Server on AllMCPs" /></a>