build123d-mcp
A CAD MCP server for build123d: the agent builds a part step by step, checks renders, measures geometry and exports STEP and STL.
- 151 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- The server executes AI-generated Python in its own process, although imports and builtins are restricted.
- Export writes model files to disk.
Install
- Works in
Manual install
uv tool run --python 3.12 build123d-mcp@latest --versionChecks that the package starts. `uv` is required and no clone is needed.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The server executes AI-generated Python in its own process, although imports and builtins are restricted.
- Export writes model files to disk.
This is third-party code. Review the repository files before installing.
What it does
The server gives an AI assistant tools for working with build123d models. The agent runs code in a persistent CAD session, renders previews as PNG, SVG and DXF, measures volume, area, bounding box and centre of mass, then validates the model before export. The toolset includes finding holes, bosses and countersinks, printability checks, shape comparison, STEP and STL import, session snapshots and 2D drawing previews. Export goes to STEP, STL, DXF and SVG, several formats at once if needed. A part is built one feature at a time, and the agent inspects the result after each major step.
Who it is for. Engineers and makers who design parts for 3D printing and machining together with Claude Code, Cursor or Codex CLI.
Good fit when
- A mounting plate with holes is needed and the agent must verify dimensions before export.
- An imported STEP is being edited and a through hole is resized with `edit_feature`.
- A part fails `validate()` and the agent needs a repair workflow.
- A 2D drawing preview of the part is needed as SVG or DXF.
Not a fit when
- A multi-user service is needed: HTTP mode has no authentication and keeps one shared session.
- Models are built in FreeCAD, OpenSCAD or AutoCAD: the server works only with build123d.
- Holes with counterbores, spotfaces or several faces must be edited automatically: `edit_feature` refuses them.
Example request
Use build123d-mcp: make a 60 x 40 x 6 mm plate with two 5 mm holes 40 mm apart, render it, measure it and export STEP and STL.MCP
- Transport
- stdio, http
- Authentication
- not required
Limitations
The server executes AI-generated Python through `exec()`. Protection rests on AST inspection, an import allowlist (`build123d`, `math`, `numpy` and a few other modules) and trimmed builtins. The author calls the tool local and not designed for multi-tenant or production deployments. The main threat is prompt injection through a file or page the assistant analyses. HTTP mode (`--transport http`) has no built-in authentication, so do not expose it. The `uv` package manager is required; Python 3.11 to 3.14 is supported, and `uv` can download 3.12 when needed.
How to disable. Remove the `build123d-mcp` entry from the client's MCP config and restart it. Clean exported files and session snapshots by hand.
FAQ
How do I connect build123d-mcp to Claude Code?
Add the server to the project `.mcp.json` or to `~/.claude/mcp.json`: command `uv`, arguments `tool run --python 3.12 build123d-mcp@latest`. Restart Claude Code after editing the config.
Do I need to clone the repository?
No, normal use needs no clone: the client starts the package as a local stdio process. A clone is for development and tests.
How do I teach the assistant the workflow?
Call `install_skill`, for example `install_skill(target="agents-md", skill="modeling")`. The targets are `claude`, `cursor` and `windsurf` besides `agents-md`, and the skills are `modeling`, `drawing` and `repair`.
Can the server run over HTTP?
Yes, with `uv tool run --python 3.12 "build123d-mcp[http]@latest" --transport http --host 127.0.0.1 --port 8000`. The client connects to `http://localhost:8000/mcp`. There is no authentication and one session serves everyone.
Can I try it without installing anything locally?
Yes, through GitHub Codespaces: the repository ships a dev container with Python 3.12, `uv` and the Copilot extensions. The LLM part needs GitHub Copilot access.
Discussion
No questions or reviews yet.
Related
MCP serversClassCAD CAD MCP server: an agent builds parts and assemblies with scripts, views snapshots and saves STEP and STL
agentcad gives an AI agent 3D design: build123d scripts, STEP export, renders, geometry checks and a live browser preview
An MCP server for OpenSCAD: the agent renders parts at a known scale, measures geometry and finds collisions in assemblies
An MCP server for CAD modeling in SolidCraft: the agent builds parametric 3D parts, measures volume, looks at a screenshot and exports to STEP
PartCAD keeps mechanical parts as text, so an agent writes the CAD script, renders the model and checks it against the brief.
FreeCAD MCP: an AI agent in parametric CAD
FreeCAD MCP (blwfish)
An MCP bridge between an agent and FreeCAD: 41 tools for parametric parts, CAM toolpaths, meshes and model diagnostics
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| build123d-mcp (this card) | no | not required | 151 | |
| OpenSCAD MCP | no | not required | 170 | works with OpenSCAD; build123d-mcp builds models with the Python library build123d and exports STEP |
| FreeCAD MCP | no | not required | 3,310 | drives a running FreeCAD; build123d-mcp keeps its own CAD session without a graphical editor |
README in short
The author describes the project as a CAD toolbox that an AI app calls through MCP. On the public CADGenBench leaderboard in June 2026 the same model's score rose from 0.360 to 0.457 and the share of valid models from 88% to 100% with the server.