Qiskit MCP Servers
Qiskit MCP Servers is a collection of Model Context Protocol (MCP) servers that integrate quantum computing capabilities into AI systems. These servers enable AI assistants, large language models (LLMs), and agents to access IBM Quantum® services and Qiskit libraries.
This is an open-source project. For the most up-to-date information, detailed API coverage, and advanced configurations, refer to the Qiskit MCP Servers GitHub repository.
When should I use Qiskit MCP Servers?
Qiskit MCP Servers allow AI assistants to help you with quantum computing tasks, such as the following:
- Creating, manipulating, and transpiling quantum circuits
- Answering quantum computing questions directly from reliable sources
- Generating quantum code with contextual awareness
- Optimizing circuits using AI-powered transpilation
- Connecting to real quantum hardware automatically
- Analyzing and selecting optimal quantum backends
- Executing quantum circuits and tracking job status
What is included?
The following MCP servers are available:
Qiskit MCP Server
Provides core quantum computing capabilities for local development. This server enables AI assistants to create, manipulate, and transpile quantum circuits, as well as serialize them to formats like OpenQASM 3 and QPY.
Qiskit Code Assistant MCP Server
Provides intelligent quantum code completion and assistance through the Qiskit Code Assistant. This server integrates the Qiskit Code Assistant capabilities directly into MCP-compatible AI tools.
As with any other feature from Qiskit Code Assistant, this MCP server only works for IBM Quantum Premium Plan users registered on IBM Quantum Platform.
Qiskit Runtime MCP Server
Provides access to IBM Quantum cloud services through Qiskit Runtime. This enables AI assistants to interact with quantum backends, submit jobs, and retrieve results.
Qiskit IBM Transpiler MCP Server
Provides AI-powered circuit optimization through the AI-powered transpiler passes. This server enables AI assistants to optimize quantum circuits using advanced routing and optimization algorithms.
Community servers
The following community-contributed MCP servers are also available:
Qiskit Gym MCP Server
Provides reinforcement learning capabilities for quantum circuit synthesis using the qiskit-gym library. This server enables AI assistants to use RL-based optimization techniques for quantum circuit transpilation and synthesis.
Install Qiskit MCP Servers
To use Qiskit MCP Servers, you need:
- Python 3.10 or later (3.11+ recommended)
- An IBM Quantum account and API token (see Set up your IBM Cloud® account for instructions)
Install all the available Qiskit MCP servers by running the following command from a terminal:
pip install qiskit-mcp-servers[all]You can also install individual MCP servers:
pip install qiskit-mcp-server
pip install qiskit-code-assistant-mcp-server
pip install qiskit-ibm-runtime-mcp-server
pip install qiskit-ibm-transpiler-mcp-server
pip install qiskit-gym-mcp-serverConfigure Qiskit MCP Servers
Set environment variables
Set up the required environment variables for authentication. The Qiskit MCP Server does not require authentication for local use.
For the Qiskit Runtime, Qiskit Code Assistant, or Qiskit IBM Transpiler MCP Servers:
export QISKIT_IBM_TOKEN="<your_token>"You can find your API token in your IBM Quantum account settings.
Configure the MCP client
You can configure an MCP-compatible client (such as Claude Desktop, Cursor, or other AI tools) to use the Qiskit MCP servers. The exact configuration depends on your client. For example, an MCP client configuration file might look like this:
{
"mcpServers": {
"qiskit": {
"command": "qiskit-mcp-server"
},
"qiskit-ibm-runtime": {
"command": "qiskit-ibm-runtime-mcp-server"
},
"qiskit-code-assistant": {
"command": "qiskit-code-assistant-mcp-server"
},
"qiskit-ibm-transpiler": {
"command": "qiskit-ibm-transpiler-mcp-server"
},
"qiskit-gym": {
"command": "qiskit-gym-mcp-server"
}
}
}Refer to your MCP client's documentation for specific configuration instructions.
Test the MCP servers
You can test the MCP servers interactively by using the MCP Inspector:
# Test the Qiskit MCP Server
npx @modelcontextprotocol/inspector qiskit-mcp-server
# Test the Qiskit Runtime MCP Server
npx @modelcontextprotocol/inspector qiskit-ibm-runtime-mcp-server
# Test the Qiskit Code Assistant MCP Server
npx @modelcontextprotocol/inspector qiskit-code-assistant-mcp-server
# Test the Qiskit IBM Transpiler MCP Server
npx @modelcontextprotocol/inspector qiskit-ibm-transpiler-mcp-server
# Test the Qiskit Gym MCP Server
npx @modelcontextprotocol/inspector qiskit-gym-mcp-serverNext steps
- Visit the Qiskit MCP Servers GitHub repository for detailed documentation, API coverage, and examples.
- Learn about Qiskit Code Assistant to understand the AI code completion capabilities.
- Learn about AI-powered transpiler passes to understand the AI-powered circuit optimization capabilities.
- Set up your IBM Quantum account if you haven't already.
- Explore the Model Context Protocol documentation to learn more about MCP.