Skip to main content

openquantum-mcp

Model Context Protocol (MCP) server for Open Quantum.

Any MCP-compatible client (Claude, Cursor, VS Code, Grok, and others) can discover backends, submit quantum jobs, wait for completion, and summarize results using your Open Quantum SDK credentials.

One stdio server, standard MCP tools — nothing client-specific in the package.

Docs: docs.openquantum.com/mcp

Install

pip install openquantum-sdk openquantum-mcp

Requires Python 3.10+. openquantum-mcp depends on openquantum-sdk and installs it if needed:

pip install openquantum-mcp

Verify without starting the stdio server:

python -c "import openquantum_mcp; print(openquantum_mcp.__version__)"
python -m openquantum_mcp --version
python -m openquantum_mcp --help

Authentication

Use the same SDK key credentials as the Core SDK (portal SDK keys):

Variable Meaning
OPENQUANTUM_CLIENT_ID SDK key client id
OPENQUANTUM_CLIENT_SECRET SDK key secret
OPENQUANTUM_SDK_KEY Path to JSON key file (client_id + client_secret)

If OPENQUANTUM_SDK_KEY is set but the file is missing, startup/auth fails with a clear path error (no silent fallback).

Optional configuration:

Variable Default Meaning
OPENQUANTUM_MCP_MAX_CREDITS 10 Hard cap on estimated credits per job
OPENQUANTUM_MCP_WAIT_TIMEOUT_SECONDS 600 Default wait_for_job timeout when the tool arg is omitted
OPENQUANTUM_MCP_POLL_INTERVAL_SECONDS 5 Default wait_for_job poll interval when omitted
OPENQUANTUM_MCP_PREP_TIMEOUT_SECONDS 300 Job preparation wait timeout
OPENQUANTUM_MCP_DEFAULT_SHOTS 128 Default shots when omitted
OPENQUANTUM_MCP_DEFAULT_SUBCATEGORY oth:oth Default job subcategory
OPENQUANTUM_MCP_MAX_RESULT_RAW_CHARS 8000 Cap on raw result text
OPENQUANTUM_MCP_MAX_CALIBRATION_RAW_CHARS 8000 Cap on raw calibration text
OPENQUANTUM_MANAGEMENT_BASE production Override management API base URL
OPENQUANTUM_SCHEDULER_BASE production Override scheduler API base URL
OPENQUANTUM_KEYCLOAK_BASE production Override Keycloak base URL
OPENQUANTUM_KEYCLOAK_REALM platform Keycloak realm

Run

export OPENQUANTUM_CLIENT_ID=...
export OPENQUANTUM_CLIENT_SECRET=...
python -m openquantum_mcp
# or
openquantum-mcp

MCP client configuration

Point your client at a Python environment where openquantum-mcp is installed, and pass credentials in the server env. Exact config file locations differ by host; the process definition is the same:

{
  "mcpServers": {
    "openquantum": {
      "command": "python",
      "args": ["-m", "openquantum_mcp"],
      "env": {
        "OPENQUANTUM_CLIENT_ID": "...",
        "OPENQUANTUM_CLIENT_SECRET": "..."
      }
    }
  }
}

Prefer an absolute path to python if the client does not inherit your shell PATH (for example, /path/to/venv/bin/python).

Tools

Tool Purpose
list_organizations Organizations for the account
get_credits Spark and Full credit balances
list_backends / get_backend Discover devices
list_job_categories Categories and subcategories
prepare_job Upload circuit and return a quote (no spend)
submit_job Create a job (does not wait for completion)
get_job / list_jobs Job status
wait_for_job Poll until terminal status or timeout
get_job_results Compact output summary
get_job_calibration Calibration data on demand
cancel_job Cancel when allowed by platform rules

prepare_job / submit_job accept execution_plan (auto / public / private / UUID) and queue_priority (auto / standard / priority / instant / UUID). Auto plan selection prefers Public so Spark can apply. Quotes include quote_summary with per-priority pricing.

Security: file_path is read by the MCP process and uploaded; prefer qasm strings when possible and least-privilege process accounts.

Spend policy

  1. Estimated cost greater than 10 credits (configurable) → rejected.
  2. Cost 0 → allowed.
  3. Public plan and Spark ≥ cost → auto-approved.
  4. Spend that would use Full credits → requires confirm_spend=true.

Default job subcategory: oth:oth. Jobs are tagged submitted_with=mcp.

Example agent flow

  1. list_backends / get_credits
  2. prepare_job with OpenQASM → review quote
  3. submit_job (with confirm_spend=true when required)
  4. wait_for_job (re-call if still queued; QPU queues can be long)
  5. get_job_results
  6. get_job_calibration only if needed

License

Apache-2.0

Metadata

Release files for openquantum-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openquantum-mcp 0.1.0
File Size Uploaded
openquantum_mcp-0.1.0.tar.gz 23.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openquantum-mcp 0.1.0
File Interpreter ABI Platform
openquantum_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.1 kB

Release files / openquantum_mcp-0.1.0.tar.gz

Download URL openquantum_mcp-0.1.0.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6bb9d3d3d1bfde1c227945eae3371163309c779908688160e323f335bf0b8a22
BLAKE2b-256 checksum
How to use checksums
0106269e63f8c4960eb414a2cb5c6ec891c8740cdd18c56d8381aa5fe6867d86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / openquantum_mcp-0.1.0-py3-none-any.whl

Download URL openquantum_mcp-0.1.0-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cce3d41ad253607f885aee0e8bb1da6cf40a9e8e0095ead8543136126636eacc
BLAKE2b-256 checksum
How to use checksums
996e2a2f2e883848422fb27d7c32d770756dc8e1a362a1ce2c06868569590183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page