PluginBench
MCP Server
Active
Apache-2.0

build123d MCP MCP Server

io.github.pzfreo/build123d-mcp

AI-driven 3D CAD via build123d: execute, render, measure, and export geometry interactively.

What is the build123d MCP MCP server?

The build123d-mcp MCP server is a CAD toolbox that enables AI assistants like Claude and Cursor to create, visualize, and validate 3D models using the build123d library. It provides tools to execute CAD code, render previews, measure geometry, and export files in formats like STEP, STL, SVG, and DXF, allowing iterative design with real-time feedback.

build123d-mcp lets AI assistants build 3D CAD models incrementally with visual feedback. Instead of writing complete CAD scripts blindly, the assistant can create features step-by-step, render previews, measure dimensions, validate results, and export finished parts. It integrates with Claude, Cursor, VS Code, Continue, Cline, and other MCP-compatible AI apps running on your machine.

How to install build123d MCP

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "build123d-mcp": {
      "command": "uvx",
      "args": [
        "build123d-mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • execute — Execute build123d code in a persistent CAD session
  • render — Render PNG, SVG, and DXF previews of geometry
  • measure — Measure volume, area, bounding boxes, topology, and centers of mass
  • find_candidates — Find holes, bosses, countersinks, and hole patterns in geometry
  • validate — Check printability, fit/alignment comparisons, and export validity
  • import — Import STEP/STL files for comparison
  • export — Export STEP, STL, DXF, SVG, or multiple formats at once
  • compare — Compare shapes and geometry for fit/alignment
  • edit_feature — Edit imported features like holes with validation
  • interface_features — Suggest flat faces carrying holes for editing
  • save_snapshot — Save and restore session snapshots
  • install_skill — Install workflow guidance for modeling, drawing, or repair tasks

Use cases

  • Create 3D mechanical parts with iterative design feedback from an AI assistant
  • Generate CAD models from natural language descriptions with real-time rendering and validation
  • Modify imported STEP files by resizing holes and other features with automatic validation
  • Produce 2D engineering drawing previews and export multiple file formats for manufacturing
  • Validate CAD geometry for printability and export readiness before fabrication

build123d MCP MCP server FAQ

What is build123d-mcp?

build123d-mcp is an MCP server that gives AI assistants like Claude and Cursor access to 3D CAD tools. It lets them create, render, measure, and export CAD models using the build123d library, with real-time feedback instead of blind scripting.

Is build123d-mcp free?

Yes, build123d-mcp is open-source under the Apache 2.0 license and available free on PyPI.

How do I install it in Cursor or Claude?

Install via uv: add the command `uv` with args `["tool", "run", "--python", "3.12", "build123d-mcp@latest"]` to your MCP config file (e.g., `~/.cursor/mcp.json` for Cursor or `~/.claude/mcp.json` for Claude Desktop). Restart the app after editing.

Do I need to clone the repository?

No. For normal use, install from PyPI via uv. You only need to clone the repository if you want to contribute or develop locally.

What Python versions are supported?

Python 3.11, 3.12, 3.13, and 3.14 are supported. The examples use 3.12 as a conservative default.

Can I use build123d-mcp in GitHub Codespaces?

Yes. Open the project in GitHub Codespaces for a browser-based trial with VS Code, GitHub Copilot Chat, and all CAD dependencies pre-installed.

README (reference)

Source of truth, from the repository.

build123d-mcp

PyPI version Downloads Python CI License: Apache 2.0 MCP Registry build123d-mcp MCP server

Install in VS Code Add to Cursor

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:

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:

  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 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:

Open in 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:

  1. Open the codespace.
  2. Wait for setup to finish.
  3. Open Copilot Chat and choose Agent mode.
  4. Open .vscode/mcp.json and start the build123d-mcp server if VS Code has not started it already.
  5. 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.

Other advanced topics:

Status

Active development.

<!-- mcp-name: io.github.pzfreo/build123d-mcp -->

Related MCP servers

Local AI vision MCP server for Windows: OCR, chart analysis, scene description. 100% offline.

1
View repository →

MCP server for AgentDrop - encrypted file transfer between AI agents across any host or network.

1
TypeScript
MIT
View repository →
SESerial MCP logo

MCP server for serial port communication. 25 tools, resources, prompts, and stdio/HTTP transports.

5
Rust
MIT
View repository →

MCP Server for software testing, test case management, test execution, and defect tracking.

0
JavaScript
MIT
View repository →

Search a Spanish gaming-community archive and receive exact x402 page purchase URLs.

0
MIT
View repository →

MCP server that checkpoints long agent tasks: roll back to any step, resume in a new session.

0
Python
MIT
View repository →