Model Context Protocol servers for IBM Quantum services and Qiskit
Project description
Qiskit MCP Servers
A collection of Model Context Protocol (MCP) servers that provide AI assistants, LLMs, and agents with seamless access to IBM Quantum services and Qiskit libraries for quantum computing development and research.
🌟 What is This?
This repository contains production-ready MCP servers that enable AI systems to interact with quantum computing resources through Qiskit. Instead of manually configuring quantum backends, writing boilerplate code, or managing IBM Quantum accounts, AI assistants can now:
- 🤖 Generate intelligent quantum code with context-aware suggestions
- 🔌 Connect to real quantum hardware automatically
- 📊 Analyze quantum backends and find optimal resources
- 🚀 Execute quantum circuits and monitor job status
- 💡 Provide quantum computing assistance with expert knowledge
🛠️ Available Servers
🧠 Qiskit Code Assistant MCP Server
Intelligent quantum code completion and assistance
Provides access to IBM's Qiskit Code Assistant AI for intelligent quantum programming
📁 Directory: ./qiskit-code-assistant-mcp-server/
⚙️ Qiskit IBM Runtime MCP Server
Complete access to IBM Quantum cloud services
Comprehensive interface to IBM Quantum hardware via Qiskit IBM Runtime
📁 Directory: ./qiskit-ibm-runtime-mcp-server/
🚀 Quick Start
Prerequisites
- Python 3.10+ (3.11+ recommended)
- uv package manager (fastest Python package manager)
- IBM Quantum account and API token
- Qiskit Code Assistant access (for code assistant server)
Installation
Install from PyPI
# Install all MCP servers at once
pip install qiskit-mcp-servers
# Or install individual servers
pip install qiskit-code-assistant-mcp-server
pip install qiskit-ibm-runtime-mcp-server
Install from Source
Each server is designed to run independently. Choose the server you need:
🧠 Qiskit Code Assistant Server
cd qiskit-code-assistant-mcp-server
uv run qiskit-code-assistant-mcp-server
⚙️ IBM Runtime Server
cd qiskit-ibm-runtime-mcp-server
uv run qiskit-ibm-runtime-mcp-server
🔧 Configuration
Environment Variables
# For IBM Runtime Server
export QISKIT_IBM_TOKEN="your_ibm_quantum_token_here"
# For Code Assistant Server
export QISKIT_IBM_TOKEN="your_ibm_quantum_token_here"
export QCA_TOOL_API_BASE="https://qiskit-code-assistant.quantum.ibm.com"
Using with MCP Clients
Both servers are compatible with any MCP client. Test interactively with MCP Inspector:
# Test Code Assistant Server
npx @modelcontextprotocol/inspector uv run qiskit-code-assistant-mcp-server
# Test IBM Runtime Server
npx @modelcontextprotocol/inspector uv run qiskit-ibm-runtime-mcp-server
🏗️ Architecture & Design
🎯 Unified Design Principles
Both servers follow a consistent, production-ready architecture:
- 🔄 Async-first: Built with FastMCP for high-performance async operations
- 🧪 Test-driven: Comprehensive test suites with 65%+ coverage
- 🛡️ Type-safe: Full mypy type checking and validation
- 📦 Modern packaging: Standard
pyproject.tomlwith hatchling build system - 🔧 Developer-friendly: Automated formatting (ruff), linting, and CI/CD
🔌 MCP Protocol Support
Both servers implement the full Model Context Protocol specification:
- 🛠️ Tools: Execute quantum operations (code completion, job submission, backend queries)
- 📚 Resources: Access quantum data (service status, backend information, model details)
- ⚡ Real-time: Async operations for responsive AI interactions
- 🔒 Secure: Proper authentication and error handling
🧪 Development
🏃♂️ Running Tests
# Run tests for Code Assistant server
cd qiskit-code-assistant-mcp-server
./run_tests.sh
# Run tests for IBM Runtime server
cd qiskit-ibm-runtime-mcp-server
./run_tests.sh
🔍 Code Quality
Both servers maintain high code quality standards:
- ✅ Linting:
ruff checkandruff format - 🛡️ Type checking:
mypy src/ - 🧪 Testing:
pytestwith async support and coverage reporting - 🚀 CI/CD: GitHub Actions for automated testing
📖 Resources & Documentation
🔗 Essential Links
- Model Context Protocol - Understanding MCP
- Qiskit IBM Runtime - Quantum cloud services
- Qiskit Code Assistant - AI code assistance
- MCP Inspector - Interactive testing tool
- FastMCP - High-performance MCP framework
AI Development Assistant Support
This repository includes AI-generated code and offers comprehensive guidance for AI coding assistants (like IBM Bob, Claude Code, GitHub Copilot, Cursor AI, and others) in AGENTS.md. This helps AI assistants provide more accurate, context-aware suggestions when working with this codebase.
📄 License
This project is licensed under the Apache License 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qiskit_mcp_servers-0.1.0.tar.gz.
File metadata
- Download URL: qiskit_mcp_servers-0.1.0.tar.gz
- Upload date:
- Size: 382.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e1af495bd949844689d858316057c95cc609efb7a154c8dabb44ec5a0a047a3
|
|
| MD5 |
bab3e2349d50c0f4998ff2a2022c7777
|
|
| BLAKE2b-256 |
d5b66e2ce80610f981c89f81103bde0e97d8612d9e56a9f9cb38f525ddf96781
|
File details
Details for the file qiskit_mcp_servers-0.1.0-py3-none-any.whl.
File metadata
- Download URL: qiskit_mcp_servers-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b2e33071e26c93f62fdf702555dd9d59cb9331a753d516d298bfd866d2624d4
|
|
| MD5 |
ee020228efc2c71b86b020bf9fa2f2af
|
|
| BLAKE2b-256 |
6bdf3240c0b855367fde8fda7e788e73b3c0dcaeb8ca2595a9ac78e1da48a927
|