DC

darkamenosa/contextqmd-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 1 forks 质量 76 趋势 12MIT

通过ContextQMD为本地第一库文档提供 MCP 服务器

概览

MCP服务器用于本地第一,版本意识库文档. 从您的 AI 编码助手直接安装、 搜索和检索任何库的文档 。 ContextQMD是保存本地文档的上下文7的替代品. 它从ContextQMD注册处下载doc包,用QMD(BM25 +矢量+LLM重排)索引它们,并通过"模型上下文协议"为结果服务. 1. 搜索库目录并选择一个库/版本 2. 获取表 3. 在可用时下载一个 tar.gz docs 捆绑 4. 验证 SHA256 校验和并解包到本地缓存 5. 索引 QMD 6. 本地搜索 如果缺少相容的捆绑,服务器会倒回页面索引外加每页获取. 安装是原子式的,失败时会回滚。 添加到您的 MCP 客户端配置中( 例如 Claude Desktop, Cursor等) .

概述(AI 翻译)

MCP服务器用于本地第一,版本意识库文档. 从您的 AI 编码助手直接安装、 搜索和检索任何库的文档 。

它会做什么#

ContextQMD是保存本地文档的上下文7的替代品. 它从ContextQMD注册处下载doc包,用QMD(BM25 +矢量+LLM重排)索引它们,并通过"模型上下文协议"为结果服务.

安装流量为 捆绑先行 :

  1. 搜索图书馆目录并选择图书馆/版本
  2. 获取清单
  3. 下载tar.gz文件包
  4. 核实SHA256核对和拆入当地缓存
  5. 带QMD的索引
  6. 本地搜索

如果缺少相容的捆绑,服务器会倒回 [[T1] +每页取回. 安装是原子式的,失败时会回滚。

□ 安装

或者用 npx 直接运行 :

□ MCP 配置

添加到您的 MCP 客户端配置中( 例如 Claude 桌面 、 光标等 ) :

或者如果在全球安装:

QQ CLI 选项

□ 可用的工具

  • 工具 * * 描述 * * |-|-|-. QQ search_libraries 搜索远程图书馆目录. 返回具有版本、别名、源元数据以及本地安装状态的候选人.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

contextqmd-mcp

MCP server for local-first, version-aware library documentation. Install, search, and retrieve docs for any library directly from your AI coding assistant.

What it does

ContextQMD is an alternative to context7 that keeps documentation local. It downloads doc packages from the ContextQMD registry, indexes them with QMD (BM25 + vector + LLM reranking), and serves results through the Model Context Protocol.

Install flow is bundle-first:

  1. search the library catalog and choose a library/version
  2. fetch manifest
  3. download a tar.gz docs bundle when available
  4. verify SHA256 checksum and unpack into the local cache
  5. index with QMD
  6. search locally

If a compatible bundle is missing, the server falls back to page-index plus per-page fetches. Installs are atomic with rollback on failure.

Install

npm install -g contextqmd-mcp

Or run directly with npx:

npx contextqmd-mcp

MCP Configuration

Add to your MCP client configuration (e.g., Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "contextqmd": {
      "command": "npx",
      "args": ["-y", "contextqmd-mcp"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "contextqmd": {
      "command": "contextqmd-mcp"
    }
  }
}

CLI Options

--transport   Transport type: stdio (default) or http
--port      HTTP port (default: 3001)
--registry     Registry URL override
--token      API token
--cache-dir   Cache directory override

Available Tools

Tool Description
search_libraries Search the remote library catalog. Returns candidates with versions, aliases, source metadata, and local install status.
install_docs Install a documentation package. Bundle-first with SHA256 verification; falls back to page API. Atomic with rollback. Idempotent — skips if already installed with same manifest checksum.
update_docs Update installed docs to latest version or refresh when manifest checksum changes. Rolls back on failure.
search_docs Search installed documentation locally. Returns page-level results with snippets, line anchors, and scores. Supports auto/fts/vector/hybrid modes.
get_doc Read a bounded slice from a locally installed page by doc_path or page_uid. Supports sequential reads (from_line/max_lines) and context windows (around_line/before/after).
list_installed_docs List all locally installed documentation packages with metadata.
remove_docs Remove an installed documentation version or all versions for a library. Cleans up both cache and search index.

Search Modes

search_docs supports four modes via the mode parameter:

  • auto (default) — Smart routing based on query classification: short keyword queries use FTS, conceptual/how-to questions use vector, complex multi-aspect queries use hybrid.
在 GitHub 查看完整 README

安装

npx -y contextqmd-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "contextqmd": { "command": "npx", "args": ["-y", "contextqmd-mcp"] } } }