MCP Server (AI Agent Integration)#
SQuADDS includes a built-in Model Context Protocol (MCP) server that lets AI coding assistants interact with the entire database — searching designs, interpolating parameters, and exploring components — through a standardized protocol.
Agent Setup (Copy-Paste Prompt)#
If you’re using an AI coding assistant (Claude, Cursor, Copilot, Gemini, Codex), just paste this prompt to have it set up SQuADDS MCP for you:
I need you to set up the SQuADDS MCP server so I can access the superconducting
qubit design database through you. Here's what to do:
1. Clone the repo and install:
git clone https://github.com/LFL-Lab/SQuADDS.git
cd SQuADDS
uv sync --extra mcp
2. Add the MCP server to your config. The command to run the server is:
uv run --directory /path/to/SQuADDS squadds-mcp
3. Once connected, read the `squadds://guide` resource for a quick overview
of available tools.
The server exposes these key tools:
- `list_components` / `list_datasets` — explore the database
- `find_closest_designs` — find designs matching target Hamiltonian parameters
- `interpolate_design` — get physics-interpolated designs
- `get_hamiltonian_param_keys` — discover valid search parameters
Typical target parameter ranges:
- qubit_frequency_GHz: 3–8
- anharmonicity_MHz: −500 to −50
- cavity_frequency_GHz: 5–12
- kappa_kHz: 10–1000
- g_MHz: 10–200
Please set this up and confirm you can access the SQuADDS tools.
Manual Setup#
Install#
git clone https://github.com/LFL-Lab/SQuADDS.git
cd SQuADDS
uv sync --extra mcp
Run#
# stdio mode (for local AI assistants)
uv run squadds-mcp
# HTTP mode (for networked/remote usage)
SQUADDS_MCP_TRANSPORT=streamable-http uv run squadds-mcp
AI Client Configuration#
Claude Desktop#
Add to claude_desktop_config.json:
{
"mcpServers": {
"squadds": {
"command": "uv",
"args": ["run", "--directory", "/path/to/SQuADDS", "squadds-mcp"]
}
}
}
Claude Code#
claude mcp add squadds -- uv run --directory /path/to/SQuADDS squadds-mcp
Cursor#
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"squadds": {
"command": "uv",
"args": ["run", "--directory", "/path/to/SQuADDS", "squadds-mcp"]
}
}
}
VS Code (Copilot)#
Add to .vscode/settings.json:
{
"mcp": {
"servers": {
"squadds": {
"command": "uv",
"args": ["run", "--directory", "/path/to/SQuADDS", "squadds-mcp"]
}
}
}
}
Antigravity / Gemini CLI#
Add to ~/.gemini/settings.json (or project-level .gemini/settings.json):
{
"mcpServers": {
"squadds": {
"command": "uv",
"args": ["run", "--directory", "/path/to/SQuADDS", "squadds-mcp"]
}
}
}
OpenAI Codex CLI#
codex --mcp-config mcp.json
With mcp.json:
{
"mcpServers": {
"squadds": {
"command": "uv",
"args": ["run", "--directory", "/path/to/SQuADDS", "squadds-mcp"]
}
}
}
Available Tools#
Database Tools#
Tool |
Description |
Key Parameters |
|---|---|---|
|
List supported component types |
— |
|
List component names for a type |
|
|
List all dataset configurations |
— |
|
Overview of all datasets |
— |
|
Dataset metadata (features, size) |
|
|
Load dataset rows (paginated) |
|
|
All experimental devices |
— |
|
Simulation results for a device |
|
|
Enabled / available |
— |
|
Enable an extra source ( |
|
|
Disable an extra source |
|
Analysis Tools#
Tool |
Description |
Key Parameters |
|---|---|---|
|
Valid target parameter keys |
|
|
Primary search tool — find closest designs ( |
|
|
Closest single-component designs ( |
|
Interpolation Tools#
Tool |
Description |
Key Parameters |
|---|---|---|
|
Physics-scaled interpolated design |
|
Contribution Tools#
Tool |
Description |
Key Parameters |
|---|---|---|
|
Reference experimental device info |
|
|
Fabrication recipe for a device |
|
|
All data contributors |
— |
Hosted ML API tools#
list_hosted_ml_models lists the models the SQuADDS ML API serves (GET /v1/models, with each model’s inputs and
units) and predict_with_hosted_ml_model runs one with JSON inputs and options. No [ml] extra is needed. See
Hosted inference models.
Planar Capacitance Tools#
Running a model needs the optional ML extra (pip install "squadds[ml]"); without it the tools return an install hint.
Start with
the resource squadds://planar-capacitance-guide; details in ML Models.
Tool |
Description |
Key Parameters |
|---|---|---|
|
Released planar capacitance models ( |
— |
|
Full N x N Maxwell capacitance matrix (fF, ground first) from a GDS layout, with physical checks and timing; other
substrates solve the prior at the stack (QCap; QCap-Fast rescales and warns), see ML Models; ground and
conductors on one layer: the ground is detected automatically ( |
|
|
Query the planar capacitance dataset by family, conductor count or split |
|
|
Units, Maxwell signs, layer map, training stack and the off-stack routes, models and physics priors |
— |
|
Validate a local capacitance data contribution folder before opening a pull request |
|
|
Physics-only Maxwell matrix of a GDS (optimized or coarse thin-film prior), a baseline for the model; returns each solve, the ground detection and the warnings |
|
|
The conductors and ground a prediction would read, without predicting: count, areas, ground area in the file vs read, numbered pieces and the detected ground for one-layer files, optional PNG |
|
|
One dataset design in detail: options, Q3D solve with QC flags and convergence, label, adaptive passes, stored priors, GDS path |
|
|
Dataset designs geometrically closest to a design (pooled embedding; not a capacitance distance) |
|
Design: component, GDS and Hamiltonian#
Tool |
Description |
Key Parameters |
|---|---|---|
|
Families, Qiskit Metal classes, SQuADDS configs, net names; default options of one class |
|
|
Component class + options -> GDS in the dataset export (returns the path and a layout readback) |
|
|
Component class + options -> Maxwell matrix with SQuADDS net names ( |
|
|
Maxwell matrix (or a GDS) -> C_sigma, C_g, E_C, E_J/E_C, L_j, f_q, alpha, g (grounded or floating transmon) |
|
|
Two coupled transmons + two half-wave resonators (the two-transmon example): targets (f_q, eta, f_r, kappa, J, chi) -> E_J, E_C, L_J, g, J and the target 5 x 5 Maxwell matrix (full Hamiltonian, no RWA); evaluates a predicted layout matrix; resonator lines 50 ohm (fixed) |
|
|
The two-Xmon layout (gap or interdigital coupler) -> GDS, optionally with its predicted Maxwell matrix (outside the trained families) and a ground-area check |
|
|
A SQuADDS half-wave row adapted to your claw (the two-transmon example’s resonator step): the row’s claw capacitance (predicted), resonator length and kappa |
|
Training, scoring and label QC#
Long runs never execute inside the server: plan_capacitance_training writes a driver and a generic SLURM script for your own compute. In-process work is bounded (16 designs for shards, 500 steps for a smoke fit, 20 layouts for end-to-end scoring).
Tool |
Description |
Key Parameters |
|---|---|---|
|
Label QC of a Q3D |
|
|
A few GDS + labels -> training shards (embedding + physics priors) |
|
|
Driver + SLURM scripts for |
|
|
Short in-process fit (<= 500 steps) to check a shard dir end to end |
|
|
Validation score: median % with MAE and RMSE in fF, per family, with time, machine, threads (test scoring refused) |
|
Contributing data and models#
Every outward-facing tool is a dry run by default; a pull request is opened only with dry_run=False and confirm=True.
Tool |
Description |
Key Parameters |
|---|---|---|
|
Copy the contribution template (manifest.yaml, designs.csv, README) to a folder |
|
|
Validate a contribution folder and plan (or, with confirm, open) the dataset pull request |
|
|
Validate a model repository: checkpoints, sha256, metadata, validation score |
|
|
Validate and plan (or, with confirm, open) the model-zoo pull request |
|
Available Resources#
URI |
Description |
|---|---|
|
SQuADDS + MCP server versions |
|
BibTeX citation |
|
Supported component types |
|
Dataset configuration strings |
|
Dataset summary table |
|
Quick reference for AI agents |
|
Planar capacitance models (QCap, QCap-Fast): accuracy (median % with MAE and RMSE in fF), time, conventions, the predict -> Hamiltonian, design, retrain and contribute workflows |
|
Tutorials 11-15 with the MCP tools that reproduce each |
Available Prompts#
Prompt |
Description |
Parameters |
|---|---|---|
|
Step-by-step coupled system design |
Target H-params |
|
Database exploration guide |
— |
|
Natural-language design search |
|
|
GDS -> Maxwell matrix -> transmon Hamiltonian parameters, compared with SQuADDS |
|
|
Design a component of a planar capacitance family to target capacitances (GDS -> predict -> iterate) |
|
|
Retrain on your own data on your own compute (label QC, shards, smoke fit, SLURM plan, scoring) |
|
|
Contribute data or a model through a Hugging Face pull request (dry run first) |
|
|
Two coupled transmons with half-wave readout, targets -> Hamiltonian -> GDS -> prediction -> iteration -> SQuADDS resonators, with the validity caveats (the two-transmon example) |
|
Environment Variables#
Variable |
Default |
Description |
|---|---|---|
|
— |
HuggingFace API token |
|
|
Transport: |
|
|
HTTP host (only for HTTP transport) |
|
|
HTTP port (only for HTTP transport) |
|
|
|
|
— |
Local copy of the planar capacitance dataset |
|
— |
Local planar capacitance model bundle (instead of the Hugging Face download) |
Testing with MCP Inspector#
# Start the server in HTTP mode
SQUADDS_MCP_TRANSPORT=streamable-http uv run squadds-mcp &
# Connect with the Inspector
npx -y @modelcontextprotocol/inspector
# Then connect to http://localhost:8000/mcp
Further Documentation#
Full MCP documentation: MCP_README.md
Developer guide for extending the MCP server: MCP_DEVELOPER_GUIDE.md
Model Context Protocol specification: modelcontextprotocol.io