Shapr3D MCP Server
An MCP server that lets AI assistants (Claude, etc.) model real CAD parts and work with Shapr3D.
How it works
Shapr3D has no public API or scripting interface (it's a long-standing community request). So this server takes the only robust route:
- Real CAD kernel inside the server. Models are built programmatically with build123d on the OpenCascade B-rep kernel — the same class of geometry Shapr3D uses (Parasolid-like solids, not meshes).
- STEP file exchange. Generated models export as STEP, which Shapr3D imports as fully editable solid bodies. Files you export from Shapr3D (STEP/IGES/STL) can be inspected, modified, and converted.
- macOS app bridge. Tools to launch Shapr3D, open files in it, check its state, and screenshot its window for visual feedback.
AI assistant ──MCP──▶ this server ──build123d/OCCT──▶ model.step ──▶ Shapr3D
▲ │
└────────── STEP/STL export from app ◀───────┘
Tools
Setup
Requires macOS, uv, and Shapr3D installed.
uv sync
Claude Code
A project-scoped .mcp.json is included — opening this folder in Claude Code picks it up automatically. To register it globally:
claude mcp add shapr3d -s user -- uv run --directory "<path-to-this-folder>" shapr3d-mcp
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"shapr3d": {
"command": "uv",
"args": ["run", "--directory", "<path-to-this-folder>", "shapr3d-mcp"]
}
}
}
Typical workflow
- Ask the AI to model something ("design a wall bracket for a 2-inch pipe, 4 mounting holes for M5 bolts").
- It writes a build123d script via
create_model, checks it withrender_preview, and opens the STEP in Shapr3D viaopen_in_shapr3d. - You confirm the Import Preferences dialog in Shapr3D (Quality is fine; STEP carries mm units) and edit freely — the bodies are native, editable solids.
- To AI-edit an existing design: export STEP from Shapr3D, then ask the AI
to
inspect_model/modify_modelit.
Generated files live in models/ (override with SHAPR3D_MCP_WORKDIR).
Development
uv run pytest
The suite exercises the modeling tools directly (no MCP transport, no Shapr3D app needed) in a throwaway workspace.
Limitations
.shaprfiles are a proprietary, undocumented format — they can't be read or written directly. STEP is the interchange format.- Parametric history doesn't survive the round-trip (a STEP file is the final solid, not the feature tree). Shapr3D's direct-modeling tools work on imported solids regardless.
- In-app actions (sketching, export) happen via the user or OS-level computer-use automation; there is no app API to drive.