{
  "markdown": "# cudaq-docs-mcp\n\nAn MCP server that serves NVIDIA [CUDA-Q](https://github.com/NVIDIA/cuda-quantum) documentation, API reference, and runnable examples to AI agents: version-pinned to the cudaq you actually have installed.\n\nCommunity project, not affiliated with or endorsed by NVIDIA. CUDA-Q is a trademark of NVIDIA Corporation.\n\n## Why\n\nQuantum 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.\n\nThis 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.\n\n## Quick start\n\nRegister 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:\n\n```bash\nuvx cudaq-docs-mcp build --version 0.14.0\n```\n\n**Claude Code**\n\n```bash\nclaude mcp add cudaq-docs -- uvx cudaq-docs-mcp\n```\n\n**Claude Desktop** (`claude_desktop_config.json`), **Cursor** (`.cursor/mcp.json`), or any client that takes a JSON server map:\n\n```json\n{\n  \"mcpServers\": {\n    \"cudaq-docs\": {\n      \"command\": \"uvx\",\n      \"args\": [\"cudaq-docs-mcp\"]\n    }\n  }\n}\n```\n\n**VS Code** (`.vscode/mcp.json`):\n\n```json\n{\n  \"servers\": {\n    \"cudaq-docs\": {\n      \"type\": \"stdio\",\n      \"command\": \"uvx\",\n      \"args\": [\"cudaq-docs-mcp\"]\n    }\n  }\n}\n```\n\nPrefer pip? `pip install cudaq-docs-mcp` and use `cudaq-docs-mcp` as the command.\n\n## Tools\n\n| Tool | What it returns |\n| --- | --- |\n| `search_docs(query, version?, limit?)` | Ranked doc excerpts with breadcrumbs and canonical URLs |\n| `get_page(path, version?)` | One full documentation page as clean markdown |\n| `find_api(name, language?, version?)` | Exact Python or C++ symbol, kind, doc URL, and an excerpt |\n| `search_examples(query, language?, version?, limit?)` | Complete runnable programs from the CUDA-Q repository at the matching release |\n| `list_targets(category?)` | All 24 execution targets: simulators, hardware providers, and clouds, with selection snippets and when-to-use guidance |\n\nResources: `cudaq://versions` (installed and indexed versions) and `cudaq://llms.txt` (CUDA-Q's own llms.txt for the served version).\n\n## Version-pinned answers\n\nEvery tool resolves its docs version in this order:\n\n1. An explicit `version` argument (\"0.15.0\", \"latest\")\n2. The installed cudaq package, detected from distribution metadata (cudaq is never imported)\n3. `latest`\n\nIndexes 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.\n\n## How it works\n\nCUDA-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:\n\n- `objects.inv` is the crawl manifest and the API symbol table: no scraping heuristics\n- each markdown mirror is cleaned of theme chrome, code blocks are rebuilt with their language, and heading anchors are preserved for deep links\n- pages are chunked by heading and indexed in SQLite FTS5 (porter stemming, BM25 ranking)\n- examples, snippets, and application sources are fetched from the GitHub release tag that matches the docs version\n\nThe 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.\n\n## CLI\n\n```bash\ncudaq-docs-mcp            # serve MCP on stdio (what clients run)\ncudaq-docs-mcp build      # build the index for your installed cudaq, else latest\ncudaq-docs-mcp build --version 0.15.0\ncudaq-docs-mcp info       # cache location, indexed versions, detected cudaq\n```\n\nSet `CUDAQ_DOCS_MCP_AUTOBUILD=1` to build automatically on first use, and `CUDAQ_DOCS_MCP_CACHE` to relocate the cache.\n\n## Roadmap\n\n- Prebuilt indexes for pinned release versions, not just `latest`\n- An eval set of real developer questions, with published retrieval scores\n- CUDA-QX library docs\n\n## Contributing\n\nIssues and PRs are welcome. Commits need a DCO sign-off (`git commit -s`); see [CONTRIBUTING.md](CONTRIBUTING.md). Built in the open with Claude Code.\n\n## License\n\n[Apache-2.0](LICENSE). Documentation content belongs to NVIDIA Corporation & Affiliates, originates from the Apache-2.0 licensed [NVIDIA/cuda-quantum](https://github.com/NVIDIA/cuda-quantum) repository, and every served result links back to the canonical page. See [NOTICE](NOTICE).\n\n<!-- mcp-name: io.github.rogerawong/cudaq-docs-mcp -->\n",
  "bytes": 5083,
  "sha": "f8251c447c59ccd5990994e453237ed503a0a6740bb836bb31d354ddddaa5d0b",
  "repo_slug": "rogerawong/cudaq-docs-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_rogerawong_cudaq_docs_mcp_526bd12d/readme"
}