Skip to content
Back to search

build123d-mcp

MCP server for build123d to improve AI cognition when creating 3D CAD models

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/pzfreo/build123d-mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/pzfreo/build123d-mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/pzfreo--build123d-mcp/badge.svg)](/listings/pzfreo--build123d-mcp)

HTML

<a href="/listings/pzfreo--build123d-mcp"><img src="/api/listings/pzfreo--build123d-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

You need:

- [uv](https://github.com/astral-sh/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.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 413 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # build123d-mcp
  2. [![PyPI version](https://img.shields.io/pypi/v/build123d-mcp)](https://pypi.org/project/build123d-mcp/)
  3. [![Downloads](https://static.pepy.tech/badge/build123d-mcp/month)](https://pepy.tech/project/build123d-mcp)
  4. [![Python](https://img.shields.io/pypi/pyversions/build123d-mcp)](https://pypi.org/project/build123d-mcp/)
  5. [![CI](https://github.com/pzfreo/build123d-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/pzfreo/build123d-mcp/actions/workflows/ci.yml)
  6. [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
  7. [![MCP Registry](https://img.shields.io/badge/MCP%20Registry-io.github.pzfreo%2Fbuild123d--mcp-blue)](https://registry.modelcontextprotocol.io/v0/servers?search=build123d)
  8. [![build123d-mcp MCP server](https://glama.ai/mcp/servers/pzfreo/build123d-mcp/badges/score.svg)](https://glama.ai/mcp/servers/pzfreo/build123d-mcp)
  9. [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_server-0098FF?logo=visualstudiocode)](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)
  10. [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=build123d-mcp&config=eyJjb21tYW5kIjoidXYiLCJhcmdzIjpbInRvb2wiLCJydW4iLCItLXB5dGhvbiIsIjMuMTIiLCJidWlsZDEyM2QtbWNwQGxhdGVzdCJdfQ==)
  11. Give your AI CAD eyes.
  12. build123d-mcp is not a standalone chatbot or CAD program. It is a CAD toolbox
  13. that an AI/LLM app can use through MCP.
  14. With an LLM app such as Claude, Cursor, VS Code, Continue, Cline, or Codex CLI,
  15. build123d-mcp lets the assistant create build123d CAD models, render previews,
  16. measure geometry, fix mistakes, and export files such as STEP, STL, SVG, and
  17. DXF. Instead of writing a whole CAD script blindly, the assistant can build a
  18. part in small steps and check the result as it goes.
  19. On the public [CADGenBench](https://huggingface.co/spaces/HuggingAI4Engineering/CADGenBench)
  20. leaderboard in June 2026, using build123d-mcp raised the same model's score from
  21. 0.360 to 0.457 and CAD validity from 88% to 100%.
  22. ## Pick Your Setup
  23. Most users should start with the local MCP server setup:
  24. - You use Claude, Cursor, VS Code, Continue, Cline, or Codex CLI on your own
  25. machine.
  26. - Your AI app starts `build123d-mcp` as a local subprocess.
  27. - You do not need to clone this repository.
  28. Use GitHub Codespaces instead if you want a browser-only trial or a ready-made
  29. development workspace with Copilot Chat, Python, uv, and the CAD dependencies
  30. already installed.
  31. Use HTTP mode only for advanced deployments where you are hosting the MCP server
  32. yourself.
  33. ## Quick Start
  34. You need:
  35. - [uv](https://github.com/astral-sh/uv)
  36. - An AI/LLM app that supports MCP, such as Claude Code, Claude Desktop, Cursor,
  37. VS Code, Continue, Cline, or Codex CLI
  38. No repository clone is needed for normal use. First check that the package can
  39. start:
  40. ```bash
  41. uv tool run --python 3.12 build123d-mcp@latest --version
  42. ```
  43. Then add the same command to your AI app's MCP config. The common pieces are:
  44. ```text
  45. command: uv
  46. args: ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
  47. ```
  48. > Python 3.11, 3.12, 3.13, and 3.14 are supported. The examples use 3.12 because
  49. > it is a conservative default, and uv can download it if you do not already
  50. > have it installed.
  51. ## Connect To Your AI App
  52. The pieces are:
  53. - The LLM app is where you chat with the assistant.
  54. - MCP is the connection that lets the assistant call tools.
  55. - build123d-mcp is the CAD tool server the assistant calls.
  56. The server normally runs over stdio. Your AI app starts it as a local subprocess
  57. when it needs the CAD tools.
  58. ### Claude Code
  59. Add this to your project's `.mcp.json`, or to `~/.claude/mcp.json` for global
  60. use:
  61. ```json
  62. {
  63. "mcpServers": {
  64. "build123d-mcp": {
  65. "command": "uv",
  66. "args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
  67. }
  68. }
  69. }
  70. ```
  71. Restart Claude Code after editing.
  72. ### Claude Desktop
  73. Edit `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS,
  74. or `%APPDATA%\Claude\claude_desktop_config.json` on Windows:
  75. ```json
  76. {
  77. "mcpServers": {
  78. "build123d-mcp": {
  79. "command": "uv",
  80. "args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
  81. }
  82. }
  83. }
  84. ```
  85. Restart Claude Desktop after saving.
  86. ### Cursor
  87. Open **Settings -> MCP** and add a new server entry, or edit
  88. `~/.cursor/mcp.json`:
  89. ```json
  90. {
  91. "mcpServers": {
  92. "build123d-mcp": {
  93. "command": "uv",
  94. "args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
  95. }
  96. }
  97. }
  98. ```
  99. ### VS Code, Continue, Cline, Codex CLI
  100. Use the same command and arguments in whichever MCP config your AI app or
  101. extension reads. The exact filename varies by app, but the server command is the
  102. same:
  103. ```text
  104. command: uv
  105. args: ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
  106. ```
  107. For GitHub Copilot MCP support in VS Code, this repository includes a
  108. `.vscode/mcp.json` for development checkouts and Codespaces. For another
  109. workspace, the config looks like this:
  110. ```json
  111. {
  112. "servers": {
  113. "build123d-mcp": {
  114. "type": "stdio",
  115. "command": "uv",
  116. "args": ["tool", "run", "--python", "3.12", "build123d-mcp@latest"]
  117. }
  118. }
  119. }
  120. ```
  121. ## First Test Prompt
  122. Once your AI app is connected to the server, ask your assistant something
  123. concrete:
  124. ```text
  125. Use build123d-mcp to make a 60 mm x 40 mm x 6 mm mounting plate with two
  126. 5 mm through holes 40 mm apart. Render it, measure it, then export STEP and STL.
  127. ```
  128. The useful loop is:
  129. 1. Build one feature at a time.
  130. 2. Render or measure after important steps.
  131. 3. Validate before export.
  132. 4. Export the final part.
  133. If something goes wrong, ask the assistant to inspect `last_error`, repair the
  134. script, and try the next smaller step.
  135. ### Editing an imported part
  136. `import_cad_file("input.step", "part")` binds the exact imported object as `part`
  137. inside `execute()`. Named registrations and replacements through `show`,
  138. `edit_feature`, library loading and drawing helpers also bind safe identifiers.
  139. Responses provide `execute_name`; names colliding with builtins, helpers, imports
  140. or unrelated user variables remain accessible with `get_object("name")`.
  141. Snapshot restore rebinds registered objects; reset clears them.
  142. After importing a STEP and establishing a valid baseline, call
  143. `inspect_features(target="part")` for measures and a compact feature inventory.
  144. Expand `families="holes,bosses,fillets"`, or request analytic face descriptors
  145. with `feature_ids="holes:12@<digest>"`. Coordinates match the input model.
  146. Paste the returned face descriptors into `select_faces(part, faces=...)` inside
  147. `execute()` to get live build123d faces; each descriptor must match exactly one
  148. face. Keyword filters such as `select_faces(part, kind="cylinder", radius=4)`
  149. return all matches. Descriptor mode rejects empty/duplicate selections and
  150. keyword filters combined with `faces=`. No helper import is needed. Reassigning
  151. a bound variable warns that the registry is unchanged. Register edits with
  152. `show(edited, "part")` to replace the object and its binding. For a plain
  153. through hole, `edit_feature(feature_id="holes:12@<digest>", diameter=8, object_name="part",
  154. protected_refs='["holes:13@<digest>"]')` verifies predicted material change, other holes
  155. and the envelope before registering the result. Complex hole stacks are refused.
  156. Inspect again after edits. Verify revisions with
  157. `diff_step(old="input.step", new="part", render=True)` and the STEP export gate.
  158. The diff reports feature changes and bare analytic face changes; its descriptors
  159. do not prove trim-contour equality. Python 3.11 or later is supported.
  160. Good prompts usually ask the assistant to use the MCP tools explicitly and to
  161. verify the result before exporting. For example:
  162. ```text
  163. Use build123d-mcp. Build this incrementally, render after the main features,
  164. measure the final dimensions, run validate(), and export STEP if it passes.
  165. ```
  166. ## Try It In GitHub Codespaces With Copilot
  167. You can also run the project in a browser with GitHub Codespaces:
  168. [Open in GitHub Codespaces](https://codespaces.new/pzfreo/build123d-mcp)
  169. For a beginner, this is the closest path to "GitHub-hosted LLM + MCP":
  170. - GitHub Codespaces gives you VS Code in the browser.
  171. - GitHub Copilot Chat gives you the LLM assistant.
  172. - build123d-mcp runs inside the codespace as the MCP CAD tool server.
  173. You need GitHub Copilot access for the LLM part. The codespace itself gives you
  174. a throwaway workspace with the project already checked out and the right
  175. Python/CAD dependencies installed. It is useful when you want to:
  176. - Try the project without changing your laptop setup
  177. - Run the tests before making a contribution
  178. - Use Copilot Chat and build123d-mcp together in the same browser workspace
  179. GitHub's docs cover:
  180. - [Using Copilot in Codespaces](https://docs.github.com/en/codespaces/reference/using-github-copilot-in-github-codespaces)
  181. - [Extending Copilot Chat with MCP](https://docs.github.com/copilot/customizing-copilot/using-model-context-protocol/extending-copilot-chat-with-mcp)
  182. This repository includes a dev container that installs Python 3.12, uv, and the
  183. Linux display packages needed for headless rendering. It also installs the
  184. GitHub Copilot VS Code extensions and includes a workspace MCP config at
  185. `.vscode/mcp.json`.
  186. When the codespace opens, it runs:
  187. ```bash
  188. uv sync --all-groups
  189. ```
  190. To check the development install:
  191. ```bash
  192. uv run build123d-mcp --version
  193. uv run pytest
  194. ```
  195. To use Copilot with the local CAD server:
  196. 1. Open the codespace.
  197. 2. Wait for setup to finish.
  198. 3. Open Copilot Chat and choose Agent mode.
  199. 4. Open `.vscode/mcp.json` and start the `build123d-mcp` server if VS Code has
  200. not started it already.
  201. 5. Ask the first test prompt from the previous section.
  202. The Codespaces MCP config points at the local checkout rather than the PyPI
  203. package:
  204. ```json
  205. {
  206. "servers": {
  207. "build123d-mcp": {
  208. "type": "stdio",
  209. "command": "uv",
  210. "args": ["run", "build123d-mcp"]
  211. }
  212. }
  213. }
  214. ```
  215. Codespaces is a good fit for trying the project, contributing, or using GitHub
  216. Copilot and build123d-mcp in one remote environment. For desktop AI apps on your
  217. own machine, the normal `uv tool run ... build123d-mcp@latest` setup is simpler
  218. because those apps expect to start the MCP server locally.
  219. ## What It Can Do
  220. build123d-mcp gives an assistant tools to:
  221. - Execute build123d code in a persistent CAD session
  222. - Render PNG, SVG, and DXF previews
  223. - Measure volume, area, bounding boxes, topology, and centers of mass
  224. - Find holes, bosses, countersinks, and hole patterns
  225. - Check printability, fit/alignment comparisons, and export validity
  226. - Import STEP/STL files for comparison
  227. - Export STEP, STL, DXF, SVG, or multiple formats at once
  228. - Save and restore session snapshots
  229. - Produce 2D engineering drawing previews
  230. For the complete tool and resource reference, see [llms.md](llms.md).
  231. ## Guidance For Assistants
  232. The server includes workflow guidance that helps assistants use the CAD loop
  233. properly. This is especially useful in coding agents that read project guidance
  234. files.
  235. After connecting the server, ask your assistant to call `install_skill` for the
  236. workflow you need:
  237. ```text
  238. install_skill(target="agents-md", skill="modeling")
  239. install_skill(target="agents-md", skill="drawing")
  240. install_skill(target="agents-md", skill="repair")
  241. ```
  242. `install_skill` also supports `target="claude"`, `"cursor"`, and `"windsurf"`.
  243. Use `skill="modeling"` for 3D parts, `skill="drawing"` for engineering drawings,
  244. and `skill="repair"` when a solid fails validation.
  245. You can also paste [default_prompt.md](default_prompt.md) into your AI app as a
  246. system prompt.
  247. ## Developer Setup
  248. For local development:
  249. ```bash
  250. git clone https://github.com/pzfreo/build123d-mcp.git
  251. cd build123d-mcp
  252. uv sync --all-groups
  253. uv run build123d-mcp --version
  254. uv run pytest
  255. ```
  256. To run the server from this checkout in an AI app, use:
  257. ```text
  258. command: uv
  259. args: ["run", "build123d-mcp"]
  260. ```
  261. See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
  262. ## Advanced Use
  263. The default stdio transport gives each app process its own isolated session.
  264. HTTP mode is available for web, container, or remote deployments:
  265. ```bash
  266. uv tool run --python 3.12 "build123d-mcp[http]@latest" \
  267. --transport http --host 127.0.0.1 --port 8000
  268. ```
  269. HTTP-capable apps then connect to:
  270. ```text
  271. http://localhost:8000/mcp
  272. ```
  273. HTTP mode has no built-in authentication and uses one shared CAD session unless
  274. the host provides per-request session middleware. Do not expose it to multiple
  275. users directly.
  276. HTTP mode enforces the MCP SDK's DNS-rebinding protection (Host/Origin
  277. header validation). With no extra flags only localhost Host headers
  278. (`127.0.0.1`, `localhost`, `::1`, any port) are accepted, regardless of
  279. `--host`. When the server is reached under a real hostname (reverse proxy,
  280. gateway, LAN or container bind), add the names. They are added to the
  281. localhost defaults, not substituted for them:
  282. ```bash
  283. uv tool run --python 3.12 "build123d-mcp[http]@latest" \
  284. --transport http --host 0.0.0.0 --port 8000 \
  285. --allowed-hosts 'cad.example.com,cad.example.com:*' \
  286. --allowed-origins 'http://cad.example.com,https://cad.example.com'
  287. ```
  288. `--allowed-origins` only matters for browser-based clients. A `:*` suffix
  289. wildcards the port but does not match the default port, so list the bare
  290. origin (and the `https://` form behind a TLS proxy) as well. Or, when a
  291. proxy/gateway terminates the real host and you trust the network layer,
  292. turn the check off. This removes the only browser-origin protection on a server
  293. with no authentication and a code-execution tool, so use it only behind a gateway
  294. you trust (the SDK check is all-or-nothing):
  295. ```bash
  296. uv tool run --python 3.12 "build123d-mcp[http]@latest" \
  297. --transport http --host 0.0.0.0 --port 8000 --allow-all
  298. ```
  299. `--disable-dns-rebinding-protection` is an alias of `--allow-all`;
  300. `--no-allow-all` overrides `BUILD123D_ALLOW_ALL=1` from the environment, and
  301. `--allowed-hosts ''` clears an allowlist set in the environment. Entries must be
  302. exact (no `*.example.com`), IPv6 hosts bracketed, and origins carry a scheme.
  303. Env vars: `BUILD123D_ALLOWED_HOSTS`, `BUILD123D_ALLOWED_ORIGINS`,
  304. `BUILD123D_ALLOW_ALL`. These flags apply to `--transport http` only.
  305. Other advanced topics:
  306. - Security model and sandboxing: [security.md](security.md)
  307. - Complete tool reference: [llms.md](llms.md)
  308. - Live session viewer: [docs/live-viewer.md](docs/live-viewer.md)
  309. - Changelog: [CHANGELOG.md](CHANGELOG.md)
  310. ## Status
  311. Active development.
  312. <!-- mcp-name: io.github.pzfreo/build123d-mcp -->

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.