Connect SolidCraft to Claude, Cursor, Codex, or any MCP client
Headless or bridged, the checkbox that is off by default, the three flags that matter, and the six failures that account for almost every support question.
Written against v0.50.0 · command names and app ID changed in recent releases · settings path verified in the official docs
SolidCraft speaks the Model Context Protocol over stdio: JSON-RPC 2.0, one message per line, protocol revisions 2025-06-18, 2025-03-26 and 2024-11-05. The agent does not click anything — every MCP tool runs the same engine commands the toolbar and the scripts run, so a model built by an agent is a normal parametric model you can open, edit and re-run by hand.
The setting that stops almost everyone
New installations ship with agent access off. Before anything can connect you have to open the app and enable it:
Preferences › Assistant › Agents through MCP › “Let AI agents connect”
With that on, the app listens on a control channel at 127.0.0.1:27878 and writes a token file the CLI reads. Without it, every tool call fails in the first second and the client reports something vague like “server closed the connection”. If you remember only one thing from this page, remember this: a working install plus a working MCP client still fails until that checkbox is ticked.
The control channel only listens on the loopback interface. It is not exposed to your network, which is why the token rotation is adequate rather than paranoid.
Two modes, and which one you want
Headless — no window at all. The agent owns the model, start to finish:
solidcraft-cli mcp
Add a design to work on an existing file instead of a blank model:
solidcraft-cli mcp --in part.sc
Bridged — the agent drives the copy you have open, so you watch the model change on screen. This is the mode to use while you are still deciding whether you trust it:
solidcraft --control 7878 &
solidcraft-cli mcp --connect 127.0.0.1:7878
Run solidcraft-cli mcp with no connection flags and it auto-discovers a running instance. If you have two copies open, be explicit with --connect; otherwise the agent may drive the window you are not looking at and the model will look stale for reasons that are not the agent's fault. Up to 16 connections can be attached at once, which is more than any single person needs.
Claude Code
One command, from the README:
claude mcp add solidcraft -- solidcraft-cli mcp
On Windows, solidcraft-cli may not be on PATH (older installers did not add it), so the command has to point at the full path:
claude mcp add solidcraft -- "C:\Program Files\SolidCraft\solidcraft-cli.exe" mcp
Claude Desktop, Cursor and anything else with a JSON config
Every MCP client takes the same shape: a command, arguments, and nothing else. For Claude Desktop that is claude_desktop_config.json; for Cursor it is ~/.cursor/mcp.json. Both look like this:
{
"mcpServers": {
"solidcraft": {
"command": "solidcraft-cli",
"args": ["mcp", "--allow-path", "/Users/you/Designs"]
}
}
}
On Windows the command becomes the full path to the executable with doubled backslashes:
{
"mcpServers": {
"solidcraft": {
"command": "C:\\Program Files\\SolidCraft\\solidcraft-cli.exe",
"args": ["mcp", "--allow-path", "C:\\Users\\you\\Designs"]
}
}
}
The project's documentation has a client-configuration section with the exact snippet for each supported client, including the ones that wrap the server in npx or uvx. If a client of yours is not listed there, the generic form above is what it wants; the only SolidCraft-specific part is the command and the flags.
Codex and other stdio clients
Codex uses its MCP configuration file rather than a JSON file. Add the following to ~/.codex/config.toml (on Windows, the equivalent is under your user profile's .codex directory):
[mcp_servers.solidcraft]
command = "solidcraft-cli"
args = ["mcp", "--allow-path", "/Users/you/Designs", "--param-check", "strict"]
For a Windows installation that does not put the CLI on PATH, replace command with C:\\Program Files\\SolidCraft\\solidcraft-cli.exe and use a Windows folder in args. Do not copy a token into the config: the SolidCraft app writes the local token file that solidcraft-cli reads, and it regenerates the token every time the app starts. If the app was restarted, restart the MCP client too.
Client configuration at a glance
| Client | Config location | Smallest working entry | Most common first failure |
|---|---|---|---|
| Claude Desktop | claude_desktop_config.json |
JSON command: "solidcraft-cli", args: ["mcp"] |
Agent access is still off in Preferences |
| Cursor | ~/.cursor/mcp.json |
JSON command: "solidcraft-cli", args: ["mcp"] |
CLI is not on PATH |
| Claude Code | Project or user MCP registry | claude mcp add solidcraft -- solidcraft-cli mcp |
Windows needs the full executable path |
| Codex | ~/.codex/config.toml |
TOML command = "solidcraft-cli", args = ["mcp"] |
Token belongs to an app instance that was closed |
Make a configuration
Before connecting, open Preferences › Assistant › Agents through MCP and enable “Let AI agents connect”.
The three flags worth setting
--allow-path DIR — the directories the agent may read and write. Repeatable. Without it, saving anywhere outside a design's own folder is refused. A folder like ~/.ssh is not reachable by default and should stay that way.
--require-allow-path — refuses to start at all unless at least one --allow-path was given. Use this in any configuration you are going to keep, because it turns a silent permission hole into a startup error.
--param-check off|warn|strict — what happens when a dimension or parameter is outside its declared range. strict rejects the call instead of accepting a value the model cannot really rebuild with. Anyone handing the tool to an agent should prefer strict; the permissive setting is for exploring.
There is also --token for supplying the control token explicitly, and SOLIDCRAFT_CONTROL_TOKEN / SOLIDCRAFT_CONTROL_PORT for the same thing through the environment, which is what you want in a container or a wrapper script rather than on a command line that ends up in shell history.
When it does not work
| What you see | Likely cause | Fix |
|---|---|---|
| Every tool call fails immediately | “Let AI agents connect” is off | Turn it on in Preferences, then restart the client |
Connection refused on port 27878 |
Nothing is listening, or the token is from a previous launch | Tokens are regenerated each launch — restart the CLI |
| Tools run but every save is refused | The target folder is outside --allow-path |
Add the directory, or move the design |
command not found: solidcraft-cli |
Not on PATH (Windows installers especially) |
Use the full executable path |
| The agent describes a model you cannot see | It attached to a different instance | Use --connect with an explicit port |
| A scripted model fails at the first fillet | Missing constraint or out-of-range parameter | Run with --param-check strict to see the rejection |
What to ask it for the first time
Start with something whose failure is obvious. Ask the agent to list the available commands, then build a 40 × 30 × 20 mm box with three named parameters, change one of them, and report the new bounding box. Then ask it to export STEP and STL into the folder you allowed. If the box comes back and the bounding box changes, the whole loop works; if the export lands in the wrong folder, --allow-path is wrong and nothing else needs debugging.
After that the useful move is a skill file: the project supports agent skills in a skills/ directory following the agentskills.io format. Writing down “how an enclosure is built in this app — shell, ribs, bosses, tolerances” once is worth more than re-explaining it in every session, and it is the difference between an agent that guesses and one that follows your house rules.
Safety, honestly
The channel is local-only, the feature is off until you turn it on, the token rotates every launch, and file access is restricted to directories you name. The one genuinely risky flag is --allow-any-path. It exists for automated pipelines in throwaway containers. Do not put it in a configuration on the machine where you keep your tax return.
Next step
If you want the model to be something real rather than a box, the beginner tutorial builds a bracket end to end — sketch, constraints, a feature timeline and two parameters — and the 3D printing page takes the result out to a slicer.