qca-agent-mcp
Exposes eight QCA (quantum calibration) tools via a standards-based MCP stdio server for MCP-compatible agents to interact with backend status, experiments, schemas, parameters, dry-runs, history, and arrays.
README
QCA OpenCode Plugin
This package adds the QCA quantum-calibration toolset to an unmodified official OpenCode installation. It replaces the previous approach that patched and rebuilt OpenCode Desktop.
What it provides
- Eight OpenCode tools: backend status, experiment discovery, schema lookup, parameter validation, dry-run, history lookup, array listing, and array read.
- A standards-based MCP stdio server exposing the same eight QCA tools for other MCP-compatible agents.
- A dependency-free Python QCA mini backend that the plugin starts and stops.
- A remote mode for connecting the same tools to another QCA implementation that exposes the compatible HTTP contract.
- Global and project-local installation scripts for Windows, macOS, and Linux.
The bundled backend is still a deterministic dry-run simulator. It does not connect to quantum hardware.
Requirements
- OpenCode 1.17.18 or later.
- Python 3.10 or later available as
python3,python, or Windowspy -3.
No Docker, FastAPI, Uvicorn, or OpenCode source build is required.
Install
Windows
cd qca-opencode-plugin
powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1
For only the current project:
powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1 -Scope Project
macOS or Linux
cd qca-opencode-plugin
chmod +x scripts/install.sh
./scripts/install.sh global
Use project instead of global to install into the current project's
.opencode directory.
Restart OpenCode after installation and ask:
Call qca_backend_status, then list all QCA experiments.
Other Agents via MCP
The OpenCode plugin is still the best path for OpenCode itself. For other agents, use the MCP entry point:
bun ./mcp-server.ts
MCP clients should configure this package as a stdio server. Use the absolute path on your machine:
{
"mcpServers": {
"qca": {
"command": "bun",
"args": [
"D:/StudyFiles/w/Intern/gitee-publish/qca-opencode-plugin/mcp-server.ts"
],
"env": {
"QCA_PYTHON": "python"
}
}
}
}
After connecting, the client will see the same tools:
qca_backend_statusqca_list_experimentsqca_get_schemaqca_validate_paramsqca_run_dry_runqca_history_showqca_list_arraysqca_get_array
For production or a real lab backend, set QCA_BASE_URL and the MCP server
will call that external service instead of starting the bundled Python dry-run
backend:
{
"mcpServers": {
"qca": {
"command": "bun",
"args": [
"D:/StudyFiles/w/Intern/gitee-publish/qca-opencode-plugin/mcp-server.ts"
],
"env": {
"QCA_BASE_URL": "http://127.0.0.1:8000"
}
}
}
}
Uninstall
Windows:
powershell -ExecutionPolicy Bypass -File .\scripts\uninstall.ps1
macOS or Linux:
./scripts/uninstall.sh global
Use Project or project to remove a project-local installation. Experiment
history is intentionally left in the data directory, so uninstalling or
upgrading the plugin does not delete results.
Runtime modes
Managed local backend
This is the default. The plugin finds Python, starts the bundled server on
127.0.0.1 with a dynamic port, waits for /health, and terminates the child
process through the OpenCode plugin dispose() hook.
Data is stored outside the OpenCode installation:
- Windows:
%LOCALAPPDATA%\qca-opencode-plugin\data - macOS:
~/Library/Application Support/qca-opencode-plugin/data - Linux:
${XDG_DATA_HOME:-~/.local/share}/qca-opencode-plugin/data
QCA_DATA_DIR overrides all defaults. XDG_DATA_HOME is also honored on every
platform. Set QCA_PYTHON to an absolute Python executable when automatic
discovery is not appropriate.
External QCA backend
Set QCA_BASE_URL before starting OpenCode:
QCA_BASE_URL=http://127.0.0.1:8000 opencode
In this mode, the plugin does not start Python. This is the migration point for the real QCA backend, a remote lab service, or a containerized deployment.
Configured plugin options can also be used when the package is published:
{
"plugin": [
[
"@black-jony/qca-opencode-plugin",
{
"baseUrl": "http://127.0.0.1:8000"
}
]
]
}
Test
bun install
bun test ./tests/plugin.test.ts ./tests/mcp.test.ts
python tests\test_backend.py
The automated tests exercise all eight tools through both the OpenCode plugin entry point and the MCP stdio entry point, then repeat the backend contract against the installed directory layout.
Then run the OpenCode acceptance flow:
qca_backend_statusqca_list_experimentsqca_get_schemaforqubit_spectroscopy- Validate
{"qubit":"Q0","center_freq":9.0} - Dry-run
qubit_spectroscopyforQ0 - List arrays using the returned experiment ID
- Read the
frequenciesarray - Read the complete history result
Security boundary
The plugin improves modularity, dependency isolation, and API capability boundaries. It is not an operating-system sandbox. The plugin and its Python child process run with the current user's permissions. For real hardware, authentication, explicit execution approval, audit logging, and a dedicated worker sandbox remain required.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.