MCP server for build123d to improve AI cognition
Build123d MCP

MCP server for build123d to improve AI cognition when creating 3D CAD models
# build123d-mcp [](https://pypi.org/project/build123d-mcp/) [](https://pepy.tech/project/build123d-mcp) [](https://pypi.org/project/build123d-mcp/) [](https://github.com/pzfreo/build123d-mcp/actions/workflows/ci.yml) [](LICENSE) [](https://registry.modelcontextprotocol.io/v0/servers?search=build123d) [](https://glama.ai/mcp/servers/pzfreo/build123d-mcp) [](https://insiders.vscode.dev/redirect/mcp/install?name=build123d-mcp&config=%7B%22command%22%3A%22uv%22%2C%22args%22%3A%5B%22tool%22%2C%22run%22%2C%22--python%22%2C%223.12%22%2C%22build123d-mcp%40latest%22%5D%7D) [](https://cursor.com/en/install-mcp?name=build123d-mcp&config=eyJjb21tYW5kIjoidXYiLCJhcmdzIjpbInRvb2wiLCJydW4iLCItLXB5dGhvbiIsIjMuMTIiLCJidWlsZDEyM2QtbWNwQGxhdGVzdCJdfQ==) 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.
Overview
[](https://pypi.org/project/build123d-mcp/) [](https://pepy.tech/project/build123d-mcp) [](https://pypi.org/project/build123d-mcp/) [](https://github.com/pzfreo/build123d-mcp/actions/workflows/ci.yml) [](LICENSE) [](https://registry.modelcontextprotocol.io/v0/servers?search=build123d) [](https://glama.ai/mcp/servers/pzfreo/build123d-mcp)
Connects with Agent Alley MCP · agentalley.io/mcp
Files included
README.md13.5 KB
Read README.md here
pzfreo/
Show the full text401 lines
build123d-mcp
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-mcpas 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:
uv tool run --python 3.12 build123d-mcp@latest --version
Then add the same command to your AI app's MCP config. The common pieces are:
command: uv
args: ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
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:
{
"mcpServers": {
"build123d-mcp": {
"command": "uv",
"args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
}
}
}
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:
{
"mcpServers": {
"build123d-mcp": {
"command": "uv",
"args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
}
}
}
Restart Claude Desktop after saving.
Cursor
Open Settings -> MCP and add a new server entry, or edit
~/.cursor/mcp.json:
{
"mcpServers": {
"build123d-mcp": {
"command": "uv",
"args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
}
}
}
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:
command: uv
args: ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
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:
{
"servers": {
"build123d-mcp": {
"type": "stdio",
"command": "uv",
"args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
}
}
}
First Test Prompt
Once your AI app is connected to the server, ask your assistant something concrete:
Use build123d-mcp to make a 60 mm x 40 mm x 6 mm mounting plate with two
5 mm through holes 40 mm apart. Render it, measure it, then export STEP and STL.
The useful loop is:
- Build one feature at a time.
- Render or measure after important steps.
- Validate before export.
- 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
faces carrying holes; choose which hole handles to protect. For a plain through
hole, edit_feature(handle, diameter=8, protected_refs='["@feature[...]"]')
resizes it and reports predicted and measured added or removed volume. It
registers the result only when the hole, other recognised holes, and the outer
envelope pass its checks. Holes with counterbores, spotfaces, countersinks or
multiple constituent faces are refused; edit those in execute() and verify
them with compare(kind="shape") and the STEP export gate.
Good prompts usually ask the assistant to use the MCP tools explicitly and to verify the result before exporting. For example:
Use build123d-mcp. Build this incrementally, render after the main features,
measure the final dimensions, run validate(), and export STEP if it passes.
Try It In GitHub Codespaces With Copilot
You can also run the project in a browser with GitHub Codespaces:
For a beginner, this is the closest path to "GitHub-hosted LLM + MCP":
- GitHub Codespaces gives you VS Code in the browser.
- GitHub Copilot Chat gives you the LLM assistant.
- build123d-mcp runs inside the codespace as the MCP CAD tool server.
You need GitHub Copilot access for the LLM part. The codespace itself gives you a throwaway workspace with the project already checked out and the right Python/CAD dependencies installed. It is useful when you want to:
- Try the project without changing your laptop setup
- Run the tests before making a contribution
- Use Copilot Chat and build123d-mcp together in the same browser workspace
GitHub's docs cover:
This repository includes a dev container that installs Python 3.12, uv, and the
Linux display packages needed for headless rendering. It also installs the
GitHub Copilot VS Code extensions and includes a workspace MCP config at
.vscode/mcp.json.
When the codespace opens, it runs:
uv sync --all-groups
To check the development install:
uv run build123d-mcp --version
uv run pytest
To use Copilot with the local CAD server:
- Open the codespace.
- Wait for setup to finish.
- Open Copilot Chat and choose Agent mode.
- Open
.vscode/mcp.jsonand start thebuild123d-mcpserver if VS Code has not started it already. - Ask the first test prompt from the previous section.
The Codespaces MCP config points at the local checkout rather than the PyPI package:
{
"servers": {
"build123d-mcp": {
"type": "stdio",
"command": "uv",
"args": ["run", "build123d-mcp"]
}
}
}
Codespaces is a good fit for trying the project, contributing, or using GitHub
Copilot and build123d-mcp in one remote environment. For desktop AI apps on your
own machine, the normal uv tool run ... build123d-mcp@latest setup is simpler
because those apps expect to start the MCP server locally.
What It Can Do
build123d-mcp gives an assistant tools to:
- Execute build123d code in a persistent CAD session
- Render PNG, SVG, and DXF previews
- Measure volume, area, bounding boxes, topology, and centers of mass
- Find holes, bosses, countersinks, and hole patterns
- Check printability, fit/alignment comparisons, and export validity
- Import STEP/STL files for comparison
- Export STEP, STL, DXF, SVG, or multiple formats at once
- Save and restore session snapshots
- Produce 2D engineering drawing previews
For the complete tool and resource reference, see llms.md.
Guidance For Assistants
The server includes workflow guidance that helps assistants use the CAD loop properly. This is especially useful in coding agents that read project guidance files.
After connecting the server, ask your assistant to call install_skill for the
workflow you need:
install_skill(target="agents-md", skill="modeling")
install_skill(target="agents-md", skill="drawing")
install_skill(target="agents-md", skill="repair")
install_skill also supports target="claude", "cursor", and "windsurf".
Use skill="modeling" for 3D parts, skill="drawing" for engineering drawings,
and skill="repair" when a solid fails validation.
You can also paste default_prompt.md into your AI app as a system prompt.
Developer Setup
For local development:
git clone https://github.com/pzfreo/build123d-mcp.git
cd build123d-mcp
uv sync --all-groups
uv run build123d-mcp --version
uv run pytest
To run the server from this checkout in an AI app, use:
command: uv
args: ["run", "build123d-mcp"]
See CONTRIBUTING.md for contribution guidelines.
Advanced Use
The default stdio transport gives each app process its own isolated session. HTTP mode is available for web, container, or remote deployments:
uv tool run --python 3.12 "build123d-mcp[http]@latest" \
--transport http --host 127.0.0.1 --port 8000
HTTP-capable apps then connect to:
http://localhost:8000/mcp
HTTP mode has no built-in authentication and uses one shared CAD session unless the host provides per-request session middleware. Do not expose it to multiple users directly.
HTTP mode enforces the MCP SDK's DNS-rebinding protection (Host/Origin
header validation). With no extra flags only localhost Host headers
(127.0.0.1, localhost, ::1, any port) are accepted, regardless of
--host. When the server is reached under a real hostname (reverse proxy,
gateway, LAN or container bind), add the names. They are added to the
localhost defaults, not substituted for them:
uv tool run --python 3.12 "build123d-mcp[http]@latest" \
--transport http --host 0.0.0.0 --port 8000 \
--allowed-hosts 'cad.example.com,cad.example.com:*' \
--allowed-origins 'http://cad.example.com,https://cad.example.com'
--allowed-origins only matters for browser-based clients. A :* suffix
wildcards the port but does not match the default port, so list the bare
origin (and the https:// form behind a TLS proxy) as well. Or, when a
proxy/gateway terminates the real host and you trust the network layer,
turn the check off. This removes the only browser-origin protection on a server
with no authentication and a code-execution tool, so use it only behind a gateway
you trust (the SDK check is all-or-nothing):
uv tool run --python 3.12 "build123d-mcp[http]@latest" \
--transport http --host 0.0.0.0 --port 8000 --allow-all
--disable-dns-rebinding-protection is an alias of --allow-all;
--no-allow-all overrides BUILD123D_ALLOW_ALL=1 from the environment, and
--allowed-hosts '' clears an allowlist set in the environment. Entries must be
exact (no *.example.com), IPv6 hosts bracketed, and origins carry a scheme.
Env vars: BUILD123D_ALLOWED_HOSTS, BUILD123D_ALLOWED_ORIGINS,
BUILD123D_ALLOW_ALL. These flags apply to --transport http only.
Other advanced topics:
- Security model and sandboxing: security.md
- Complete tool reference: llms.md
- Live session viewer: docs/live-viewer.md
- Changelog: CHANGELOG.md
Status
Active development.
| 1 | # build123d-mcp |
| 2 | |
| 3 | [![PyPI version]](https://pypi.org/project/build123d-mcp/) |
| 4 | [![Downloads]](https://pepy.tech/project/build123d-mcp) |
| 5 | [![Python]](https://pypi.org/project/build123d-mcp/) |
| 6 | [![CI]](https://github.com/pzfreo/build123d-mcp/actions/workflows/ci.yml) |
| 7 | [![License: Apache 2.0]](LICENSE) |
| 8 | [![MCP Registry]](https://registry.modelcontextprotocol.io/v0/servers?search=build123d) |
| 9 | [![build123d-mcp MCP server]](https://glama.ai/mcp/servers/pzfreo/build123d-mcp) |
| 10 | |
| 11 | [![Install in VS Code]](https://insiders.vscode.dev/redirect/mcp/install?name=build123d-mcp&config=%7B%22command%22%3A%22uv%22%2C%22args%22%3A%5B%22tool%22%2C%22run%22%2C%22--python%22%2C%223.12%22%2C%22build123d-mcp%40latest%22%5D%7D) |
| 12 | [![Add to Cursor]](https://cursor.com/en/install-mcp?name=build123d-mcp&config=eyJjb21tYW5kIjoidXYiLCJhcmdzIjpbInRvb2wiLCJydW4iLCItLXB5dGhvbiIsIjMuMTIiLCJidWlsZDEyM2QtbWNwQGxhdGVzdCJdfQ==) |
| 13 | |
| 14 | Give your AI CAD eyes. |
| 15 | |
| 16 | build123d-mcp is not a standalone chatbot or CAD program. It is a CAD toolbox |
| 17 | that an AI/LLM app can use through MCP. |
| 18 | |
| 19 | With an LLM app such as Claude, Cursor, VS Code, Continue, Cline, or Codex CLI, |
| 20 | build123d-mcp lets the assistant create build123d CAD models, render previews, |
| 21 | measure geometry, fix mistakes, and export files such as STEP, STL, SVG, and |
| 22 | DXF. Instead of writing a whole CAD script blindly, the assistant can build a |
| 23 | part in small steps and check the result as it goes. |
| 24 | |
| 25 | On the public [CADGenBench] |
| 26 | leaderboard in June 2026, using build123d-mcp raised the same model's score from |
| 27 | 0.360 to 0.457 and CAD validity from 88% to 100%. |
| 28 | |
| 29 | ## Pick Your Setup |
| 30 | |
| 31 | Most users should start with the local MCP server setup: |
| 32 | |
| 33 | You use Claude, Cursor, VS Code, Continue, Cline, or Codex CLI on your own |
| 34 | machine. |
| 35 | Your AI app starts `build123d-mcp` as a local subprocess. |
| 36 | You do not need to clone this repository. |
| 37 | |
| 38 | Use GitHub Codespaces instead if you want a browser-only trial or a ready-made |
| 39 | development workspace with Copilot Chat, Python, uv, and the CAD dependencies |
| 40 | already installed. |
| 41 | |
| 42 | Use HTTP mode only for advanced deployments where you are hosting the MCP server |
| 43 | yourself. |
| 44 | |
| 45 | ## Quick Start |
| 46 | |
| 47 | You need: |
| 48 | |
| 49 | [uv] |
| 50 | An AI/LLM app that supports MCP, such as Claude Code, Claude Desktop, Cursor, |
| 51 | VS Code, Continue, Cline, or Codex CLI |
| 52 | |
| 53 | No repository clone is needed for normal use. First check that the package can |
| 54 | start: |
| 55 | |
| 56 | |
| 57 | uv tool run --python 3.12 build123d-mcp@latest --version |
| 58 | |
| 59 | |
| 60 | Then add the same command to your AI app's MCP config. The common pieces are: |
| 61 | |
| 62 | |
| 63 | command: uv |
| 64 | args: ["tool", "run", "--python", "3.12", "build123d-mcp@latest"] |
| 65 | |
| 66 | |
| 67 | > Python 3.11, 3.12, 3.13, and 3.14 are supported. The examples use 3.12 because |
| 68 | > it is a conservative default, and uv can download it if you do not already |
| 69 | > have it installed. |
| 70 | |
| 71 | ## Connect To Your AI App |
| 72 | |
| 73 | The pieces are: |
| 74 | |
| 75 | The LLM app is where you chat with the assistant. |
| 76 | MCP is the connection that lets the assistant call tools. |
| 77 | build123d-mcp is the CAD tool server the assistant calls. |
| 78 | |
| 79 | The server normally runs over stdio. Your AI app starts it as a local subprocess |
| 80 | when it needs the CAD tools. |
| 81 | |
| 82 | ### Claude Code |
| 83 | |
| 84 | Add this to your project's `.mcp.json`, or to `~/.claude/mcp.json` for global |
| 85 | use: |
| 86 | |
| 87 | |
| 88 | { |
| 89 | "mcpServers": { |
| 90 | "build123d-mcp": { |
| 91 | "command": "uv", |
| 92 | "args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"] |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | |
| 98 | Restart Claude Code after editing. |
| 99 | |
| 100 | ### Claude Desktop |
| 101 | |
| 102 | Edit `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, |
| 103 | or `%APPDATA%\Claude\claude_desktop_config.json` on Windows: |
| 104 | |
| 105 | |
| 106 | { |
| 107 | "mcpServers": { |
| 108 | "build123d-mcp": { |
| 109 | "command": "uv", |
| 110 | "args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"] |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | |
| 116 | Restart Claude Desktop after saving. |
| 117 | |
| 118 | ### Cursor |
| 119 | |
| 120 | Open **Settings -> MCP** and add a new server entry, or edit |
| 121 | `~/.cursor/mcp.json`: |
| 122 | |
| 123 | |
| 124 | { |
| 125 | "mcpServers": { |
| 126 | "build123d-mcp": { |
| 127 | "command": "uv", |
| 128 | "args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"] |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | |
| 134 | ### VS Code, Continue, Cline, Codex CLI |
| 135 | |
| 136 | Use the same command and arguments in whichever MCP config your AI app or |
| 137 | extension reads. The exact filename varies by app, but the server command is the |
| 138 | same: |
| 139 | |
| 140 | |
| 141 | command: uv |
| 142 | args: ["tool", "run", "--python", "3.12", "build123d-mcp@latest"] |
| 143 | |
| 144 | |
| 145 | For GitHub Copilot MCP support in VS Code, this repository includes a |
| 146 | `.vscode/mcp.json` for development checkouts and Codespaces. For another |
| 147 | workspace, the config looks like this: |
| 148 | |
| 149 | |
| 150 | { |
| 151 | "servers": { |
| 152 | "build123d-mcp": { |
| 153 | "type": "stdio", |
| 154 | "command": "uv", |
| 155 | "args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"] |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | |
| 161 | ## First Test Prompt |
| 162 | |
| 163 | Once your AI app is connected to the server, ask your assistant something |
| 164 | concrete: |
| 165 | |
| 166 | |
| 167 | Use build123d-mcp to make a 60 mm x 40 mm x 6 mm mounting plate with two |
| 168 | 5 mm through holes 40 mm apart. Render it, measure it, then export STEP and STL. |
| 169 | |
| 170 | |
| 171 | The useful loop is: |
| 172 | |
| 173 | Build one feature at a time. |
| 174 | Render or measure after important steps. |
| 175 | Validate before export. |
| 176 | Export the final part. |
| 177 | |
| 178 | If something goes wrong, ask the assistant to inspect `last_error`, repair the |
| 179 | script, and try the next smaller step. |
| 180 | |
| 181 | ### Editing an imported part |
| 182 | |
| 183 | After importing a STEP and establishing a valid baseline, use |
| 184 | `find_candidates(kind="hole", qualifiers='{"axis":"Z","side":"+X"}', |
| 185 | stated_value=6)` to list every recognised candidate and check both the part's |
| 186 | literal axes and every proper rotation of the request frame (grouped by the |
| 187 | candidates each selects). `interface_features()` suggests flat |
| 188 | faces carrying holes; choose which hole handles to protect. For a plain through |
| 189 | hole, `edit_feature(handle, diameter=8, protected_refs='["@feature[...]"]')` |
| 190 | resizes it and reports predicted and measured added or removed volume. It |
| 191 | registers the result only when the hole, other recognised holes, and the outer |
| 192 | envelope pass its checks. Holes with counterbores, spotfaces, countersinks or |
| 193 | multiple constituent faces are refused; edit those in `execute()` and verify |
| 194 | them with `compare(kind="shape")` and the STEP export gate. |
| 195 | |
| 196 | Good prompts usually ask the assistant to use the MCP tools explicitly and to |
| 197 | verify the result before exporting. For example: |
| 198 | |
| 199 | |
| 200 | Use build123d-mcp. Build this incrementally, render after the main features, |
| 201 | measure the final dimensions, run validate(), and export STEP if it passes. |
| 202 | |
| 203 | |
| 204 | ## Try It In GitHub Codespaces With Copilot |
| 205 | |
| 206 | You can also run the project in a browser with GitHub Codespaces: |
| 207 | |
| 208 | [Open in GitHub Codespaces] |
| 209 | |
| 210 | For a beginner, this is the closest path to "GitHub-hosted LLM + MCP": |
| 211 | |
| 212 | GitHub Codespaces gives you VS Code in the browser. |
| 213 | GitHub Copilot Chat gives you the LLM assistant. |
| 214 | build123d-mcp runs inside the codespace as the MCP CAD tool server. |
| 215 | |
| 216 | You need GitHub Copilot access for the LLM part. The codespace itself gives you |
| 217 | a throwaway workspace with the project already checked out and the right |
| 218 | Python/CAD dependencies installed. It is useful when you want to: |
| 219 | |
| 220 | Try the project without changing your laptop setup |
| 221 | Run the tests before making a contribution |
| 222 | Use Copilot Chat and build123d-mcp together in the same browser workspace |
| 223 | |
| 224 | GitHub's docs cover: |
| 225 | |
| 226 | [Using Copilot in Codespaces] |
| 227 | [Extending Copilot Chat with MCP] |
| 228 | |
| 229 | This repository includes a dev container that installs Python 3.12, uv, and the |
| 230 | Linux display packages needed for headless rendering. It also installs the |
| 231 | GitHub Copilot VS Code extensions and includes a workspace MCP config at |
| 232 | `.vscode/mcp.json`. |
| 233 | |
| 234 | When the codespace opens, it runs: |
| 235 | |
| 236 | |
| 237 | uv sync --all-groups |
| 238 | |
| 239 | |
| 240 | To check the development install: |
| 241 | |
| 242 | |
| 243 | uv run build123d-mcp --version |
| 244 | uv run pytest |
| 245 | |
| 246 | |
| 247 | To use Copilot with the local CAD server: |
| 248 | |
| 249 | Open the codespace. |
| 250 | Wait for setup to finish. |
| 251 | Open Copilot Chat and choose Agent mode. |
| 252 | Open `.vscode/mcp.json` and start the `build123d-mcp` server if VS Code has |
| 253 | not started it already. |
| 254 | Ask the first test prompt from the previous section. |
| 255 | |
| 256 | The Codespaces MCP config points at the local checkout rather than the PyPI |
| 257 | package: |
| 258 | |
| 259 | |
| 260 | { |
| 261 | "servers": { |
| 262 | "build123d-mcp": { |
| 263 | "type": "stdio", |
| 264 | "command": "uv", |
| 265 | "args": ["run", "build123d-mcp"] |
| 266 | } |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | |
| 271 | Codespaces is a good fit for trying the project, contributing, or using GitHub |
| 272 | Copilot and build123d-mcp in one remote environment. For desktop AI apps on your |
| 273 | own machine, the normal `uv tool run ... build123d-mcp@latest` setup is simpler |
| 274 | because those apps expect to start the MCP server locally. |
| 275 | |
| 276 | ## What It Can Do |
| 277 | |
| 278 | build123d-mcp gives an assistant tools to: |
| 279 | |
| 280 | Execute build123d code in a persistent CAD session |
| 281 | Render PNG, SVG, and DXF previews |
| 282 | Measure volume, area, bounding boxes, topology, and centers of mass |
| 283 | Find holes, bosses, countersinks, and hole patterns |
| 284 | Check printability, fit/alignment comparisons, and export validity |
| 285 | Import STEP/STL files for comparison |
| 286 | Export STEP, STL, DXF, SVG, or multiple formats at once |
| 287 | Save and restore session snapshots |
| 288 | Produce 2D engineering drawing previews |
| 289 | |
| 290 | For the complete tool and resource reference, see [llms.md]. |
| 291 | |
| 292 | ## Guidance For Assistants |
| 293 | |
| 294 | The server includes workflow guidance that helps assistants use the CAD loop |
| 295 | properly. This is especially useful in coding agents that read project guidance |
| 296 | files. |
| 297 | |
| 298 | After connecting the server, ask your assistant to call `install_skill` for the |
| 299 | workflow you need: |
| 300 | |
| 301 | |
| 302 | install_skill(target="agents-md", skill="modeling") |
| 303 | install_skill(target="agents-md", skill="drawing") |
| 304 | install_skill(target="agents-md", skill="repair") |
| 305 | |
| 306 | |
| 307 | `install_skill` also supports `target="claude"`, `"cursor"`, and `"windsurf"`. |
| 308 | Use `skill="modeling"` for 3D parts, `skill="drawing"` for engineering drawings, |
| 309 | and `skill="repair"` when a solid fails validation. |
| 310 | |
| 311 | You can also paste [default_prompt.md] into your AI app as a |
| 312 | system prompt. |
| 313 | |
| 314 | ## Developer Setup |
| 315 | |
| 316 | For local development: |
| 317 | |
| 318 | |
| 319 | git clone https://github.com/pzfreo/build123d-mcp.git |
| 320 | cd build123d-mcp |
| 321 | uv sync --all-groups |
| 322 | uv run build123d-mcp --version |
| 323 | uv run pytest |
| 324 | |
| 325 | |
| 326 | To run the server from this checkout in an AI app, use: |
| 327 | |
| 328 | |
| 329 | command: uv |
| 330 | args: ["run", "build123d-mcp"] |
| 331 | |
| 332 | |
| 333 | See [CONTRIBUTING.md] for contribution guidelines. |
| 334 | |
| 335 | ## Advanced Use |
| 336 | |
| 337 | The default stdio transport gives each app process its own isolated session. |
| 338 | HTTP mode is available for web, container, or remote deployments: |
| 339 | |
| 340 | |
| 341 | uv tool run --python 3.12 "build123d-mcp[http]@latest" \ |
| 342 | --transport http --host 127.0.0.1 --port 8000 |
| 343 | |
| 344 | |
| 345 | HTTP-capable apps then connect to: |
| 346 | |
| 347 | |
| 348 | http://localhost:8000/mcp |
| 349 | |
| 350 | |
| 351 | HTTP mode has no built-in authentication and uses one shared CAD session unless |
| 352 | the host provides per-request session middleware. Do not expose it to multiple |
| 353 | users directly. |
| 354 | |
| 355 | HTTP mode enforces the MCP SDK's DNS-rebinding protection (Host/Origin |
| 356 | header validation). With no extra flags only localhost Host headers |
| 357 | (`127.0.0.1`, `localhost`, `::1`, any port) are accepted, regardless of |
| 358 | `--host`. When the server is reached under a real hostname (reverse proxy, |
| 359 | gateway, LAN or container bind), add the names. They are added to the |
| 360 | localhost defaults, not substituted for them: |
| 361 | |
| 362 | |
| 363 | uv tool run --python 3.12 "build123d-mcp[http]@latest" \ |
| 364 | --transport http --host 0.0.0.0 --port 8000 \ |
| 365 | --allowed-hosts 'cad.example.com,cad.example.com:*' \ |
| 366 | --allowed-origins 'http://cad.example.com,https://cad.example.com' |
| 367 | |
| 368 | |
| 369 | `--allowed-origins` only matters for browser-based clients. A `:*` suffix |
| 370 | wildcards the port but does not match the default port, so list the bare |
| 371 | origin (and the `https://` form behind a TLS proxy) as well. Or, when a |
| 372 | proxy/gateway terminates the real host and you trust the network layer, |
| 373 | turn the check off. This removes the only browser-origin protection on a server |
| 374 | with no authentication and a code-execution tool, so use it only behind a gateway |
| 375 | you trust (the SDK check is all-or-nothing): |
| 376 | |
| 377 | |
| 378 | uv tool run --python 3.12 "build123d-mcp[http]@latest" \ |
| 379 | --transport http --host 0.0.0.0 --port 8000 --allow-all |
| 380 | |
| 381 | |
| 382 | `--disable-dns-rebinding-protection` is an alias of `--allow-all`; |
| 383 | `--no-allow-all` overrides `BUILD123D_ALLOW_ALL=1` from the environment, and |
| 384 | `--allowed-hosts ''` clears an allowlist set in the environment. Entries must be |
| 385 | exact (no `*.example.com`), IPv6 hosts bracketed, and origins carry a scheme. |
| 386 | Env vars: `BUILD123D_ALLOWED_HOSTS`, `BUILD123D_ALLOWED_ORIGINS`, |
| 387 | `BUILD123D_ALLOW_ALL`. These flags apply to `--transport http` only. |
| 388 | |
| 389 | Other advanced topics: |
| 390 | |
| 391 | Security model and sandboxing: [security.md] |
| 392 | Complete tool reference: [llms.md] |
| 393 | Live session viewer: [docs/live-viewer.md] |
| 394 | Changelog: [CHANGELOG.md] |
| 395 | |
| 396 | ## Status |
| 397 | |
| 398 | Active development. |
| 399 | |
| 400 | <!-- mcp-name: io.github.pzfreo/build123d-mcp --> |
| 401 |
Details
- Updated
- Nov 13, 2026
- License
- Apache-2.0
- Stars on the repo
- ★ 151
- Checked
- Source
- pzfreo/build123d-mcp ↗
- Creator
- pzfreo · 1 listing
Similar MCP servers
See all →
SkillTests in real browsers via Chrome DevTools MCPBrowser testing with devtools
AgentThis MCP server attempts to exercise all the featuresEverything MCP Server
AgentA Model Context Protocol server that provides web contentFetch MCP Server
AgentNode.js server implementing Model Context ProtocolFilesystem MCP Server
SkillAbout libraries, frameworks, API referencesContext7 MCP
SkillUses Chrome DevTools via MCP for efficient debugging