Skip to main content
Glama

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.

Related MCP server: ws-mcp

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:

uvx cudaq-docs-mcp build --version 0.14.0

Claude Code

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:

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

VS Code (.vscode/mcp.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

Tool

What 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

cudaq-docs-mcp            # serve MCP on stdio (what clients run)
cudaq-docs-mcp build      # build the index for your installed cudaq, else latest
cudaq-docs-mcp build --version 0.15.0
cudaq-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.

Available Tools

5 tools
find_apiA

Resolve a CUDA-Q API symbol to its canonical definition and doc URL.

Args: name: Symbol name, full or partial: "sample", "cudaq.observe", "qvector", "set_target". language: "python" or "cpp" to filter; omit for both. version: Docs version. Defaults to the installed cudaq version.

Inputs: name (required), version, language.

get_pageA

Fetch one documentation page as clean markdown.

Args: path: Page path as returned by search_docs, for example "using/quick_start" or "using/backends/sims/svsims". version: Docs version. Defaults to the installed cudaq version.

Inputs: path (required), version.

list_targetsA

List CUDA-Q execution targets (backends) with guidance on choosing.

Covers simulators (CPU, GPU state vector, tensor network, noisy, dynamics), quantum hardware providers, and cloud aggregators, each with selection snippets and doc URLs. Call this when deciding where to run a kernel or when the user names a provider.

Args: category: Optional filter: "simulator", "hardware", or "cloud".

Inputs: category.

search_docsA

Search the NVIDIA CUDA-Q documentation and return ranked excerpts.

Use this before answering any CUDA-Q question from memory: the platform moves quickly and memorized APIs are often stale. Each result carries a breadcrumb, an excerpt, and the canonical doc URL to cite.

Args: query: Natural language or keywords, for example "run kernel on GPU state vector" or "quantinuum credentials". version: Docs version such as "0.15.0" or "latest". Defaults to the installed cudaq version. limit: Maximum number of results (default 5).

Inputs: query (required), limit, version.

search_examplesA

Find complete, runnable CUDA-Q example programs.

Sources are the example, snippet, and application files shipped in the CUDA-Q repository at the matching release. Prefer adapting these over writing kernels from memory.

Args: query: What the example should show, for example "GHZ state", "VQE", or "noise model". language: "python" or "cpp" to filter; omit for both. version: Docs version. Defaults to the installed cudaq version. limit: Maximum number of examples (default 3).

Inputs: query (required), limit, version, language.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct resource: docs search, page retrieval, API symbol resolution, example search, and target listing. The two search tools are clearly separated by corpus (docs vs examples), and get_page complements search_docs by fetching full pages.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern: search_docs, get_page, find_api, search_examples, list_targets. The verbs and nouns are descriptive and predictable.

    Tool Count5/5

    Five tools is well-scoped for a documentation server, covering discovery (search), retrieval (get_page), reference (find_api), examples, and backend selection without unnecessary bloat.

    Completeness5/5

    The tool set covers the primary ways users interact with CUDA-Q docs: searching for answers, reading full pages, looking up APIs, finding runnable examples, and selecting execution targets. There are no obvious gaps that would cause dead ends.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      A Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.
      2
      1,054,636 npm
      64,431
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A self-hosted MCP server that fetches live documentation and performs code audits using real-time authoritative references to prevent AI hallucinations. It provides tools for searching documentation across 330+ libraries and scanning local source code for security, performance, and accessibility issues.
      14
      291 npm
      6
      Elastic 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Local-first MCP server providing semantic search over library docs, fully offline. Single Go binary speaks MCP over stdio against a vector index pinned to the binary version. Like Context7 with the internet turned off. Apache 2.0. Linux + macOS, also available as a container image.
      2
      4
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to search, read, and traverse documentation bundles in Open Knowledge Format via MCP tools.
      674 npm
      74
      MIT