Qnexus Mcp

io.github.Blite-HQ由 GitHub 账号 Blite-HQ 发布v0.2.0更新于 Oct 24, 2026

MCP server for Quantinuum Nexus, wrapping the qnexus SDK. Not affiliated with Quantinuum.

概览

AI 生成的概览

面向 Quantinuum Nexus 的社区 MCP 服务器,让助手查看项目、作业与结果,并可选在免费模拟器上运行电路。

可以做什么
  • 通过封装的 qnexus SDK 查看 Nexus 项目、作业与结果(默认只读)。
  • 启用 execute 工具集后,在免费的 H2-1LE 模拟器上运行电路。
  • 启用 manage 工具集后,管理提交与项目等云端资源。
  • 仅在同时启用 destructive 工具集及其开关时,才可删除、取消或归档条目。
  • 在服务端限制积分额度、返回结果数量、提交频率与允许的项目范围。
适用场景
当你使用 Quantinuum Nexus,希望助手在聊天客户端内查询项目、作业和测量结果,或向免费模拟器提交小型电路时适用。
运行要求
本机需 Python 3.10+ 与 uv/uvx;需要 Quantinuum Nexus 账号,并通过 qnexus CLI(qnx login)在外部完成认证,在 Nexus JupyterHub 内则自动认证。以 stdio 运行;首次启动会下载 SDK 依赖,每次启动约需 30 秒。行为由命令行参数或 QNEXUS_MCP_* 环境变量控制,例如 QNEXUS_MCP_TOOLSETS。
安装前请注意
早期阶段、单人维护的项目,建议固定版本以保证可复现。默认只读,但启用 execute、manage 或 destructive 工具集后,助手可提交作业并更改或删除云端状态。花费积分需开启 QNEXUS_MCP_ALLOW_SPEND 并设置单次上限(QNEXUS_MCP_MAX_CREDITS,默认 0 表示禁止花费),使用真实硬件需开启 QNEXUS_MCP_ALLOW_HARDWARE。Nexus 返回的内容可能被他人影响,作业名、错误信息和结果都应视为不可信数据。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

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.

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 (the uvx command). On Windows, note the full path to uvx.exe (where uvx in 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):

bash
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:

jsonc
{  "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):

jsonc
{  "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

bash
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

FlagEnvDefaultEffect
--toolsetsQNEXUS_MCP_TOOLSETSreadCapability domains to expose (read,execute,manage,destructive)
--allow-spendQNEXUS_MCP_ALLOW_SPENDfalsePermit credit-spending (HQC) execution
--allow-hardwareQNEXUS_MCP_ALLOW_HARDWAREfalsePermit real-QPU targets
--allow-destructiveQNEXUS_MCP_ALLOW_DESTRUCTIVEfalsePermit delete/cancel/archive
--max-creditsQNEXUS_MCP_MAX_CREDITS0Hard per-call HQC ceiling; 0 blocks all spend
--max-outcomesQNEXUS_MCP_MAX_OUTCOMES100Top-N cap on distinct measurement outcomes returned per result (truncation is always reported)
--max-submissions-per-minuteQNEXUS_MCP_MAX_SUBMISSIONS_PER_MINUTE6Sliding-window submission cap; each circuit in a batch counts as one
--projectsQNEXUS_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

Apache-2.0. See LICENSE and NOTICE.

来源:README.md,提交 9ec6e5e

工具

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

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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