Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
作者提供的说明(英文原文)
Build, compile, run and export FlagQuantum circuits locally. No credentials or outbound network.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
FLAGQUANTUM_MCP_MAX_QUBITS, FLAGQUANTUM_MCP_MAX_GATES, FLAGQUANTUM_MCP_MAX_IR_BYTES你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"flagquantum": {
"command": "uvx",
"args": [
"flagquantum-mcp-server"
],
"env": {
"FLAGQUANTUM_MCP_MAX_QUBITS": "your-value",
"FLAGQUANTUM_MCP_MAX_GATES": "your-value",
"FLAGQUANTUM_MCP_MAX_IR_BYTES": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add flagquantum --env FLAGQUANTUM_MCP_MAX_QUBITS=your-value --env FLAGQUANTUM_MCP_MAX_GATES=your-value --env FLAGQUANTUM_MCP_MAX_IR_BYTES=your-value -- uvx flagquantum-mcp-server运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"flagquantum": {
"command": "uvx",
"args": [
"flagquantum-mcp-server"
],
"env": {
"FLAGQUANTUM_MCP_MAX_QUBITS": "your-value",
"FLAGQUANTUM_MCP_MAX_GATES": "your-value",
"FLAGQUANTUM_MCP_MAX_IR_BYTES": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"flagquantum": {
"type": "stdio",
"command": "uvx",
"args": [
"flagquantum-mcp-server"
],
"env": {
"FLAGQUANTUM_MCP_MAX_QUBITS": "your-value",
"FLAGQUANTUM_MCP_MAX_GATES": "your-value",
"FLAGQUANTUM_MCP_MAX_IR_BYTES": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
FLAGQUANTUM_MCP_MAX_QUBITS envFLAGQUANTUM_MCP_MAX_GATES envFLAGQUANTUM_MCP_MAX_IR_BYTES env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 FlagQuantum 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.3.2)于10天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Spec Driven Development, Remote Desktop Commander, DiffCI
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Fail-closed, change-aware verification for AI coding agents with affected-test guidance.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
An MCP server that gives any MCP-compatible agent local access to the FlagQuantum SDK: build, compile, route, serialize and plan quantum circuits — and run them locally — with no credentials, no outbound network access and no hardware submission.
"Outbound" is the load-bearing word. Every tool here runs in this process and reaches nothing; the server never calls a provider, reads a token or submits a job. It can also *listen*, so a gateway that connects to its clients rather than launching them can reach it — see Serving over HTTP. An inbound listener is not egress.
Part of FlagQuantum/mcp-servers.
The mcp-name comment above is not decoration: the MCP Registry reads it from this README to verify that whoever publishes the registry entry also controls the PyPI package. Removing it breaks registry publishing.
Twenty-seven tools over stdio or Streamable HTTP. The research tools use the installed FlagQuantum service contract directly; the MCP layer does not reimplement request decoding, estimation, provider routing or scientific validation.
Build and inspect
| Tool | What it answers |
|---|---|
describe_gate_set_tool | Wire count, parameter names and aliases for named gates — or every gate |
analyze_circuit_tool | Gate counts, depth, wire usage, two-qubit gate count |
describe_layers_tool | Which gates run concurrently, and therefore where the depth comes from |
serialize_circuit_tool | Canonical IR JSON plus its content hash |
deserialize_circuit_tool | Is this IR valid, and does it round-trip unchanged? |
Parameters
| Tool | What it answers |
|---|---|
inspect_parameters_tool | Is this circuit parameterized, and where does each symbol sit? |
bind_parameters_tool | What does this ansatz look like once the symbols are numbers? |
Compile and route
| Tool | What it answers |
|---|---|
optimize_circuit_tool | What did target-independent optimization change? |
compile_circuit_tool | What circuit does the complete optimize-and-route pipeline produce? |
route_circuit_tool | What does this circuit cost on a line / ring / grid / custom topology? |
compare_topologies_tool | Which connectivity is cheapest for this circuit? |
describe_topology_tool | What is the connectivity, and how far apart are two wires? |
Export and present
| Tool | What it answers |
|---|---|
emit_openqasm_tool | OpenQASM 2.0 or 3.0 text |
import_openqasm_tool | FlagQuantum IR from OpenQASM text — the inverse of emit_openqasm_tool |
emit_qcis_tool | QCIS text |
draw_circuit_tool | An ASCII diagram of the circuit |
plan_execution_tool | How would the SDK execute this — which mode, device, how much memory? |
plan_evolution_tool | Validate and size a continuous-time Lindblad evolution without running it |
Run
| Tool | What it answers |
|---|---|
simulate_circuit_tool | Counts, samples, marginal probabilities or an expectation value from a local statevector run |
evolve_dynamics_tool | Time-resolved populations, observables and optional density matrices from local Lindblad evolution |
train_parameters_tool | The angles that lower a circuit's energy against a Pauli-sum Hamiltonian |
Research capability workflow
| Tool | What it answers |
|---|---|
search_capabilities_tool | Which approved local research operations match structured filters? |
describe_capability_tool | What exact request, result, limitations and validators does one operation declare? |
estimate_capability_tool | Is this request supported locally, and what bounded resources does FlagQuantum estimate? |
validate_capability_input_tool | Does the complete typed request pass upstream validation? |
execute_local_capability_tool | What Evidence Bundle results from explicit local provider execution? |
validate_evidence_tool | Is the returned Evidence Bundle intact and scientifically accepted by the named validator? |
Four concrete resources include flagquantum://version, flagquantum://gate-set, flagquantum://ir-schema, and the installed research catalog at flagquantum://capabilities/index. Two resource templates expose exact upstream documents without copying them: flagquantum://capabilities/{capability_id}/{version} and flagquantum://schemas/{schema_id}.
Three prompts: build_and_analyze_circuit, compile_for_topology, export_circuit.
These are recipes for the clients that present them to a person — Claude Desktop, the MCP Inspector, a host that turns them into slash commands. An autonomous agent may receive none of them: several recorded sessions could not enumerate them at all, and reported that they could not tell whether prompts existed. So nothing an agent has to know lives only here. Every constraint the prompts state is also in a tool summary, or in the server instructions, or in a resource — the QCIS refusal and the "say what you assumed" rule were the two exceptions, and they are in emit_qcis_tool and bind_parameters_tool now. PROMPT_CONSTRAINTS in tests/test_server_contract.py keeps that true.
pip install flagquantum-mcp-server
This pulls flagquantum, which depends on torch.
claude mcp add flagquantum -- uvx flagquantum-mcp-server
{
"mcpServers": { "flagquantum": { "command": "uvx", "args": ["flagquantum-mcp-server"] } } }
npx @modelcontextprotocol/inspector uvx flagquantum-mcp-server
A client that launches a process — Claude Code, Claude Desktop, the Inspector — uses the default stdio transport and needs nothing below. A client that instead *connects* to servers, such as a gateway holding several of them, needs the server to listen:
flagquantum-mcp-server --transport http --host 0.0.0.0 --port 8105 \
--allowed-host quantum-mcp:8105
The endpoint is /mcp on that host and port, and it speaks Streamable HTTP.
| Flag | Default | Meaning |
|---|---|---|
--transport | stdio | stdio or http. The default is unchanged, so nothing that already works needs editing |
--host | 127.0.0.1 | Interface to bind. Loopback by default: the server does not become reachable by accident |
--port | 8105 | Port to bind |
--allowed-host | none | A Host header the server will answer, repeatable |
--allowed-origin | none | A browser Origin the server will answer, repeatable |
Binding a non-loopback interface requires `--allowed-host`. Without it the server refuses to start rather than listen on every interface with nothing checking who reaches it:
$ flagquantum-mcp-server --transport http --host 0.0.0.0
usage: flagquantum-mcp-server [-h] ... flagquantum-mcp-server: error: --host 0.0.0.0 is not a loopback address, so the server would answer any Host header that reaches it. Name the hosts it should answer with --allowed-host HOST[:PORT], or bind 127.0.0.1.
Passing any --allowed-host or --allowed-origin turns host validation on; a request carrying an unlisted Host is answered 421 Misdirected Request. Loopback hosts are always answered, so enabling validation cannot lock out a local client.
Two things worth knowing if you are wiring this up:
Host is answered 200 with the keyword and 421 through the settings path.Two input formats are accepted, both of them FlagQuantum's own serialization.
`ir` (canonical) — FlagQuantum IR JSON, as produced by CircuitIR.to_json(). Versioned, hashable, and rejected if it carries unknown fields:
{
"kind": "flagquantum.circuit_ir", "version": "1.0", "n_wires": 2, "dtype": "complex64", "shape": [4], "instructions": [ {"opcode": "h", "wires": [0], "params": {}, "matrix": null, "metadata": {}}, {"opcode": "cx", "wires": [0, 1], "params": {}, "matrix": null, "metadata": {}} ], "observables": [], "measurements": [], "metadata": {} }
`qir` (convenience) — the compact gate list from Circuit.to_qir(), easier to write by hand:
[{"name": "h", "index": [0]}, {"name": "cx", "index": [0, 1]}]
A gate carries its arguments under `parameters`, which the example above never shows because neither gate takes one:
[{"name": "rz", "index": [0], "parameters": {"theta": 0.5}}]
The two formats use different key names, and this is the most common mistake: the gate list calls a gate name and its wires index, while serialized IR calls them opcode and wires. Sending IR keys as qir is rejected with a message that says so by name. An empty gate list is also rejected, because the wire count is inferred from the highest index — an empty list describes no circuit. A bare integer is accepted for a single-wire gate ("index": 0 means "index": [0]).
Either format can be passed to any tool; serialize_circuit_tool converts qir into canonical ir.
One more naming trap: an IR payload's version field is spelled `version`, and sending ir_version instead is rejected as an unknown key — but tool results report that same field as ir_version. The payload key and the reported key are not spelled the same way.
circuit_format is a closed set — the JSON schema publishes "enum": ["ir", "qir"], so a wrong value is rejected before any tool body runs. OpenQASM text is not a supported input. FlagQuantum ships emitters but no QASM parser, so there is nothing to convert it with; a caller holding OpenQASM has to load it into FlagQuantum itself and send the resulting IR.
A gate parameter is either a number or a symbol, and a symbol is written as a one-key object naming it:
{"name": "ry", "index": [0], "parameters": {"theta": {"$parameter": "theta"}}}
This works in both input formats. A symbol is what makes a circuit an ansatz: inspect_parameters_tool reports it, and bind_parameters_tool substitutes a number for it.
A bare string is not a symbol. {"theta": "theta"} is a value, not a reference; the SDK stores it as one, so the circuit reports itself as unparameterized. Nothing else complains: draw_circuit_tool prints the value it was handed, and a string prints as RY(theta) — indistinguishable from a real symbol — while plan_execution_tool plans the circuit for execution. So the input boundary rejects it, along with a misspelled marker ({"$unknown": ...}) and a non-string symbol name, naming the gate and the parameter. The other encodings a parameter may carry are $expression, $complex and $tensor; a mapping carrying none of those four keys is rejected for the same reason. The flagquantum://ir-schema resource carries a worked parameter_example.
One rough edge, inherited from the SDK: a *real* symbol is rendered as the SDK's repr of it, so RY(theta) appears as RY(Parameter(name='theta')). FlagQu
只显示了开头部分;其余内容请在仓库中阅读