CUDA-Q Docs

io.github.rogerawong由 GitHub 账号 rogerawong 发布v0.1.1更新于 Oct 24, 2026

CUDA-Q docs, API reference, and runnable examples for AI agents, pinned to your installed version.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

为 AI 助手提供与已安装版本绑定的 NVIDIA CUDA-Q 文档、API 参考和可运行示例,基于本地全文检索。

可以做什么
  • 检索文档并以干净的 Markdown 读取完整页面
  • 精确解析 Python 或 C++ API 符号,返回类型、文档链接和摘录
  • 查找与对应 CUDA-Q 发行版匹配的完整可运行示例程序
  • 列出全部执行目标(模拟器、硬件厂商、云平台)并给出选择建议
  • 以资源形式提供已安装与已索引版本以及所服务版本的 llms.txt
适用场景
适合在助手编写或调试 CUDA-Q 量子代码、容易引用已改名 API、已停用目标名称或错误版本安装步骤时使用。它让回答与用户实际安装的 cudaq 包保持一致。
运行要求
通过 uvx 或 pip 安装 Python 包 cudaq-docs-mcp,以 stdio 在本地运行。无需 API 密钥或向量嵌入。首次使用时自动下载几 MB 的预构建索引;没有预构建资源的版本需本地构建。可选环境变量 CUDAQ_DOCS_MCP_AUTOBUILD 和 CUDAQ_DOCS_MCP_CACHE。
安装前请注意
首次运行会从网络下载索引,示例取自 GitHub 发行标签。本地构建索引会耗时并占用缓存目录空间。该项目为社区项目,与 NVIDIA 无关联,也未获其认可。

安装

在 SourceWeft 中

  1. 打开 控制台中的 CUDA-Q Docs,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

cudaq-docs-mcp

An MCP server that serves NVIDIA CUDA-Q documentation, API reference, and runnable examples to AI agents: version-pinned to the cudaq you actually have installed.

Community project, not affiliated with or endorsed by NVIDIA. CUDA-Q is a trademark of NVIDIA Corporation.

Why

Quantum SDKs move faster than model training data. Ask an AI assistant to write CUDA-Q code and it answers from whatever it memorized: renamed APIs, retired target names, install steps for a version you do not run. The failure is version skew, and it lands where onboarding matters most: the first ten minutes.

This server gives any MCP-capable agent the current answer instead. Documentation search, exact API symbol resolution, complete runnable examples, and a backend-selection guide, all served from an index of the docs that match your installed cudaq package. No API keys and no embeddings: SQLite full-text search with BM25 ranking, on your machine, offline once the index exists.

Quick start

Register the server with your client; on first use it downloads a prebuilt index (a couple of megabytes) automatically. Building locally is only needed for versions without a prebuilt asset:

bash
uvx cudaq-docs-mcp build --version 0.14.0

Claude Code

bash
claude mcp add cudaq-docs -- uvx cudaq-docs-mcp

Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json), or any client that takes a JSON server map:

json
{  "mcpServers": {    "cudaq-docs": {      "command": "uvx",      "args": ["cudaq-docs-mcp"]    }  }}

VS Code (.vscode/mcp.json):

json
{  "servers": {    "cudaq-docs": {      "type": "stdio",      "command": "uvx",      "args": ["cudaq-docs-mcp"]    }  }}

Prefer pip? pip install cudaq-docs-mcp and use cudaq-docs-mcp as the command.

Tools

ToolWhat it returns
search_docs(query, version?, limit?)Ranked doc excerpts with breadcrumbs and canonical URLs
get_page(path, version?)One full documentation page as clean markdown
find_api(name, language?, version?)Exact Python or C++ symbol, kind, doc URL, and an excerpt
search_examples(query, language?, version?, limit?)Complete runnable programs from the CUDA-Q repository at the matching release
list_targets(category?)All 24 execution targets: simulators, hardware providers, and clouds, with selection snippets and when-to-use guidance

Resources: cudaq://versions (installed and indexed versions) and cudaq://llms.txt (CUDA-Q's own llms.txt for the served version).

Version-pinned answers

Every tool resolves its docs version in this order:

  1. An explicit version argument ("0.15.0", "latest")
  2. The installed cudaq package, detected from distribution metadata (cudaq is never imported)
  3. latest

Indexes are per-version. When a pinned index is missing the server says so in the response and serves latest instead, with the one command that fixes it. Skew becomes visible instead of silent.

How it works

CUDA-Q publishes the raw material: a Sphinx inventory (objects.inv) listing every page and API symbol, markdown mirrors of each docs page, a per-version llms.txt, and example sources in the repository. This server builds on that groundwork:

  • objects.inv is the crawl manifest and the API symbol table: no scraping heuristics
  • each markdown mirror is cleaned of theme chrome, code blocks are rebuilt with their language, and heading anchors are preserved for deep links
  • pages are chunked by heading and indexed in SQLite FTS5 (porter stemming, BM25 ranking)
  • examples, snippets, and application sources are fetched from the GitHub release tag that matches the docs version

The whole index is one SQLite file per version in your cache directory (cudaq-docs-mcp info shows where). A nightly workflow rebuilds the latest index so refreshes stay a download, not a build.

CLI

bash
cudaq-docs-mcp            # serve MCP on stdio (what clients run)cudaq-docs-mcp build      # build the index for your installed cudaq, else latestcudaq-docs-mcp build --version 0.15.0cudaq-docs-mcp info       # cache location, indexed versions, detected cudaq

Set CUDAQ_DOCS_MCP_AUTOBUILD=1 to build automatically on first use, and CUDAQ_DOCS_MCP_CACHE to relocate the cache.

Roadmap

  • Prebuilt indexes for pinned release versions, not just latest
  • An eval set of real developer questions, with published retrieval scores
  • CUDA-QX library docs

Contributing

Issues and PRs are welcome. Commits need a DCO sign-off (git commit -s); see CONTRIBUTING.md. Built in the open with Claude Code.

License

Apache-2.0. Documentation content belongs to NVIDIA Corporation & Affiliates, originates from the Apache-2.0 licensed NVIDIA/cuda-quantum repository, and every served result links back to the canonical page. See NOTICE.

来源:README.md,提交 e9abee0

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分