AI Assistants (MCP Server)
The CppModel MCP server is how AI assistants work with CppModel. It connects an assistant to your workspace, so you can ask it about your simulations in plain language: how the latest runs went, why one failed, what changed since yesterday, where a rule was violated. In a coding agent, it also lets the assistant run simulations as you, and check every result against the recorded run.
https://mcp.cppmodel.com/mcp
It is a standard MCP server (Streamable HTTP), and you sign in to it with your CppModel account. Any MCP client can use it. The plugins for Claude Code and other coding agents build on it: they register this server for you and add step-by-step skills.
What an assistant can do
What an assistant can do depends on whether it can run programs on your machine.
| Chat apps: claude.ai, Claude Desktop, the Claude app's voice mode | Coding agents: Claude Code, OpenAI Codex, GitHub Copilot CLI, Cursor, Gemini CLI | |
|---|---|---|
| Status of your simulations, failed rules, history | Yes | Yes |
| Explain a failure, compare runs, see what changed | Yes | Yes |
| Charts and CSV of signals, with the verification rules drawn | Yes | Yes |
| Live gprintf streams | Yes | Yes |
| Set the inputs and parameters for the next run | Yes | Yes |
| Read and publish workspace documentation | Yes | Yes |
| Build and run simulations, parameter sweeps | No: there is no shell | Yes |
| Write and change simulation and controller code | No | Yes |
A chat app is the quickest way to start: connect it and ask about runs you or your CI already made. To have an assistant write, build and run simulations, use a coding agent, ideally with the plugin.
Connect
You need a CppModel account, free or paid. The server connects to the workspace that belongs to your account:
- Paid plans use their private
w<number>.cppmodel.comworkspace. - Free accounts use the shared
free-workspace.cppmodel.comworkspace, where results are visible to everyone else on the free tier.
Claude Code
The easiest way is to install the CppModel plugin, which registers the server as cppmodel. Without the plugin, add the server yourself:
claude mcp add --transport http cppmodel https://mcp.cppmodel.com/mcp
Then sign in once:
- Run
/mcpin Claude Code. - Select the
cppmodelserver and choose Authenticate. - Sign in with your CppModel account in the browser window that opens.
Claude Code keeps the login and refreshes it, so you do this once per machine. The server uses OAuth, so your password never passes through the assistant.
claude.ai and Claude Desktop
Add CppModel as a custom connector, with the URL https://mcp.cppmodel.com/mcp, in the connector settings. Then connect, and sign in with your CppModel account.
In the connector's settings, set the read-only tools (such as get_briefing, list_simulations and get_latest_result) to Always allow. Otherwise every question asks for approval, which stops a voice conversation.
Other coding agents
The portable CppModel plugin registers the server in OpenAI Codex, GitHub Copilot CLI, Cursor and Gemini CLI (see Plugins). In any other MCP client, add a Streamable HTTP server with the URL above, and sign in with your CppModel account the way that client does it.
Check the connection
Ask:
Which CppModel workspace are you connected to?
At the start of a session the assistant tells you which account and workspace it is signed in to, before its first CppModel call, so you can stop it if it's the wrong one. To switch accounts, clear the server's sign-in in your client and sign in again.
Try these
How are my simulations doing?
Why did the last GarageDoor run fail?
What changed between the last two TempControl runs?
Show me the coil currents of the latest BoomControl run, with the "no motion on a bad signal" rule.
Which simulations haven't been run from a clean commit yet?
The assistant answers from the recorded executions and gives you links to the matching pages in the workspace. A simulation's name doesn't have to be exact: "garage door" finds GarageDoor, and the assistant says which one it used.
Prompts
The server also offers ready-made prompts. In Claude Desktop and claude.ai they are in the connector's menu; in Claude Code they are /mcp__cppmodel__<prompt>.
| Prompt | What it asks |
|---|---|
briefing | How your simulations are doing: what ran last, what passed, what failed |
why-failed | Why the latest run of a simulation failed (give the simulation's name) |
compare-last-runs | What changed between the last two runs of a simulation |
install-plugin | Install or update the CppModel plugin for Claude Code (in Claude Code only) |
Running simulations from a coding agent
A coding agent builds and runs the simulation on your machine, like you would. The server makes sure the run is recorded as your account, and that every result the agent reports comes from a recorded execution:
- The agent asks the server for a short-lived access token (
get_run_token) and passes it to that one run inCPPMODEL_ACCESS_TOKEN. The token is never stored. WithCPPMODEL_LOGIN_TIMEOUT=0, a run that can't sign in fails at once instead of waiting for a browser login. - To run with other inputs or parameters, the agent writes them to a file and passes it with
--inputs. It checks the document withset_inputsanddry_runfirst, so a misspelled name is caught before the run. - The run is recorded in the workspace. The agent reads it back, or a whole parameter sweep in one call (
get_binary_runs), and checks that every value it set was used.
Runs that don't get a token, such as ctest started by you or a CI job, sign in on their own (see Environment variables).
Guides without the plugin
get_guide returns step-by-step instructions for CppModel tasks: the plugin's skills, made readable for any assistant. An assistant without the plugin uses it to follow the same steps, such as setting up a machine or writing a simulation test. Ask for new-project to start a project from nothing.
The topics are new-project, setup-environment, update-dependencies, ci-pipeline, simulation-testing, plant-model, verification, decouple-component, coding-standard, language, documentation, simulations, simulation-inputs, parameter-sweep, gprintf, experiment-design and experiment-reconcile. The guides are read from the published plugin, so they are always the latest version.
Tools
The assistant chooses the tools itself. This list shows what it can do.
Status and history
| Tool | What it does |
|---|---|
get_briefing | How your simulations are doing, in one call: the most recent runs with pass/fail, failed rules and how long ago, and the live gprintf streams |
get_workspace | Which account and workspace the server is connected as, with the workspace's addresses |
list_simulations | Your simulations, or your team's, with execution counts and the latest run; sorted, or filtered to those last run from a clean commit or not |
get_latest_result | The latest execution of a simulation: its inputs, parameters, outputs and verification outcomes |
list_executions | A simulation's execution history, newest first, with the build and commit of each run |
get_execution | One execution by id, or latest or previous |
what_changed | What differs between two executions: whether the code changed, which parameters changed, and which signals were added or removed |
list_builds | The builds that ran, grouped by build fingerprint or git commit |
get_binary_runs | The runs of one build by run index, with pass/fail for each, such as every run of a parameter sweep |
query_executions | Chosen signals and parameters of many executions in one call, by build, commit or simulation, with each run's pass/fail |
Charts and streams
| Tool | What it does |
|---|---|
export_signals | A chart (PNG) or CSV of up to 8 signals of one or several runs, or of a gprintf stream, with the verification rules drawn; with a link to the chart in the workspace, kept 7 days |
get_export | Reads an export again, also one you share as a /snapshots/ link |
list_streams, get_stream | The gprintf streams and the signals of a stream's current run |
Changing things (only when you ask)
| Tool | What it does |
|---|---|
set_inputs | Sets the inputs and parameters for your next execution of a simulation. It doesn't run anything |
get_pending_inputs | Shows the inputs and parameters waiting for your next execution |
get_run_token | A short-lived access token, for a run the assistant starts |
submit_execution | Records an execution no simulation ran, such as measured data |
delete_simulation | Deletes a simulation and its whole history. Irreversible |
Documentation and guides
| Tool | What it does |
|---|---|
list_docs, get_docs | The workspace's documentation projects, and their pages and images |
upload_docs, delete_docs | Publishes or deletes a documentation project. Paid workspaces only |
get_guide | The step-by-step guides |
get_api_version | The Workspace API version |
The server's instructions tell the assistant to change or delete anything only when you ask for it, and to delete only when you ask explicitly. The chat app also asks you to approve tool calls unless you set them to Always allow.
Your code and your data
The server works with your workspace, not with your code. It reads and writes simulation results, inputs, parameters and documentation, as your account and nothing more. Your source code stays on your machine: a coding agent builds and runs simulations there. What you share with the AI assistant itself is up to you and the assistant you use.
Troubleshooting
- The assistant says the CppModel tools aren't available, or reports an authentication error. Sign in to the server again: in Claude Code, run
/mcpand authenticatecppmodel; in a chat app, reconnect the connector. - Results are from the wrong workspace. Ask which workspace the assistant is connected to. If it's the wrong account, clear the sign-in and sign in again as the right one.
- A chat app says it can't run a simulation. That's expected: chat apps have no shell. Run the simulation yourself, in CI or in a coding agent, and ask about the recorded run.