# FlagQuantum MCP Server

> FlagQuantum MCP Server is an MCP server for developer tools. Build, compile, simulate and export quantum circuits locally, with no network access. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, macOS, Windows, Linux, Self-hosted
- **Repository:** https://github.com/flagquantum/mcp-servers/tree/HEAD/flagquantum-mcp-server
- **MCP Registry name:** io.github.FlagQuantum/flagquantum-mcp-server
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [engineering simulation](https://ai-powered.com/categories/engineering-simulation)
- **Listing updated:** 2026-11-15

## About

The defining constraint is that nothing leaves the process. The README stresses that every tool runs locally, with no credentials, no outbound network access, and no hardware submission, and that the server never calls a provider or reads a token. It can optionally listen over Streamable HTTP for gateways, and binding a non-loopback address requires naming allowed hosts or it refuses to start.

It wraps the FlagQuantum SDK for circuit work: inspecting gate counts and depth, binding parameters, optimizing, compiling and routing across line, ring, grid or custom topologies, and emitting OpenQASM or QCIS. It can also run local statevector simulations, Lindblad evolution, and parameter training against a Pauli-sum Hamiltonian. A set of research capability tools returns Evidence Bundles that can be validated afterwards.

Default limits are 24 qubits, 10,000 gates and 262,144 bytes of serialized circuit, each adjustable by environment variable. It installs from PyPI, pulls in the flagquantum package (which depends on torch), and also offers three prompts and several resources such as the gate set and IR schema.

## Features

- **Local-only execution:** Runs in-process with no credentials, no outbound network and no hardware submission.
- **Compile and route:** Optimizes circuits and compares line, ring, grid and custom topologies.
- **OpenQASM and QCIS export:** Emits OpenQASM 2.0 or 3.0 and QCIS, and imports OpenQASM.
- **Local simulation:** Statevector runs and Lindblad evolution on your machine.
- **Evidence validation:** Research operations return Evidence Bundles that can be checked.
- **Configurable limits:** Caps on qubits, gates and payload size via environment variables.

## Good for

- Build and analyze a circuit with an assistant
- Find which topology is cheapest for a circuit
- Export a circuit to OpenQASM or QCIS
- Simulate small circuits locally for counts or expectation values
- Train circuit angles against a Hamiltonian

## Install

### Claude Code (Terminal)

```sh
claude mcp add flagquantum-mcp-server -- uvx flagquantum-mcp-server
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "flagquantum-mcp-server": {
      "command": "uvx",
      "args": [
        "flagquantum-mcp-server"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "flagquantum-mcp-server": {
      "command": "uvx",
      "args": [
        "flagquantum-mcp-server"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "flagquantum-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "flagquantum-mcp-server"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "flagquantum-mcp-server": {
      "command": "uvx",
      "args": [
        "flagquantum-mcp-server"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "flagquantum-mcp-server": {
      "command": "uvx",
      "args": [
        "flagquantum-mcp-server"
      ]
    }
  }
}
```

## Tools

- `describe_gate_set_tool`: Wire count, parameter names and aliases for named gates.
- `analyze_circuit_tool`: Gate counts, depth, wire usage and two-qubit gate count.
- `describe_layers_tool`: Which gates run concurrently.
- `serialize_circuit_tool`: Canonical IR JSON plus its content hash.
- `deserialize_circuit_tool`: Checks IR validity and round-trip.
- `inspect_parameters_tool`: Shows whether a circuit is parameterized and where symbols sit.
- `bind_parameters_tool`: Binds symbols to numbers.
- `optimize_circuit_tool`: Target-independent optimization.
- `compile_circuit_tool`: Full optimize-and-route pipeline.
- `route_circuit_tool`: Routing cost on a line, ring, grid or custom topology.
- `compare_topologies_tool`: Compares connectivity cost for a circuit.
- `describe_topology_tool`: Connectivity and distances between wires.
- `emit_openqasm_tool`: OpenQASM 2.0 or 3.0 text.
- `import_openqasm_tool`: FlagQuantum IR from OpenQASM text.
- `emit_qcis_tool`: QCIS text.
- `draw_circuit_tool`: ASCII diagram of the circuit.
- `plan_execution_tool`: Execution mode, device and memory plan.
- `plan_evolution_tool`: Validates and sizes a Lindblad evolution without running it.
- `simulate_circuit_tool`: Local statevector run returning counts, samples, probabilities or an expectation value.
- `evolve_dynamics_tool`: Local Lindblad evolution results.
- `train_parameters_tool`: Finds angles that lower energy against a Pauli-sum Hamiltonian.
- `search_capabilities_tool`: Searches approved local research operations.
- `describe_capability_tool`: Shows one operation's request, result and validators.
- `estimate_capability_tool`: Estimates local support and resource bounds.
- `validate_capability_input_tool`: Validates a typed request.
- `execute_local_capability_tool`: Runs local provider execution and returns an Evidence Bundle.
- `validate_evidence_tool`: Checks an Evidence Bundle.

## FAQ

### Does FlagQuantum MCP Server send anything over the network?

No. The README says it makes no outbound network calls and reads no credentials.

### What are the default limits?

24 qubits, 10,000 gates and 262,144 bytes of serialized circuit, all configurable.

### How do I install FlagQuantum MCP Server?

pip install flagquantum-mcp-server, or run it with uvx. It pulls in flagquantum, which depends on torch.

### Can FlagQuantum MCP Server run over HTTP?

Yes, with --transport http. A non-loopback host requires --allowed-host.

### Can FlagQuantum MCP Server submit to quantum hardware?

No. Hardware submission is explicitly excluded.

### How do I add FlagQuantum MCP Server to Claude Code?

Run this command in your terminal: claude mcp add flagquantum-mcp-server -- uvx flagquantum-mcp-server

### What are the best alternatives to FlagQuantum MCP Server?

The closest alternatives to FlagQuantum MCP Server are WAI Quantum, WAI Quantum job service, Qualien MCP, Qai Consultant MCP and Broadside.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [WAI Quantum](https://ai-powered.com/mcp/wai-quantum): WAI Quantum is a free MCP server for engineering simulation.
- [WAI Quantum job service](https://ai-powered.com/mcp/wai-quantum-job-service): WAI Quantum job service is a free MCP server for engineering simulation.
- [Qualien MCP](https://ai-powered.com/mcp/qualien-mcp): Qualien MCP is an open-source MCP server for developer tools.
- [Qai Consultant MCP](https://ai-powered.com/mcp/qai-consultant-mcp): Qai Consultant MCP is an open-source MCP server for developer tools.
- [Broadside](https://ai-powered.com/mcp/broadside): Broadside is an open-source MCP server for developer tools.
- [QDev](https://ai-powered.com/mcp/qdev): QDev is an MCP server for developer tools.
- [DAQiFi](https://ai-powered.com/mcp/daqifi): DAQiFi is an open-source MCP server for engineering simulation.
- [NEOMA P-CAM Physical AI & Ising MCP Server](https://ai-powered.com/mcp/neoma-p-cam-physical-ai-and-ising-mcp-server): NEOMA P-CAM Physical AI & Ising MCP Server is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/flagquantum-mcp-server
