qnexus-mcp
An MCP server for Quantinuum Nexus that lets AI agents inspect projects and, when enabled, run quantum circuits on the free H2-1LE emulator. It is read-only by default with optional flags for spending credits or interacting with real hardware.
README
qnexus-mcp
A community Model Context Protocol (MCP) server for Quantinuum Nexus,
wrapping the official qnexus Python SDK so any MCP-speaking agent
(Claude Code, Cursor, VS Code, Codex, …) can inspect Nexus and, opt-in, run circuits on the free emulator.
Not affiliated with, endorsed by, or an official product of Quantinuum. "Quantinuum" and "Nexus" are trademarks of their respective owners, used here nominatively to describe compatibility.
<!-- mcp-name: io.github.Blite-HQ/qnexus-mcp -->
Status
Early development. Read-only by default. Design and rationale live in
docs/DESIGN.md; the research behind it is in docs/research/.
Requirements
- Python 3.10+ and
uv(theuvxcommand). On Windows, note the full path touvx.exe(where uvxin a terminal) — GUI clients don't inherit your shell PATH. - A Quantinuum Nexus account.
1. Authenticate (once)
qnexus-mcp never handles your Nexus token. Authenticate out-of-band with the qnexus CLI
(it opens your browser):
uvx --from qnexus qnx login
Inside Nexus JupyterHub, authentication is automatic; do not run qnx login there.
2. Add the server to your MCP client
The launch command is the same everywhere — only the config file differs per client:
uvx qnexus-mcp==0.2.0 # read-only (default)
uvx qnexus-mcp==0.2.0 --toolsets read,execute # + run circuits on the free H2-1LE emulator
Pin a version (==0.2.0): uvx otherwise resolves the latest PyPI release on every launch —
unpinned installs are neither reproducible nor auditable. Avoid 0.1.0 on Windows: its first
tool call hangs (fixed in 0.2.0).
What to expect on startup: the first ever launch downloads the quantum SDK stack (1–3 min); every launch takes ~30 s before the server responds — the SDK is imported up front, before the MCP handshake. "Waiting for server to respond to
initialize" during that window is normal.
Claude Desktop
Settings → Developer → Local MCP servers → Edit Config (always use this button — the
Microsoft Store build keeps the file under %LOCALAPPDATA%\Packages\Claude_*\..., not
%APPDATA%\Claude), then add:
{
"mcpServers": {
"nexus": {
"command": "C:\\Users\\<you>\\.local\\bin\\uvx.exe", // or plain "uvx" on macOS/Linux
"args": ["qnexus-mcp==0.2.0", "--toolsets", "read,execute"]
}
}
}
Then quit Claude Desktop fully and reopen — the config is only read at cold start, and
closing the window leaves the old process running (tray icon → Quit, or
taskkill /F /IM claude.exe).
VS Code
Command Palette → MCP: Open User Configuration (or a workspace .vscode/mcp.json):
{
"servers": {
"nexus": {
"type": "stdio",
"command": "C:\\Users\\<you>\\.local\\bin\\uvx.exe", // or plain "uvx" on macOS/Linux
"args": ["qnexus-mcp==0.2.0", "--toolsets", "read,execute"]
}
}
}
Claude Code
claude mcp add nexus -- uvx qnexus-mcp==0.2.0 --toolsets read,execute
Other MCP clients (Cursor, Codex, …)
Same command; the config shape is one of the two JSON forms above (mcpServers vs
servers + "type": "stdio") — check your client's docs for which file to put it in.
Something not working? See docs/TROUBLESHOOTING.md — it covers every
failure mode observed in real client setups (wrong config path, slow first start, auth, rate
limits, known Nexus-side errors).
Configuration
| Flag | Env | Default | Effect |
|---|---|---|---|
--toolsets |
QNEXUS_MCP_TOOLSETS |
read |
Capability domains to expose (read,execute,manage,destructive) |
--allow-spend |
QNEXUS_MCP_ALLOW_SPEND |
false |
Permit credit-spending (HQC) execution |
--allow-hardware |
QNEXUS_MCP_ALLOW_HARDWARE |
false |
Permit real-QPU targets |
--allow-destructive |
QNEXUS_MCP_ALLOW_DESTRUCTIVE |
false |
Permit delete/cancel/archive |
--max-credits |
QNEXUS_MCP_MAX_CREDITS |
0 |
Hard per-call HQC ceiling; 0 blocks all spend |
--max-outcomes |
QNEXUS_MCP_MAX_OUTCOMES |
100 |
Top-N cap on distinct measurement outcomes returned per result (truncation is always reported) |
--max-submissions-per-minute |
QNEXUS_MCP_MAX_SUBMISSIONS_PER_MINUTE |
6 |
Sliding-window submission cap; each circuit in a batch counts as one |
--projects |
QNEXUS_MCP_PROJECTS |
(all) | Comma-separated project allowlist, enforced on every mutating tool |
Safety
Read-only by default. Anything that spends credits or mutates cloud state requires an explicit opt-in flag
and an in-protocol confirmation, and the default execution backend is the free, noiseless H2-1LE
emulator. Submissions are rate-limited, cloud mutations are serialized, destructive project operations
resolve their target by exact name (never substring), and the server never reads, stores, or returns
your Nexus token. Every control is enforced server-side; MCP tool annotations are treated as UX hints
only. See docs/DESIGN.md §6–§7.
Prompt injection (conscious design decision). Everything Nexus returns — job names, project names, error messages, results — is attacker-influencable content (any Nexus user can name a job) and is treated as untrusted data. There is no structural tagging that separates "data" from "instructions" in today's MCP ecosystem; the structural boundary here is instead that injected content cannot escalate: every action with consequences (spending credits, targeting hardware, deleting anything) requires launch flags the agent cannot set plus an in-protocol human confirmation naming the exact target and cost. Injected text can at worst confuse the agent's reasoning — it cannot spend or destroy anything on its own. This residual risk is accepted and documented, not an omission.
Governance. This is an early-stage, single-maintainer project (see CODEOWNERS): releases are
published by one person via GitHub-OIDC Trusted Publishing (no long-lived PyPI tokens). Pin a version
(above) if that trust model matters for your deployment.
Contributing
See CONTRIBUTING.md. Contributions are accepted under the
Developer Certificate of Origin; sign off your commits with -s.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。