
Qiskit MCP Server
io.github.QiskitPublished by GitHub account Qiskitv0.3.2Updated Oct 24, 2026
MCP server for Qiskit quantum computing with circuit serialization utilities
Overview
Local MCP server that lets an assistant transpile, analyze and convert Qiskit quantum circuits for hardware targets.
- What you can do
- Transpile circuits with configurable optimization levels, basis gate presets and coupling-map topologies
- Analyze circuit structure, gate counts and depth without transpiling
- Compare results across optimization levels 0-3
- Load circuits from OpenQASM 2.0/3.0 and export or convert between QASM and base64-encoded QPY
- Read reference resources on transpiler capabilities, basis gates and topologies
- When to use it
- Useful when working with quantum circuits and Qiskit: optimizing a circuit for a specific hardware target, checking its depth and gate mix, or picking an optimization level before running it.
- Requirements
- Runs locally over stdio as a Python package (qiskit-mcp-server, launched with uvx or uv run); Python 3.10 or higher and the uv package manager or pip. No accounts, API keys or headers are declared. Optional environment variables QISKIT_MCP_MAX_QUBITS and QISKIT_MCP_MAX_GATES raise the default limits of 100 qubits and 10,000 gates.
Installation
In SourceWeft
- Open Qiskit MCP Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Qiskit MCP Server
A Model Context Protocol (MCP) server that provides quantum circuit transpilation capabilities using Qiskit's pass managers. This server enables AI assistants to optimize quantum circuits for various hardware targets.
Features
- Circuit Transpilation: Transpile quantum circuits with configurable optimization levels (0-3)
- Preset Basis Gates: Support for IBM Eagle, IBM Heron, ion trap, and other basis gate sets
- Topology Support: Built-in support for linear, ring, grid, and custom coupling maps
- Circuit Analysis: Analyze circuit complexity without transpilation
- Optimization Comparison: Compare results across all optimization levels
- Dual API: Supports both async (MCP) and sync (Jupyter, scripts) usage
Prerequisites
- Python 3.10 or higher
- uv package manager (recommended) or pip
Installation
From PyPI (when published)
From Source
Quick Start
Running the MCP Server
Claude Desktop Configuration
Add to your Claude Desktop configuration (claude_desktop_config.json):
Usage Examples
Async Usage (MCP Server / FastAPI)
Using QPY Format
Sync Usage (Scripts, Jupyter)
Compare Optimization Levels
LangChain Integration Example:
Note: To run LangChain examples you will need to install the dependencies:
For more LLM providers (Anthropic, Google, Ollama, Watsonx) and detailed examples including Jupyter notebooks, see the examples/ directory.
API Reference
Tools
Resources
Core Functions
transpile_circuit(circuit, optimization_level=2, basis_gates=None, coupling_map=None, initial_layout=None, seed_transpiler=None, circuit_format="qasm3")
Transpile a quantum circuit using Qiskit's preset pass managers.
Parameters:
circuit: Quantum circuit as QASM3 string, base64-encoded QPY, or QASM2 string (max 100 qubits, 10,000 gates)optimization_level: 0-3 (default: 2)- 0: No optimization, only basis gate decomposition (fastest)
- 1: Light optimization with default layout
- 2: Medium optimization with noise-aware layout (recommended)
- 3: Heavy optimization for best results (can be slow for large circuits)
basis_gates: List of gate names or preset ("ibm_default", "ibm_heron", etc.)coupling_map: List of edges or topology name ("linear", "ring", "grid", "full")initial_layout: List of physical qubit indices (length must match circuit qubits)seed_transpiler: Random seed for reproducibilitycircuit_format: Format of the input circuit ("qasm3" or "qpy"). Defaults to "qasm3". When "qasm3" is specified, QASM2 is also accepted as a fallback.
Returns: Dictionary with original/transpiled circuit info and optimization metrics
Note: Level 3 optimization can be very slow for circuits with >20 qubits or >500 gates. Use level 2 for faster results with good quality.
analyze_circuit(circuit, circuit_format="qasm3")
Analyze circuit structure and complexity.
Returns: Dictionary with gate counts, depth, and categorization (single/two/multi-qubit gates)
compare_optimization_levels(circuit, circuit_format="qasm3")
Compare transpilation results across all optimization levels.
Returns: Dictionary comparing depth, size, and gates for levels 0-3
Circuit Format Support
The server supports two circuit formats for input:
QPY output: All tools return circuits in QPY format (base64-encoded) for precision when chaining tools/servers.
When to use each format:
- QASM3 (input): Best for human-readable circuits and initial input
- QPY (input/output): Best for preserving exact numerical parameters when chaining tools/servers
Converting QPY to Human-Readable QASM3
To view a QPY circuit output in human-readable format, use the qpy_to_qasm3 utility:
Converting QASM3 to QPY
To convert a QASM circuit to QPY format (for full fidelity when chaining tools), use qasm3_to_qpy:
Available Basis Gate Sets
You can also provide a custom list of gate names for other hardware targets.
Available Topologies
Limits and Performance
Circuit Size Limits
To ensure reliable performance, the server enforces the following limits:
Circuits exceeding these limits will return an error with a descriptive message.
You can override these limits via environment variables:
Performance Recommendations
Tips:
- Use level 2 for most use cases (best balance of quality and speed)
- Use level 3 only when circuit quality is critical AND circuit is small (<20 qubits, <500 gates)
- Use level 0 or 1 for rapid prototyping and development
- The
compare_optimization_levelstool helps identify the best level for your specific circuit
Transpilation Stages
The Qiskit transpiler processes circuits through six stages:
- init: Decompose multi-qubit gates to 1 and 2-qubit operations
- layout: Map virtual qubits to physical qubits
- routing: Insert SWAP gates for hardware connectivity
- translation: Convert to target basis gates
- optimization: Reduce gate count and circuit depth
- scheduling: Add timing and delay instructions
Testing
Development
Contributing
Contributions are welcome! Please see the CONTRIBUTING.md guide in the root of the repository.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Source: qiskit-mcp-server/README.md at commit 373be19
Tools
0Version history
2- v0.3.2LatestOct 8, 2026
- v0.3.1Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts