The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the QMD MCP listing page.
QMD MCP packages QMD as a long-running Streamable HTTP MCP server. It provides QMD search and document retrieval together with bounded index-maintenance operations, without exposing arbitrary shell execution.
This is a community-maintained integration. It is not affiliated with, endorsed by, or officially maintained by the upstream QMD project.
Use GitHub Issues for bug reports and feature requests and pull requests for proposed changes. See CONTRIBUTING.md for the development workflow, test requirements, and coding conventions. Security issues must follow the private process in SECURITY.md.
Release changes are recorded in CHANGELOG.md.
The public Docker image is published on GitHub Container Registry (GHCR):
The package is public, so Docker does not need a GitHub login to pull it.
For production deployments, use the immutable digest published in the corresponding GitHub Release rather than relying on the version tag alone.
The image supports linux/amd64 and linux/arm64. Each platform image retains only its matching QMD native llama runtime to keep the image bounded.
Put the Markdown files you want QMD to index in content/.
config/index.ymlpath values refer to paths inside the container. The Compose example below mounts ./content at /vault.
embedding: false is a QMD MCP wrapper extension for collections that should remain lexical-only. The files are still indexed and available to explicit lexical (lex) searches, but they are excluded from embedding health and manual start_embed jobs. Use it for large append-only logs or other exact-lookup material where repeatedly rebuilding vectors adds cost without useful semantic recall.
compose.ymlThe example binds the HTTP port to loopback only. If another container must call QMD MCP directly, attach both containers to a shared Docker network and use the QMD service name instead of exposing it broadly on the host.
QMD_FORCE_CPU=1 gives a predictable CPU-only deployment. Remove it or set it to 0 if you deliberately want QMD to probe for supported acceleration.
Check the service:
The Streamable HTTP MCP endpoint is:
You can run the same release without Compose:
QMD MCP keeps QMD's read-oriented MCP tools and adds bounded administration operations:
health reports index and runtime state;start_update starts a bounded asynchronous filesystem reindex job;start_embed starts a bounded asynchronous embedding job;job_status reports recent administration jobs;start_embed, while embedding: false collections remain lexical-only;query runs with reranking disabled;query_reranked provides a separate CPU-heavy reranked path;source_relative_path for authoritative filesystem handoff when QMD_SOURCE_RELATIVE_ROOT is configured and the source path resolves unambiguously;exposeToUser=true and confirmUserApprovedExposure=true, and preview/show/open/render/inspect intent is not approval.Only one administration job runs at a time. Completed jobs are retained in memory with a bounded history. See docs/tools.md for the complete nine-tool reference, including access level and side effects.
The container uses these stable paths:
| Path | Purpose |
|---|---|
/config/index.yml | QMD collection configuration |
/data/index.sqlite | QMD index database |
/data/home | Runtime home directory |
/data/cache | Model and runtime cache |
Source collections should normally be mounted read-only. /data must remain writable because it contains the rebuildable index and model/runtime cache.
The Dockerfile provides working defaults for the normal runtime paths and HTTP listener. Override only the settings your deployment needs.
| Variable | Default | Purpose |
|---|---|---|
QMD_HTTP_HOST | 0.0.0.0 | HTTP listen address inside the container |
QMD_HTTP_PORT | 8181 | HTTP listen port |
QMD_CONFIG_PATH | /config/index.yml | QMD collection configuration file |
INDEX_PATH | /data/index.sqlite | QMD index database |
QMD_SOURCE_RELATIVE_ROOT | unset | Optional common source root. When set, query results include exact, collision-safe source_relative_path values relative to this root. |
QMD_DEFAULT_COLLECTION | unset | Default collection for start_embed; otherwise the first configured collection is used |
QMD_FORCE_CPU | 0 | Set to 1 to disable acceleration probing and force CPU use |
QMD_EMBED_PARALLELISM | unset | Optional QMD embedding parallelism override |
QMD_EMBED_MAX_DOCS_PER_BATCH | 8 | Default maximum documents per explicit embedding batch; accepted range 1-32 |
QMD_EMBED_MAX_BATCH_MB | 16 | Default maximum explicit embedding batch size in MiB; accepted range 1-128 |
QMD_EMBED_MAX_DURATION_MS | 3600000 | Maximum embedding session length; accepted range 60000-7200000 ms |
QMD_REFRESH_INTERVAL_MINUTES | 15 | Scheduled index-refresh interval; refresh never starts embedding. 0 disables it, maximum 1440 |
QMD_REFRESH_INITIAL_DELAY_SECONDS | 120 | Delay before the first scheduled refresh; accepted range 0-3600 |
Invalid bounded numeric values fail at startup instead of being silently accepted. QMD_SOURCE_RELATIVE_ROOT never exposes its absolute path; only a relative source path is returned, and ambiguous normalized-path collisions return null rather than guessing.
node user.latest, or another moving tag.See SECURITY.md for vulnerability reporting and deployment guidance and docs/SECURE-DEVELOPMENT.md for the secure-design principles, common weakness classes, and review expectations applied to the project.
This repository is not a fork of the full QMD source tree. It consumes an exact @tobilu/qmd package version and applies a small fail-closed compatibility patch set during image build. The build fails if an expected upstream patch target no longer matches exactly.
See UPSTREAM.md for the current upstream version, patch inventory, and update process.
The container build is the primary validation boundary. It installs the locked dependency set, applies every upstream patch, runs the complete unit/property test suite, performs JavaScript syntax checks, and prunes development-only dependencies before the runtime stage. CI also starts the image, initializes the MCP protocol, verifies the exact nine-tool surface, runs a real index update against a temporary Markdown collection, and verifies the resulting document count.
Dependency and base-image updates are proposed by Dependabot. A QMD update is accepted only after the image build and functional release acceptance pass against the proposed version.
Versions use SemVer tags such as v0.1.7. A release must point to an exact CI-green commit. The tag-triggered Release workflow:
package.json;linux/amd64 and linux/arm64 images and publishes one multi-architecture tag;Normal CI does not publish images or releases. Release tags are immutable and are never reused for a different commit.
QMD MCP's original wrapper code is MIT licensed. QMD and bundled dependencies retain their own licenses. See LICENSE and UPSTREAM.md.