build123d-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Give your AI CAD eyes.
build123d-mcp is not a standalone chatbot or CAD program. It is a CAD toolbox
that an AI/LLM app can use through MCP.
With an LLM app such as Claude, Cursor, VS Code, Continue, Cline, or Codex CLI,
build123d-mcp lets the assistant create build123d CAD models, render previews,
measure geometry, fix mistakes, and export files such as STEP, STL, SVG, and
DXF. Instead of writing a whole CAD script blindly, the assistant can build a
part in small steps and check the result as it goes.
On the public CADGenBench
leaderboard in June 2026, using build123d-mcp raised the same model's score from
0.360 to 0.457 and CAD validity from 88% to 100%.
Pick Your Setup
Most users should start with the local MCP server setup:
- You use Claude, Cursor, VS Code, Continue, Cline, or Codex CLI on your own
machine.
- Your AI app starts build123d-mcp as a local subprocess.
- You do not need to clone this repository.
Use GitHub Codespaces instead if you want a browser-only trial or a ready-made
development workspace with Copilot Chat, Python, uv, and the CAD dependencies
already installed.
Use HTTP mode only for advanced deployments where you are hosting the MCP server
yourself.
Quick Start
You need:
- uv
- An AI/LLM app that supports MCP, such as Claude Code, Claude Desktop, Cursor,
VS Code, Continue, Cline, or Codex CLI
No repository clone is needed for normal use. First check that the package can
start:
Then add the same command to your AI app's MCP config. The common pieces are:
> Python 3.11, 3.12, 3.13, and 3.14 are supported. The examples use 3.12 because
> it is a conservative default, and uv can download it if you do not already
> have it installed.
Connect To Your AI App
The pieces are:
- The LLM app is where you chat with the assistant.
- MCP is the connection that lets the assistant call tools.
- build123d-mcp is the CAD tool server the assistant calls.
The server normally runs over stdio. Your AI app starts it as a local subprocess
when it needs the CAD tools.
Claude Code
Add this to your project's .mcp.json, or to ~/.claude/mcp.json for global
use:
Restart Claude Code after editing.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS,
or %APPDATA%\Claude\claude_desktop_config.json on Windows:
Restart Claude Desktop after saving.
Cursor
Open **Settings -> MCP** and add a new server entry, or edit
~/.cursor/mcp.json:
VS Code, Continue, Cline, Codex CLI
Use the same command and arguments in whichever MCP config your AI app or
extension reads. The exact filename varies by app, but the server command is the
same:
For GitHub Copilot MCP support in VS Code, this repository includes a
.vscode/mcp.json for development checkouts and Codespaces. For another
workspace, the config looks like this:
First Test Prompt
Once your AI app is connected to the server, ask your assistant something
concrete:
The useful loop is:
1. Build one feature at a time.
2. Render or measure after important steps.
3. Validate before export.
4. Export the final part.
If something goes wrong, ask the assistant to inspect last_error, repair the
script, and try the next smaller step.
Editing an imported part
After importing a STEP and establishing a valid baseline, use
find_candidates(kind="hole", qualifiers='{"axis":"Z","side":"+X"}',
stated_value=6) to list every recognised candidate and check both the part's
literal axes and every proper rotation of the request frame (grouped by the
candidates each selects). interface_features() suggests flat