MCP server · Audited from source
Build123d MCP server
by pzfreo/build123d-mcpApache-2.0 licenceAudited 8 Oct 2026 · source de8e6242de54
Is it safe? No — BLOCK, grade F (46/100). It exposes 44 tools: 30 read, 12 write and 2 destructive. The audit recorded 27 findings (1 critical, 5 high, 5 medium, 15 low). Maintainer's description: MCP server for build123d to improve AI cognition when creating 3D CAD models
Cite
Cite this page
ModelsAtlas. “Build123d MCP server (pzfreo/build123d-mcp)”. Retrieved 8 Oct 2026. https://modelsatlas.com/mcp/pzfreo/build123d
Why this is BLOCK. The audit found 1 critical and 5 high findings; the most severe is Prompt injection at <tool:list_sessions>:1. Each finding is listed below with its file and line.
Why this page is still public. People search for this server by name. Hiding it would leave them with the README's word alone; here they see what the code does. We list it so you can decide, and we do not show connect commands for BLOCK servers.
Trust audit
Audit 0.4.1 · full source read 8 Oct 2026
27 findings, listed below with the file and line each was found on. Grade A needs a sandboxed behavioural run too; this audit read the source only.
What the source does
- FilesystemDeclared5 observations
- NetworkNone observedNothing seen in the source
- ShellDeclared7 observations
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Findings (27)
Sorted by severity · the 25 most severe of 27 are listed
CRITICALPrompt injectionprompt.transfer_instruction · <tool:list_sessions>:1
Report how many CAD sessions this server process is holding, its configured limit, and how long each has been idle. Handles are secrets and are never returned. Operator/diagnostic tool for HTTP deploy
- Why
- an instruction to move sensitive data to an outside destination
- Fix
- remove; a skill never needs the user's secrets off the machine
HIGHCode injectioncode.deserialize · src/build123d_mcp/_vtk_render_subprocess_worker.py:22
args = pickle.load(f)
- Why
- deserialises untrusted bytes into live objects
- Fix
- use json or yaml.safe_load
HIGHCode injectioncode.deserialize · src/build123d_mcp/tools/render.py:506
result = pickle.load(f)
- Why
- deserialises untrusted bytes into live objects
- Fix
- use json or yaml.safe_load
HIGHCode injectioncode.eval_exec · src/build123d_mcp/session.py:806
exec(compiled, self.namespace) # noqa: S102
- Why
- evaluates text as code
- Fix
- remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/build123d_mcp/tools/library.py:160
exec(compile(source, entry["path"], "exec"), namespace) # noqa: S102
- Why
- evaluates text as code
- Fix
- remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/build123d_mcp/tools/resolve.py:234
result = eval(expression, namespace) # noqa: S307
- Why
- evaluates text as code
- Fix
- remove; use a parser or a dispatch table
MEDIUMInventory / provenanceinv.binary · .coverage
.coverage
- Why
- a compiled or binary member cannot be reviewed from source
- Fix
- ship source, or explain the binary in the README
MEDIUMInventory / provenanceinv.symlink · .claude/skills/b123d-drawing/SKILL.md
.claude/skills/b123d-drawing/SKILL.md
- Why
- link not followed
- Fix
- —
MEDIUMCode injectioncode.dynamic_import · src/build123d_mcp/bd_warehouse_resource.py:158
m = importlib.import_module(mod_name)
- Why
- No further detail recorded for this rule.
- Fix
- —
MEDIUMCode injectioncode.dynamic_import · src/build123d_mcp/worker.py:277
fn = getattr(importlib.import_module(module_name), func_name)
- Why
- No further detail recorded for this rule.
- Fix
- —
MEDIUMFilesystem / pathmcp.destructive_tools
destroy_session, reset
- Why
- 2 tool(s) can delete or overwrite
- Fix
- prefer a read-only mode or scoped tokens; the page states the blast radius
LOWCode injectioncode.dynamic_import · tests/test_worker_boundary_coverage.py:76
fn = getattr(importlib.import_module(module_name), func_name)
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.system_paths · tests/test_allow_all_imports_sandbox.py:29
check_ast("open('/etc/passwd')")- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.system_paths · tests/test_no_sandbox.py:49
check_ast("open('/etc/passwd'); getattr(x, '__class__')") # must not raise- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.system_paths · tests/test_outcomes.py:143
result = execute_code(session, "data = open('/etc/passwd').read()")- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.system_paths · tests/test_path_safety.py:30
r"C:\Windows\System32\drivers\etc\hosts" if sys.platform == "win32" else "/etc/passwd"
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.system_paths · tests/test_tools.py:22
r"C:\Windows\System32\drivers\etc\hosts" if sys.platform == "win32" else "/etc/passwd"
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · tests/test_path_safety.py:32
_TRAVERSAL = "../../etc/passwd"
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · tests/test_tools.py:1601
export_file(session, "../../etc/passwd", "step")
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · tests/test_tools.py:2025
render_view(session, "iso", save_to="../../etc/passwd")
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWFilesystem / pathfs.traversal · tests/test_viewer.py:389
assert mod._safe_filename("../../etc/passwd") == "passwd.glb" # cannot escape- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · .github/workflows/ci.yml:94
body=$(curl -s -X POST http://127.0.0.1:3111/mcp \
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · .github/workflows/ci.yml:123
--url http://127.0.0.1:3111/mcp \
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWObfuscation / stealthobf.decode_call · tests/test_outcomes.py:1050
png_bytes = base64.b64decode(img_data)
- Why
- No further detail recorded for this rule.
- Fix
- —
Tools it exposes
44 declared in source · 2 destructive
2 tools can delete or overwrite. An agent that can be talked into calling a tool can be talked into calling this one, so give it a token scoped to what you need.
| Tool | What it does | Risk |
|---|---|---|
destroy_session | Close THIS client | destructive |
reset | Clear the current session back to empty state, including all snapshots. | destructive |
crop_drawing | Save one model-selected raster drawing region at readable scale. bbox_px is exact source-image [x0,y0,x1,y1]; scale is 0.25..12. Returns the saved PNG path and an exact crop-pixel→source-pixel transform, so coordinates read from the enlargement remain usable. This is a mechanical crop only: it perfo | write |
edit_feature | Transactionally resize one plain cylindrical through hole identified by a current @feature handle. Reject holes with counterbores, spotfaces, countersinks or multiple constituent faces. Predict the annular volume change, then check exact added/removed material, hole recognition, every other hole and | write |
execute | Execute build123d Python code in the persistent session. Errors include automatic fix hints — read them before retrying. Use show(shape, name) to register named objects (name defaults to | write |
execute_file | Execute a canonical build123d .py file in a clean namespace and atomically promote its result. The prior active model is restored if the source has a syntax/runtime error, times out, produces no shape, or does not produce result_name. Assign a Shape to `result` or call show(); optionally set result_ | write |
find_bored_bosses | Find candidate bored bosses and report target-selection/edit evidence: bore opening location, axis into the part, outward axis, bore diameter/depth, planar cap faces at the opening, whether the cap is split across multiple faces, and construction advice. Use this before lengthening any boss that car | write |
import_cad_file | Import a STEP (.step/.stp), STL (.stl), or 3MF (.3mf) file as a named object in the session. path: absolute or relative path to the file. name: name to register the shape under (defaults to the filename stem). The shape becomes both the named object and the current_shape. A multi-object 3MF register | write |
install_skill | Copy a b123d workflow skill into the current project. | write |
last_error | Return details of the last failed execute() call: exception type, message, and (for runtime and syntax errors) line number and a 5-line excerpt around the failing line. Security errors include a message but no line/excerpt. Returns {\ | write |
recognise_features | Run the shared quiddity inventory once and return exact, run-local edit evidence. With families= | write |
repair_advice | Return structured, field-proven repair/edit recipes for an agent to implement explicitly in execute(). Unlike repair_hints(), which gives short error-specific tips, this emits a sequenced plan with code-pattern names, acceptance checks, and stop conditions. Provide the full validate()/export()/last_ | write |
save_snapshot | Save a named checkpoint of the current geometric state (current_shape and the show() object registry). | write |
workflow_hints | Return guidance on how to use these tools effectively. Call this at the start of a session or whenever unsure which tool to reach for. | write |
analyze_printability | Analyse a build123d shape for FDM printability using augura (BREP-exact analysis). | read |
bank_candidate | Atomically promote a gate-clean STEP as the safe output/checkpoint. Writes the candidate to a private sibling file, runs the authoritative written-and-reimported STEP gate, and replaces filename only on a fully verified PASS; on FAIL or an unchecked mesh gate, the candidate is deleted and any existi | read |
compare | Unified comparison tool. | read |
cross_sections | Compute cross-sectional areas at evenly spaced planes along an axis. Returns a list of {position, area} pairs. axis: X, Y, or Z (default Z). num_slices: number of planes (default 10, minimum 2). Useful for detecting internal voids, wall-thickness variation, or verifying that a shape | read |
design_audit | Audit the current session program as a *design*, not just a shape: surface its named numeric parameters (Θ) and test how robust each is to editing. Parses the assembled program (see script()) for top-level numeric assignments (e.g. `plate_thickness = 5.0`), then rebuilds the program with each parame | read |
export | Export model. format: step, stl, 3mf, dxf, svg, or comma-separated list e.g. | read |
find_bosses | Recognise external cylindrical bosses on a session object (defaults to current shape), including a turned part | read |
find_candidates | List recognised instances of a hole, boss, polygonal boss, slot, chamfer or fillet. qualifiers is JSON with optional axis (X/Y/Z), side (+X/-X/+Y/-Y/+Z/-Z, relative to the part bounding-box centre), and value_field; matches are reported for the literal axes and grouped over all 24 proper rotations o | read |
find_countersinks | Recognise countersinks (conical screw-head recesses) on a session object (defaults to current shape) — the feature find_holes reports only as a plain opening. A countersink is an internal cone flaring from a drilled bore out to a larger opening, coaxial with the drill; drill-point cones and external | read |
find_hole_patterns | Recognise hole patterns on a session object (defaults to current shape): ≥3 identical-spec holes equally spaced on a circle → bolt_circle (center, diameter/BCD), collinear at constant pitch → linear_array (pitch, direction). Returns JSON: {count, patterns: [{type, holes: [HoleFeature records], cente | read |
find_holes | Recognise drilled holes on a session object (defaults to current shape). Coaxial internal cylinders are grouped into one record per hole: drill + counterbore + spotface stacks, keyway-split bores, and bores interrupted by crossing holes all count once. Returns JSON: {count, holes: [{axis (drilling d | read |
health_check | Verify that render and export dependencies are working. Tests PNG render (VTK), SVG render (build123d HLR), STEP export, and STL export with a trivial shape. Returns JSON with ok/error per capability. Run at session start if you suspect a missing dependency. | read |
inspect_part | Return one compact generation-checkpoint inventory: bbox, solid/topology counts, holes grouped by axis/diameter/depth/bottom, bosses grouped by axis/diameter/height, recognised patterns with member counts, and a cross-section area profile. expected is an optional JSON object derived from the drawing | read |
interface_features | Suggest planar mounting faces from recognised hole openings, with exact hole handles. These are geometric candidates, not a declaration of design intent. Pass chosen hole handles as protected_refs to edit_feature(); that edit also checks every other recognised hole and the outer envelope. | read |
list_sessions | Report how many CAD sessions this server process is holding, its configured limit, and how long each has been idle. Handles are secrets and are never returned. Operator/diagnostic tool for HTTP deployments — over stdio there is always exactly one session. | read |
load_part | Load a named part from the library into the session. name: part name from search_library. params: optional JSON object of parameter overrides e.g. | read |
locate_gate_defects | Report WHERE a solid fails the validity gate, with 3D coordinates — so you can fix the exact edge/face instead of guessing. validate()/export() tell you WHAT is wrong (e.g. | read |
measure | Measure a shape and return a complete geometric summary: volume (mm3), surface area (mm2), topology (face/edge/vertex counts), bounding box with per-axis size and center, volumetric center of mass, 6-component inertia tensor (Ixx/Iyy/Izz/Ixy/Ixz/Iyz), and a face-type inventory classifying every face | read |
mesh_holes | Find fastener holes in a MESH by slicing it on all three axes. Returns JSON {count, holes:[{axis, diameter, location, span, depth, through}]} where axis is the drilling direction and location is the hole centre in world coordinates. This is the mesh counterpart to find_holes(), which needs real topo | read |
mesh_section | Loops on one cross-section plane of a mesh, largest first. Returns JSON {axis, position, loop_count, enclosed_passages, loops:[{points, center, size, min, max, enclosed}]}, all in the two axes that are not `axis`. enclosed_passages counts loops at odd nesting depth, representing passages through mat | read |
prepare_drawing | Prepare a raster engineering drawing for efficient inspection. Detects substantial spatial regions, saves one labelled overview plus readable PNG crops, and returns their pixel bounding boxes and paths. Region ids are layout evidence only: this tool does NOT label views, recognise CAD features, inte | read |
render_view | Render model. Auto-detects 3D vs 2D: solids use VTK; flat drawings use the 2D pipeline. Renders confirm appearance, not geometry. format: png, svg, dxf, or both. direction accepts top, bottom, front, rear, side, left, right, or iso. quality: preview, standard, or high; a timed-out standard/high PNG | read |
repair_hints | Given an error message or validity-gate reason, return targeted fix suggestions for common build123d mistakes and gate failures: wrong Location syntax, missing .part, CadQuery idioms, blocked imports, degenerate boolean results, fillet edge selection, B-rep defects, mesh non-manifold/open-edge failu | read |
resolve | Evaluate a selector expression against a named object and return a geometry descriptor. selector is a Python expression suffix applied to the object, e.g. | read |
restore_snapshot | Restore geometric state from a previously saved snapshot (current_shape and the show() registry). | read |
script | Return a single Python script assembled from all successfully executed code blocks in this session. Prepends | read |
search_library | Search the part library. query: keywords matched against name, description, tags, category (empty returns all). Returns name, category, description, tags, and full parameter specs including types, defaults, and descriptions. | read |
session_state | Return a structured JSON snapshot of the current session: current_shape metrics, all named objects (replaces list_objects) with geometry stats, snapshot names, and a variables summary of the Python namespace (type + volume for shapes, type + length for collections, type + value for scalars). Use thi | read |
validate | Check whether a shape would pass a CAD validity gate before exporting it. Returns a PASS/FAIL verdict plus JSON (passes_gate, n_solids, volume, is_manifold, brep_valid, reasons). The gate mirrors what strict CAD and mesh consumers require: a well-formed (BRepCheck), watertight, manifold solid with n | read |
version | Return the installed versions of the build123d-mcp server, its key dependencies (build123d, build123d-drafting-helpers), and the companion packages importable inside execute() (bd_warehouse for threads/fasteners/gears/bearings, augura for printability analysis). Use this to confirm which server buil | read |
Safer alternatives
Audit history
- ✕BLOCK F 46 / 100
First audit ·
de8e6242de54
README badge
Badges show the current verdict, BLOCK included
A badge cannot be hidden by the maintainer while the verdict is BLOCK. Fix the findings, push, and the re-audit updates it.
Questions about Build123d MCP server
What is the Build123d MCP server?
What tools does Build123d expose?
Is Build123d safe to connect to an agent?
What credentials does Build123d need?
How does Build123d run?
How current is this page?
I already installed Build123d. What should I do?
Can the verdict change?
Sources
- pzfreo/build123d-mcp on GitHub — the source we read, its licence, stars and activityObserved · 8 Oct 2026
- ModelsAtlas trust audit — BLOCK verdict for commit de8e6242de54Observed · 8 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What is the Build123d MCP server?
- What tools does Build123d expose?
- Is Build123d safe to connect to an agent?