b123d-print-mcp
Summary: Design, validate, and export 3D-printable parts end-to-end through an AI assistant, from writing build123d scripts to checking printability and producing slicer files.
Workflow & setup: read the guide/print rules, list parts, select a printer profile and material, and save first-run settings (formats, style, hole compensation, calibration).
Part authoring: create parts from templates or examples, read/write full scripts, inspect named dimensions (
params), tweak them in place (set_params), build with cache, and diagnose failures piece by piece.Visualization: render 6-view previews, colored cross-sections, and 2D sketch renders with auto-dimensions and sketch checks.
Print checks: validate solids, overhangs, bridges, thin walls, hole tops, bed-edge fillets, gaps, wall-adjacent cuts, and assembly fit/interference and hole alignment (
check,check_fit).Design review: get filament/time/cost estimates, style-based suggestions with sourced rules, and ranked print orientations.
Measurement & geometry picking: measure distances, walls, faces, and holes precisely; list stable face/edge IDs for fillets, chamfers, and selection.
Fit-test templates: generate slice/face/crop templates for quick-fit validation before full prints.
Export & delivery: export STEP, STL, 3MF, PNG, GLB, print sheets, BOMs, and specs; fetch whole parts from remote servers via
download_part.Compare & remix: compare a part to a reference model with deviation views and scores; upload/inspect original models (STL/3MF/STEP) and produce before/after deviation images.
Tracing: trace flat objects from scans/photos into mm-accurate 2D outlines.
Hardware & recipes: generate consolidated hardware/BOM lists and look up tested build123d recipes (snap arms, hinges, nut traps, etc.).
Version control: save, list, and restore project versions via git, with changed-dimension summaries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@b123d-print-mcp Design a 40 mm round spacer, 10 mm tall, with an M3 hole, and export STL."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
b123d-print
Vibe CAD for 3D printing. Tell your AI assistant what you need, in plain words, with a photo and a few caliper readings. It designs the part, looks at it from every side, checks it for printing problems and hands you a file for your slicer. No CAD skills needed, and it works with any assistant that supports MCP: Claude, Gemini CLI, Cursor, VS Code Copilot, Codex and more (which clients, and how to connect each).
What you can make
Ask the way you would ask a friend who owns calipers and a CAD program. These were designed this way, and printed:
"A box for this IR blaster board: the LED pointing out the top, a screw-on lid, two tabs to mount it on the wall." A two-part case, checked against a stand-in of the board so it fits.
"An outdoor case for this motion sensor. It should slide off a wall plate and keep the rain out." Dovetail rails, a click-in detent, a drain slot, and a cover that prints without supports.
"An adapter plate: 2-gang box behind, 1-gang smart switch in front." Counterbored screw holes, and a wall check added after the first print broke through a 0.05 mm skin no render showed.
Or remix a model you downloaded (STL, 3MF or STEP) and change it:
"Here's an L bracket STL I downloaded: turn its two mounting holes into slots and add gussets." The original is loaded as a solid and changed, the checks tell the original's flaws from new ones, and a before/after view shows exactly what moved. (A demo for the docs, not printed yet.)
Before a long print, test the fit with a fit-test template: a thin, quick print cut from the real part.
"Make a fit-test template of the mounting face so I can check the hole pattern." The assistant shows you the face in red, asks you to confirm, and gives you a 1.2 mm plate with the part's exact holes: minutes to print instead of hours.
Measuring something big, curved or awkward? Measuring for the AI shows which tool to use, how to photograph it with a scale, and a copy-paste measurement sheet and table of offsets (stations along a datum) that hand the numbers over without ambiguity.
And the everyday things: a spacer, a knob, a bracket, a cable clip, a replacement for a broken part you can measure. Then keep talking to it: "make it 5 mm taller", "add a hole for an M4 screw", "the lid is too tight". Every dimension stays a named number in a short build123d script, so each change is exact, and you get STEP files to keep editing in other CAD if you want.
|
|
Two-part box for an IR transceiver board, with the board stand-ins | Section through the LED: lid cone, board, clearances |
|
|
Outdoor sensor case: dovetail back plate + support-free cover | Wall plate: section just past the face, where the wall check looks |
|
|
Remix: a downloaded bracket, before and after | Where the remix differs: red cut, grey added |
Documentation: https://kd5ryn.github.io/b123d-print/
Related MCP server: gitcad
Get started in 2 minutes
b123d-print's MCP server is a plug-in that gives your AI assistant CAD tools. It runs on your own computer.
The easy way: paste this into your AI assistant (Claude Code, Claude Desktop, Cursor, Gemini CLI, Codex, …):
Install the b123d-print MCP server for me. It runs with
`uvx --from b123d-print b123d-print-mcp --workspace <folder>`
where <folder> is a folder for my parts, such as ~/parts.
Install uv first if it is missing (https://docs.astral.sh/uv/).
Add the server to your MCP settings, tell me when to restart you,
and after the restart check that its tools (list_parts, new_part,
build_part, ...) are available.It will probably ask to run a few commands (to install uv and add the server): that is expected.
By hand:
Install uv, which fetches Python and everything else b123d-print needs.
Add the server. Claude Code:
claude mcp add b123d-print -- uvx --from b123d-print b123d-print-mcp --workspace ~/partsOr install the Claude Code plugin (server + skill) in one step:
/plugin install b123d-print --marketplace KD5RYN/b123d-printClaude Desktop (Settings → Developer → Edit Config):
{ "mcpServers": { "b123d-print": { "command": "uvx", "args": ["--from", "b123d-print", "b123d-print-mcp", "--workspace", "/Users/you/parts"] } } }Cursor, VS Code, Gemini CLI, Codex and others: Connect your MCP client.
Restart the assistant.
Tell it your printer: ask "Set up b123d-print for my printer" (the setup_workspace
prompt; b123d-print setup in a terminal): printer, material, export formats, style, then the
calibration coupons.
Then ask: "Design a 40 mm round spacer, 10 mm tall, with an M3 hole." The files land in
your parts folder under parts/<name>/out/; the file for your slicer is in out/print/
(what to save). The first start downloads a
few hundred MB and can take a few minutes (Troubleshooting).
The assistant checks its work by looking at its renders, so use a client that passes tool
images to the model (Claude Desktop and Claude Code do).
Follow a whole session: your first part, a shelf bracket from install to print, and remix a downloaded STL.
Scope: parts for FDM 3D printing, nothing else. Everything is built around a printed part: print orientation with the bed at Z=0, hole compensation, mating clearance, calibration coupons, and print checks built on sourced FDM design rules. It is not a general CAD framework.
What's in it
b123d-printpackage + CLI — export, 6-view renders, colored multi-part cross-sections, and print checks: overlap between mating parts, overhang and bridges in print orientation, thin features and wall thickness around cuts, holes (round tops that sag), bed-edge fillets, gaps between moving parts, probes ("is the roof closed?").b123d-print-mcp— an MCP server, so it works from Claude Desktop, Claude Code, Gemini CLI, Cursor, VS Code, Codex and other MCP clients. Part scripts are model-written code: they run in a sandbox with a timeout and no network.compare— measure a part against a reference STL, 3MF or STEP: size, volume and surface differences, a 0–100 score, pass/fail, and a deviation view (comparing parts).Remix — start from someone else's STL, 3MF or STEP:
import_modelmakes a mesh a solid (coplanar triangles merged), the checks tell the original's problems from the ones the remix added, and a before/after view shows the change (remixing a part).Replicate — copy a physical part, often a molded one: a measurement plan, each dimension critical or free, molded features changed for FDM with reasons, and
replication_specchecking the model against the readings inMEASURE.md(replicating a physical part).Fit-test templates — a quick thin print of a face, a slice or a region of the real part (same holes and clearances) to check the hole pattern and the fits before the full print (fit-test templates).
Design review — after the print checks pass, the assistant reviews the part for a style you pick (functional, modern, least cost, rugged/outdoor, soft/handheld, structural/load-bearing, organic/natural, decorative/vase, toy/kid-safe): rough filament and time estimates, supports, edge treatment, layer steps, water traps, inside corners and walls, small parts for toys, and concrete suggestions from sourced design rules. It changes nothing without your OK (design review).
The workflow, model-neutral — MCP prompts plus an
AGENTS.mdany agent can read. The rules come from real prints; one exists because a part broke through a 0.05 mm skin that no render showed.Examples — four parts designed this way and printed, plus calibration coupons for holes, fits, and overhangs and bridges, in
src/b123d_print/examples/.
Advanced: run it on another machine
Not needed for most people. To keep the parts on a home server and design from a laptop, use SSH; for many agents sharing one server (eval runs, a team), HTTP with a named token per tool; for the strongest isolation (also on Windows), Docker. Which mode? compares them.
Documentation
Start here | Tutorial: your first part · Tutorial: remix a downloaded STL |
Getting started | Quick start · MCP clients (Claude Desktop, Claude Code, claude.ai, ChatGPT, Gemini CLI, Antigravity, OpenCode, Qwen Code, pi, Cursor, VS Code, Codex, Grok, Windsurf, Zed, LM Studio) · CLI and Python |
Advanced | Which mode? · Remote over SSH · Over the network (HTTP) · Docker |
Using it | How a session goes · Measuring for the AI · MCP tools and prompts · Output formats · From part to print · Settings · Hole compensation · Printer profiles · The checks · Sandbox · Comparing parts · Remixing a part · Replicating a physical part · Fit-test templates |
Part scripts | The part script · Checks API · Examples · Workflow rules · Design rules (sourced) |
More | FAQ · Reference · Updating · Troubleshooting · Contributing · Agent evals · Credits and licenses |
Status
0.x — early. The part-script convention may still change. CI tests macOS, Ubuntu and
Windows, the built package via uvx, and the Docker image on every push. On Windows the server
runs natively for local use, but without an OS sandbox (process isolation and an audit hook
only); use WSL2 or Docker for isolation. SSH mode's server side is macOS and Linux only; Windows
works as an SSH or HTTP client. Platforms and status.
Credits and license
b123d-print is a thin layer over build123d, Open CASCADE Technology (via OCP), lib3mf, OrcaSlicer's printer data, bd_warehouse and py_gearworks for part scripts, matplotlib, NumPy, the MCP Python SDK and uv. Details and redistribution notes: THIRD_PARTY.md.
MIT © KD5RYN and contributors.
Available Tools
35 toolsbefore_afterB
For a remix: the original and the remix side by side, and the original colored by how far the remix is from it (compare's deviation view: green = unchanged, red = changed), with compare's score and metrics. The original is what build() loads with import_model, or what the script's original(d) returns. export writes the same two images when it writes PNGs.
Inputs: name (required), size, inline, variant.
build_partA
Run the part script (sandboxed, with a timeout) and report, per variant and part: bounding box size and min/max (mm), volume (mm^3), solid count, is_valid, the Dims values, and any error with its traceback; and under "timing" each piece's face count and build time, with a hint for a piece that is slow or dense. variant: key from VARIANTS ('standard' = ''). parts: comma-separated piece names from build(): build only those (lazy pieces: the others are never built). Built pieces are cached in out/.cache/, so render_preview, section, check and export reuse them while the script, its Dims and the settings stay the same; fresh=True builds again and replaces the cached pieces. Writes no other files. Ends with "before_printing": the review steps this version still needs, each with its call.
Inputs: name (required), fresh, parts, variant. Returns: result
checkA
Run the print checks: validity, overlap between assembly parts (incl. stand-ins), overhangs > 45 deg from vertical in print orientation (bed face ignored) and bridge spans, thin features (walls under one line width fail), round-topped horizontal holes, fillets on bed edges, gaps between parts printed in place, the script's Wall checks (thinnest material around deep cuts) and Probes. The fit between an assembly's pieces (hole alignment, gaps) is a separate tool, check_fit, unless the script lists Mates() in checks(d). Fix every FAIL; report every WARN. On a remote server (HTTP/SSH) the part is not on the user's machine until download_part brings it home. Uses the pieces cached by an earlier build, and each unchanged piece's findings of the per-piece checks; fresh=True builds and checks everything again. A passing result ends with the review steps this version still needs, each with its call.
Inputs: name (required), fresh, variant. Returns: result
check_fitA
How the pieces of assembly(d) fit together, as placed (stand-ins count as obstacles): interference (pairs that overlap: the volume and where; pairs closer than the clearance without touching: the gap and where; faces resting on each other are contact) and hole alignment (round holes of two pieces on one axis are partners: offset beyond hole_tol mm, default 0.2, fails; their diameters read as screw holes, clearance + pilot / insert / nut, and a pair no single screw explains warns; a hole whose axis runs into solid material of the next piece has no partner). Male/female joint pairs from the script's joints(d) (or a Mates(joints=...) in checks(d)) are intentional fits measured against their own clearance. Stand-ins: labels saying stand-in or dummy, or matching no piece of build(). verbose: list the passing pairs too. One variant, or all. Uses the build cache (fresh=True rebuilds).
Inputs: name (required), fresh, variant, verbose, +1 more. Returns: result
compareA
Compare a part with a reference model: bounding box, volume and surface area differences, surface distances (mean, Hausdorff) after aligning orientation, an F-score, a 0-100 score and pass/fail. reference, candidate: STL, 3MF or STEP files inside the workspace, as paths relative to it (e.g. 'refs/bracket.stl', 'parts/bracket/out/print/bracket.3mf'). thresholds: optional overrides, comma-separated name=value (e.g. 'hausdorff_mm=2,volume_rel=0.05'). image: also return a view of the reference colored by deviation (green = matches, red = off); size: 'normal' or 'small' (~800 px wide); inline=False returns only its file (over HTTP: a link). Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts// layout). Never use ssh, scp or a shell on the server: there is none.
Inputs: candidate (required), reference (required), size, image, +2 more.
describe_modelA
Inspect an original model before remixing it: format, units (and whether they look wrong), size, volume, triangles and faces before/after merging coplanar triangles, how much is curved (faceted), round holes (diameter, axis, center), repairs needed, the designer/license metadata the file carries, and a suggestion: MODIFY it or REDRAW it. part: the part it is for. file: a name in parts//ref/ (or a workspace path such as 'refs/x.stl'). scale: '' (as the file says), a factor, or the unit the file was drawn in ('inch', 'cm'). image: also a 6-view render (saved as parts//out/images/_original.png).
Inputs: file (required), part (required), size, image, +2 more.
design_metricsA
Design numbers for the design review, per printable part: size and proportions, filament (simple estimate, roughly +-20 %) and cost, print time (rough estimate), supports, shallow slopes that show layer steps, edge treatment (sharp / filleted / chamfered shares, distinct radii and chamfer sizes), mirror symmetry, screw sizes, seam corners, water traps, inside corners, hole edge distance, slenderness across the layers, vase-mode layers and lean (and the thinnest walls for a style that asks); then the suggestions the part's style triggers, each citing its DS-* rule. ALWAYS before export, after check passes; report its suggestions to the user. style: override the part's STYLE (functional, modern, least_cost, rugged, soft, structural, organic, decorative, toy, or a style file of the user's: list_parts shows them). up: the direction that points up in use for the water-trap check (+X, -Y, ...; default the script's UP, else +Z). as_json: the full numbers as JSON instead of the text report. Changes nothing.
Inputs: name (required), up, style, as_json, +1 more. Returns: result
diagnose_failureA
The deeper look after a failed or broken build (failed results already carry a short DIAGNOSIS): builds one variant piece by piece, each on its own and without the build cache, and for each piece reports the error with its likely cause and specific fixes (where in the script, the piece, the numbers: e.g. the largest fillet radius that works on those edges), or for a piece that built, what makes it unprintable (invalid solid, zero volume, a 2D shape, not on the bed) and, for an invalid one, which faces and edges are bad, tiny edges and sliver faces left by booleans, and whether part.fix() repairs it. Then the assembly. parts: only those pieces. Stops before the time limit and names the pieces it did not get to.
Inputs: name (required), parts, variant. Returns: result
download_partA
Bring a whole part home from a remote server, in the same layout a local install writes:
parts//.py, parts//out/ (exports, renders, sections) and parts//ref/
(reference models). Over HTTP: ONE signed link (no token needed, expires) to a zip of all of
it; run curl -fLo <name>.zip '<link>' and unzip it in the project folder, then check the
files are there. Over SSH: the b123d-print pull command that writes the same files. Locally
(stdio): says where the files already are. variant: only that variant's out/ files ('standard'
= ''); formats: only those out/ files (step, stl, 3mf, png, glb, print, hardware, bom, bom_csv, spec); the script and ref/ always come.
Over HTTP it also gives the 3D view links of the views export wrote (in a browser, no token).
embed=True also puts the zip (up to 8 MB) into the result (over HTTP and SSH), for clients
whose shell has no network (Antigravity/agy) or that can neither fetch URLs nor read
resources: unzip it from where the client saved it. Call it as the last step of remote work,
before reporting: a part is not done until its files are on the user's machine.
Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted
when unused; bring the part home with download_part (one zip in the parts// layout).
Never use ssh, scp or a shell on the server: there is none.
Inputs: name (required), embed, formats, variant.
exportA
Export printable parts to parts//out/, sorted: print/ (3MF, STL, print sheet: for the
slicer), cad/ (STEP, GLB), images/, docs/ (BOM, view HTML), README.md. Default: every part, all variants. The
files must reach the user: on a remote server download_part brings them home.
parts: comma-separated part names from build() to build and export only those; variant: one
variant. Uses the pieces cached by an earlier build and leaves files already up to date as
they are (templates too); fresh=True builds and writes everything again.
formats: comma-separated from step (other CAD: Onshape, Fusion, FreeCAD), stl and 3mf
(slicers; 3MF keeps units), png (6-view preview + section views), glb (binary glTF, for web
and 3D apps), print (the print sheet, [_]print.md: size, filament and time
estimates, supports, tip-over, walls and infill, fits and hole compensation, PRINT_NOTES, for
the slicer, including declared hardware), hardware (versioned whole-assembly BOM JSON,
[]hardware.json), bom and bom_csv (the shopping list of that hardware as a
Markdown table, []_bom.md, and as CSV, bom.csv; hardware_list returns it in
the result), spec (the replication spec from MEASURE.md, []_spec.md, for a
part copied from a physical original; replication_spec returns it), or 'all'. Omit to use the user's formats setting (default: step, stl, 3mf and
png). Ask the user which they want if unclear.
view: a 3D view the user can turn in a browser, per variant: 'print' (default: the printable
parts on the bed), 'assembly' (assembly(d) with its stand-ins) or 'none'. Over HTTP it is a
signed link (no token, expires like the downloads); locally a self-contained HTML file in
out/docs/ (works offline). Offer it to the user after an export.
Over HTTP (a remote server) each file comes with a download link (no token needed, expires)
and a b123d-print://files/ resource link; download_part gets the whole part (script, out/,
ref/) in one zip. embed=True also puts files up to 2 MB into the result itself, for clients
that can neither fetch URLs nor read resources.
Before export, ALWAYS: check passes, design_metrics(name, style=...), suggest_orientation(name)
(the "Before printing" block of build_part and check lists what is missing). With the review
setting "warn" (default) export says what was skipped, here and on the print sheet; with
"required" it refuses until the steps are done. skip_review: only when the user said to export
without them, their reason (recorded on the print sheet).
Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted
when unused; bring the part home with download_part (one zip in the parts// layout).
Never use ssh, scp or a shell on the server: there is none.
Inputs: name (required), view, embed, fresh, +4 more.
hardware_listA
What to buy: the bought hardware the script declares in hardware(d) (screws, inserts,
magnets, bearings), as one Markdown table to show the user: Qty | Item | Specification |
Used for | Source/link | Status ("check before ordering" where the specification is not
confirmed: ask the user, never guess it). Identical items are merged and summed. Offer it
when a part declares hardware. name: one part; parts: comma-separated part names to merge
into one list (each may be part:variant); neither: every part in the workspace. variant: the
variant (default: the standard one). count: how many assemblies ("for 4 brackets"), which
multiplies every quantity. format: 'table' (Markdown) or 'csv' (for a spreadsheet or cart).
Reads only hardware(d): builds nothing. The bom and bom_csv export formats write the
same list next to the exports. Changes nothing.
Inputs: name, count, parts, format, +1 more. Returns: result
list_edgesA
The edges of a printable part, to pick the ones for a fillet or chamfer by id instead of
guessing a selector: stable ids (1 = the longest; changed geometry may renumber), type (line,
circle, arc, ellipse, spline), length, start and end (or center and radius), convexity (convex:
an outside edge; concave: an inside corner; tangent: a smooth joint such as a fillet's side;
seam), the turn between its faces and the two faces it joins (flat faces by their list_faces
id, curved ones by type). Filters: face (an id, side or 'x,y,z' as in list_faces: its edges),
kind, convexity, near ('x,y,z': edges within radius mm, nearest first); limit caps the list.
part: which printable part. highlight: edge ids ('3,4,7', '3-6' or a list): also returns a
picture with them in red and selector, a build123d expression (filter_by/group_by/sort_by
on part.edges(), one face's edges or convex_edges/concave_edges(part)) that selects exactly
those edges, verified on the part; put that in the script, never the ids (they change when the model changes).
size: 'normal' or 'small'.
Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted
when unused; bring the part home with download_part (one zip in the parts// layout).
Never use ssh, scp or a shell on the server: there is none.
Inputs: name (required), face, kind, near, +8 more.
list_facesA
The flat faces of a printable part, for picking one for a face fit-test template (make_template kind='face'): stable ids (1 = the largest; the same geometry always gets the same ids, changed geometry may renumber), outward normal and side (bottom, top, front, back, left, right), area, center, bounding box, round holes (diameter, center) and other openings; curved faces are only counted. part: which printable part (default: the only one). highlight: a face id or side; also returns a picture of the part with that face in red, to confirm the choice with the user before making the template. size: 'normal' or 'small'. Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts// layout). Never use ssh, scp or a shell on the server: there is none.
Inputs: name (required), part, size, inline, +2 more.
list_partsB
List the part scripts in the workspace, with the settings in effect.
Inputs: no named parameters. Returns: result
list_versionsB
The saved versions, newest first: date, id, message and the Dims values that changed. With part: numbered versions of that part (for restore_version), and what is not saved yet. On a shared (HTTP/SSH) server: the command for the user's own project folder.
Inputs: part. Returns: result
make_templateA
A fit-test template: a quick thin print cut from the real part (same hole compensation and
clearances) to check size, hole pattern and mating fits before printing the whole part. kind:
'slice' (plane XY/XZ/YZ at = Z/Y/X: the part between two planes thickness apart, centered
on at), 'face' (face: an id from list_faces, a side such as 'bottom', or 'x,y,z' on it: that
flat face with its holes as a plate; a side means the largest face facing that way) or 'crop' (center, size: x,y,z in mm: the part inside
that box, with a thin base plate where it needs one; base=False: never). thickness: mm
(default 1.2). label: engrave ' ' (default), your own text, or false; skipped when
there is no room. The template is laid flat (template face down, Z=0) and checked like a
part. Writes template.* in formats (default: the formats setting): 3MF/STL in
parts//out/print/templates/, STEP in out/cad/; with png also out/images/<...>_where.png, the part with the template's source in red (returned
as the image; inline=False: only the file). Confirm the face or region with the user first
(list_faces with highlight).
Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted
when unused; bring the part home with download_part (one zip in the parts// layout).
Never use ssh, scp or a shell on the server: there is none.
Inputs: kind (required), name (required), at, base, +10 more.
measureB
Precise measurements on the built part, in mm, with the points where they were taken: check fits with numbers instead of guessing from pictures. kind: 'distance' (a, b: piece names from build() or assembly labels, stand-ins included): the smallest gap and its two points, or when they overlap the interference volume, its box and depth. Two assembly labels are measured where assembly(d) puts them (the fit). 'wall' (at: x,y,z on or in the material; direction: optional x,y,z): the thickness along a line through the point (default: into the part along the nearest face's normal), with the gaps and walls beyond it. 'faces' (face, face2: ids or sides from list_faces): the distance between two parallel flat faces (a wall, a slot), or the angle between them, and their closest points. 'hole' (face: a flat face id or side, and/or at: a point at the hole): each round hole's modeled diameter, what it prints at after hole_comp, center, axis, through or blind depth. a: the piece for wall, faces and hole (default: the only one). frame: 'auto' (default), 'print' (as build() returns it) or 'assembly' (as assembly(d) places it); points are in that frame. image: also a picture of the part with what was measured in red. Uses the build cache.
Inputs: kind (required), name (required), a, b, +9 more.
new_partA
Create parts//.py from the template (Dims dataclass, build(d), VARIANTS, views, checks). name: lower_snake_case. example: copy a bundled example instead (see list_parts), e.g. 'hole_coupon' to calibrate hole compensation. sketch_first: the template with a sketches(d) outline that build(d) extrudes, for a part that is mostly a 2D shape made solid (offer it per part, see the guide's Sketch first); check the outline with render_sketch. Returns a short confirmation; the template is the b123d-print://template resource (or read_part), show_code=True returns the new file's code here. Usually the next step is write_part with the whole script. If you haven't, call read_guide first; confirm the dimensions with the user before writing the script.
Inputs: name (required), example, show_code, description, +1 more. Returns: result
paramsA
The part's named dimensions, read from the script without running it: each Dims field with its type, default as written, value (when the default is a literal), the comment saying where it came from, and its line; the derived values (@property) and the fields they use; and each variant's overrides in VARIANTS. Change one with set_params, not a whole rewrite.
Inputs: name (required). Returns: result
read_guideA
The workflow and print rules (the b123d-print://guide resource). Call it once before the first part in a session: many clients never load that resource. essentials=True: only the short checklist of the rules most often skipped.
Inputs: essentials. Returns: result
read_partC
Return the current code of a part script.
Inputs: name (required). Returns: result
recipeA
Tested build123d recipes for common printable features, with printing notes and sources: teardrop holes, counterbores and countersinks, nut traps, magnet pockets, snap arms (with strain sizing), living hinges, print-in-place hinges, lids with a lip, text, bed-edge chamfers, zip-tie and cable slots, ribs and gussets. name: '' lists them; a recipe (or one of its function names) gives its code, an example and the notes. Use one before improvising the feature; part scripts import them: from b123d_print.recipes import snap_arm.
Inputs: name. Returns: result
render_previewA
Render six views (iso, top, front, right, iso from below, bottom) as a PNG image. parts: comma-separated part names from build() (several are laid out side by side; only those are built), 'assembly' (assembled position with stand-ins), or omit: the assembly if the script has one, else every printable part side by side. One variant (default: the first). size: 'normal' or 'small' (~800 px wide, cheaper). inline=False returns only the file (over HTTP: its download link), not the image itself. Uses the pieces cached by an earlier build; fresh=True builds them again. Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts// layout). Never use ssh, scp or a shell on the server: there is none.
Inputs: name (required), size, fresh, parts, +2 more.
render_sketchA
Sketch first: one 2D shape from the script's sketches(d) hook, drawn flat on a mm grid as a PNG, with automatic dimensions (overall size, hole diameters, slot widths, inside corner radii, hole and slot centres from the lower-left corner) and the sketch checks: one closed region, the narrowest neck against min_wall, inside corners under R0.5 (BP-R1), holes under 1 mm, the outline against the bed. Show it to the user and get an OK before build(d) extrudes, revolves or sweeps it. sketch: its name in sketches(d) (default: the first). dims=False draws the shape and grid only. Nothing 3D is built. size: 'normal' or 'small'. Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts// layout). Never use ssh, scp or a shell on the server: there is none.
Inputs: name (required), dims, size, inline, +2 more.
replication_specA
The replication spec of a part copied from a physical original (the replicate_part
prompt): its MEASURE.md table (Feature | Value | Method | Accuracy | Status | Class | Source |
Field | Why changed) joined with the script's Dims values, as one Markdown table (Feature |
Field | Class | Source | Measured | Tol | Modeled | Δ | Why changed) plus flags: a critical
value still an estimate or not measured, readings spread wider than their accuracy (draft, an
oval hole, warp), a critical value modeled differently with no reason, a Field the script
lacks. Several readings in a Value cell ("4.21, 4.19, 4.22") are averaged. variant: whose Dims
(default: the standard one). Reads MEASURE.md and the Dims only: builds nothing, changes
nothing. The spec export format writes the same table to out/docs/.
Inputs: name (required), as_json, variant. Returns: result
restore_versionA
Bring a part (script, ref/, MEASURE.md) back to a saved version: a number from list_versions(part), or a commit id. It is saved as a NEW version, so nothing is lost: no reset, no deleted history, files added later are kept. Refused while the part has changes not saved yet (offer save_version first). Ask the user before restoring; then build_part and check. On a shared (HTTP/SSH) server: the commands for the user's project folder (version = the commit id), then write_part to put the restored script back on the server.
Inputs: part (required), version (required). Returns: result
save_setupA
Save the user's first-run answers (the setup_workspace prompt): printer (a name from use_printer's search, or a nickname), material, formats ("3mf,png"), default style; hole_comp=0 records that the slicer corrects holes (the default way); a nonzero, MEASURED hole_comp / hole_comp_h is an opt-in that builds the correction into every file; calibration: other coupon results, e.g. {"clearance": 0.18, "max_bridge": 15}. With a printer, measured values are stored for it and the material. Written where use_printer writes. A value already set there is kept and listed as a conflict: ask the user, then call again with overwrite=True. Empty arguments change nothing. move_flat=True (after asking the user) moves measured values set for every printer of a workspace under the active printer.
Inputs: style, formats, printer, material, +5 more. Returns: result
save_versionA
Save a version of the project in its version history (git, on the user's machine): each part's script, its ref/ folder, MEASURE.md and the .py files beside it, and b123d-print.toml; never out/. Only when the user said yes: after a change that built and passed its checks, OFFER "Save this version? (: )", never save on your own. message: what changed, in the user's words ("arm 115 -> 130 mm"); part: only that part (default: all). The result says what was saved and the changed Dims values. start=True first makes the project folder a git repository with a .gitignore: only after the user agreed to keep a version history. On a shared (HTTP/SSH) server it runs nothing and returns the commands for the user's own project folder.
Inputs: message (required), part, start. Returns: result
sectionA
Cross-section as a PNG image, each part in its own color. plane: 'XY' (at = Z height), 'XZ' (at = Y) or 'YZ' (at = X), in mm. parts: default the assembly if the script has one (shows fit and clearances), else all printable parts; or comma-separated names (only those are built). size: 'normal' or 'small' (~800 px wide). inline=False returns only the file (over HTTP: its download link), not the image itself. Uses the pieces cached by an earlier build; fresh=True builds them again. Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts// layout). Never use ssh, scp or a shell on the server: there is none.
Inputs: at (required), name (required), plane (required), size, +4 more.
set_paramsA
Change Dims values in the script in place, leaving every other character of the file as it was: values {"FIELD": new value, ...} replaces each field's default (only literal defaults: a default computed by an expression such as hole_comp(file) is refused with the reason; so are unknown fields, derived @property values and values of the wrong type). variant: change (or add) that variant's override in VARIANTS instead of the default. rebuild (default true): build before and after (the build cache makes "before" quick) and report what changed per piece: size and volume; parts: only those pieces. Saved like write_part (size limit, must compile). If the new build fails, the result has the diagnosis and the call to undo it.
Inputs: name (required), values (required), parts, rebuild, +1 more. Returns: result
suggest_orientationA
Rank the ways to put the part on the bed, so it does not print upside down or on a thin edge: the six axis-aligned orientations and the large flat faces of its convex hull, each scored on supports (area and grams under overhangs past max_overhang, bridges apart), bed contact, height and print time (rough estimates), bridges, tip-over risk (as the check) and, with a load or the structural style, whether the load runs along the layers (DS-T1). Returns a ranked table with the Rot(x, y, z) to apply in build(d) and how. ALWAYS before export (a part already flat on the bed: it says so in a second). piece: one printable part (default: each). load: the bending or tension direction as build(d) returns the part ('X', 'along Y', 'XZ', '1,0,1'). image: also render the top choice (of the first part). Changes nothing. Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted when unused; bring the part home with download_part (one zip in the parts// layout). Never use ssh, scp or a shell on the server: there is none.
Inputs: name (required), load, size, image, +3 more.
trace_outlineA
Trace a flat object in a scan or photo (parts//ref/, from upload_reference) into a
2D outline in mm for a part script: the largest object's outline and its holes, simplified to
tolerance mm (few points: dense polylines build slowly), or with smooth=True through-points
for a periodic spline. Scale, one of: dpi (a flatbed scan; omit everything to read it from the
file), grid (cell size in mm of a grid or cutting mat under the object), reference ('card' =
a credit card 85.60 x 53.98 mm beside the object, or 'L,S' mm of another rectangle), or points
('x1,y1,x2,y2' pixels, origin top left) with distance (mm between them). pick: 'x,y' pixel
inside the object to trace when it is not the largest. threshold (0..1) and invert (object
lighter than the background) override the automatic threshold. Writes out/docs/_outline.json
(the points), out/docs/_outline.py (a snippet with OUTLINE, OUTLINE_HOLES and a face function)
and out/images/_trace.png (the outline on the image: show it to the user to confirm). A scan is
accurate to about a pixel; a photo only as far as it is square-on, flat and undistorted:
check a known dimension before trusting it.
Remote server (HTTP/SSH): the files stay on the server, as a temporary working copy deleted
when unused; bring the part home with download_part (one zip in the parts// layout).
Never use ssh, scp or a shell on the server: there is none.
Inputs: file (required), part (required), dpi, grid, +9 more.
upload_referenceA
Get an original model (STL, 3MF or STEP) onto the server, into parts//ref/,
to remix it, or a scan or photo (PNG, JPEG, TIFF, BMP) to trace with trace_outline (the part
folder may not exist yet). With data_base64 (the whole file, base64) it
is stored now, up to 50 MB; that is only practical for small files, since the model has to
write out every byte. Without it, the result says how the USER copies the file: over HTTP a
signed upload link for curl -fT <file> '<link>' (no token needed, expires), over SSH the
b123d-print push command, locally the folder to copy it into. Then describe_model.
Inputs: part (required), filename (required), overwrite, data_base64. Returns: result
use_printerA
Optional printer profile (default is generic mode). search: find printer names ("bambu a1", "prusa mk4"). name: make it active (saved in the user's config, or over HTTP and SSH in this workspace's b123d-print.toml; "generic" clears it); a nickname given before works too. nickname: only for two printers of the same model, e.g. name='bambu_lab_p2s_0_4_nozzle', nickname='p2s-garage': each nickname keeps its own calibration. material: pla, petg, asa, abs, tpu or the user's own. Only change the printer when the user asks for it.
Inputs: name, search, material, nickname. Returns: result
write_partA
Replace the whole part script with code (create the part with new_part first).
The script must define build(d) (+ Dims, VARIANTS). If you haven't, call read_guide first;
confirm the dimensions with the user before writing the script. Then call build_part.
Inputs: code (required), name (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Most tools have clearly distinct jobs across the design-to-print lifecycle, and descriptions explicitly separate close pairs such as check vs check_fit and build_part vs diagnose_failure. A few boundaries remain fuzzy, notably save_setup vs use_printer for configuration, compare vs before_after for reference comparison, and measure vs check_fit for fit numbers.
The dominant pattern is snake_case verb_noun, as in read_part, build_part, check_fit, save_version, and upload_reference. Some names break the pattern with single verbs/nouns such as section, export, recipe, params, check, and measure, and hardware_list reverses the verb_noun order, but the convention remains mostly readable and predictable.
At 35 tools, the surface is well above the rubric's well-scoped range and feels heavy for an agent to manage. The broad CAD/printing workflow justifies many specialized operations, but several fine-grained tools could likely be consolidated under action parameters.
The set covers an unusually complete workflow: onboarding and recipes, part authoring/editing, build and diagnosis, print checks and fit measurement, rendering/export, version history, remote transfer, reference inspection/tracing, and hardware BOMs. Minor gaps remain, such as no explicit delete/rename part operation and some workspace/file administration left implicit.
Maintenance
Related MCP Connectors
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Text-to-CAD: build exact STEP or 3MF/STL on the server, each stated requirement measured.
Design 3D-printable parts by chatting: create, edit, render and publish parametric forges.
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to create and manipulate 3D models using OpenSCAD through MCP tools for code-based modeling, preview, and export.1MIT

gitcadofficial
AlicenseNot gradedqualityDmaintenanceEnables agents to create and manipulate 3D CAD models using natural language via MCP, with git-based versioning and manufacturing output generation.2Apache 2.0- AlicenseNot gradedqualityBmaintenanceEnables AI agents to design, modify, and verify exact B-rep 3D CAD models by running build123d scripts on an OpenCascade kernel, with live three.js preview, collision and FDM printability checks, text-based spatial perception, user notes/sketch annotations, version history, and one-click export to OrcaSlicer.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to build and edit native CAD parts and assemblies, inspect saved geometry and measurements, retain revisions, run mechanism and interference checks, and export STEP/STL/GLB artifacts through MCP tools.MIT





