Ask your AI for a bracket, a flange or an enclosure. CAD Harness builds the part in a real CAD kernel, measures it against your brief, and tells the AI exactly what to fix. You get a STEP file only when every check passes.

motor-mount
18/18 checks passed- Valid, closed solid
- Exactly one body
- Overall size 90 × 60 × 70 mm
- Sits on Z = 0, centred
- Ø22 motor shaft hole along X
- Ø4.5 screw hole, top right
- Ø4.5 screw hole, top left
- Ø4.5 screw hole, bottom right
- Ø4.5 screw hole, bottom left
- Ø6.6 bolt hole at Y = +18
- Ø6.6 bolt hole at Y = −18
- No unexpected holes
- Shaft hole is open
- Gusset at +Y is solid
- Gusset at −Y is solid
- Open between the gussets
- Corner rounded to R8
- Base plate is solid
A real part and its 18 real checks. The AI wrote the code; the harness measured the result.
Why it exists
- 01
It looks right, but isn’t.
AI models write CAD code that runs and produces a plausible shape. A hole that's twice the size, or drilled along the wrong axis, is easy to miss in a picture and expensive to find after printing or machining.
- 02
Nobody measures it.
Chat tools show you a render and move on. CAD Harness builds the real solid and measures it: size, position, every hole's diameter and axis, and whether chosen points are metal or air.
- 03
The AI knows what to fix.
Every failed check comes back with its likely cause, so the AI corrects the actual mistake instead of guessing. It keeps the best verified version, and you only get a file once it passes.
How it works
Every part is specified, checked and fixed before you see it
Write down what correct means
Before any geometry exists, the AI turns your brief into a checklist: the overall size, every hole with its direction and position, and points that must be solid metal or empty air. For this bracket that is 18 checks.
- 18
- checks
- 7
- holes
- 6
- probe points
- The base is 90 × 60 mm … an upright plate, 70 mm tallSize90 × 60 × 70 mm, sitting on Z = 0
- a 22 mm hole for the motor shaft at Z = 40HoleØ22 along X at (0, 40), through
- four 4.5 mm holes for M4 screws on a 31 mm squareHoles4 × Ø4.5 along X at (±15.5, 24.5 | 55.5)
- two 6.6 mm holes for M6 bolts at X = 25, Y = ±18Holes2 × Ø6.6 along Z at (25, ±18)
- Two triangular gussets … centred at Y = ±24ProbesSolid at (−10, ±24, 12), empty at (−10, 0, 12)
- Round the base’s two +X corners to R8ProbeEmpty at (43, 28, 3): corner is rounded
- Nothing else is drilledRuleNo extra holes anywhere
Build it, then measure it
The AI's code runs in OpenCascade, a real CAD kernel, and the harness measures the solid it produced. The first version passed 12 of 18 checks. Both mistakes are named exactly, with their likely cause.
- 12/18
- passed
- 2
- mistakes named
- 6
- checks failed

- The motor shaft hole came out 44 mm wide instead of 22 mm.
hint: found d=44 where d=22 was expected: Cylinder() takes the RADIUS. - The four screw holes run front to back (Y) instead of through the upright (X).
hint: d=4.5 hole runs along y instead of x: along X use Rot(0, 90, 0) * Cylinder(...), along Y use Rot(90, 0, 0) * Cylinder(...). - Everything else was already right: size, base holes, both gussets and the rounded corners.
ok: 12 checks
Fix what failed, check everything again
The AI fixes only what was named. The harness then re-checks every item, including the ones that were already right, so a fix can't quietly break something else. You get the STEP file once all 18 pass.
- 18/18
- passed
- 1
- round of fixes
- 3
- files out

18/18
checks passed, including the 12 that were already right.
- motor-mount.step
- motor-mount.stl
- report.json
What gets checked
These parts are from our test set. Each was checked against its own spec, and each caption names what its checks verify.



Results
We wrote the test plan before running a single test. Separate agents wrote the test parts and their answers, hidden from us while we built the harness. Each model built the same parts twice, once alone and once with the harness.
| Model | Test set | Alone | With harness | Change |
|---|---|---|---|---|
| Claude Haiku 5.5 | Held-out (20 parts) | 16/20 | 20/20 | 1.25× |
| Claude Sonnet 5.5 | Held-out (20 parts) | 20/20 | 20/20 | no change |
| Qwen3 4B (free, local) | Held-out (20 parts) | 0/20 | 1/20 | from 0 |
| Claude Haiku 5.5 | Hard (20 parts) | 17/20 | 20/20 | 1.18× |
| Claude Sonnet 5.5 | Hard (20 parts) | 19/20 | 19/20 | no change |
| Qwen3 4B (free, local) | Hard (20 parts) | 0/20 | 0/20 | no change |
| Claude Haiku 5.5 | Fresh set F (30 parts), v0.3 | 29/30 | 30/30 | 1.03× |
| Claude Sonnet 5.5 | Fresh set F (30 parts), v0.3 | 30/30 | 29/30 | 0.97× |
| Qwen3 4B (free, local) | Fresh set F (30 parts × 3 runs), v0.3 | 0/90 | 1/90 | from 0 |
| A task counts as passed only if the part passes every hidden check. Claude: one run per model and arm, so a difference of one or two parts is within run-to-run noise. Qwen on set F: three runs per arm, pooled. The held-out and hard sets used harness v0.2.1; set F used v0.3. Full per-task tables, the protocol and the misses are in the repository. | ||||
- Hidden answers. Gold specs and reference parts were moved out of the project while the models worked.
- Same model, same brief. The only difference between the two runs is access to the harness.
- Small models: not yet. On a fresh set, a free 4B model running locally built 1 of 90 parts fully right with the harness and 0 alone. It now gets about half of each part right, up from 4%, but whole parts are still out of reach. Making small open models reliable is our next milestone.
Connect your AI
CAD Harness plugs into any AI that speaks MCP, works as a command-line tool for coding agents, and has its own runner for free local models. Every AI gets the same eleven tools and the same checks.
Copies the setup for Claude Code. Pick another AI from the icons.
- 01
Install CAD Harness
It runs on your own computer, so your designs stay with you. Until the PyPI release is out, install it from the project folder:
pip install .
- 02
Connect Claude Code
Run this in your terminal. In Claude Desktop, add the same command under Settings → Developer.
claude mcp add cadharness -- cadharness-mcp
- 03
Ask for a part in plain words
For example: “a 60 × 40 mm mounting plate, 5 mm thick, with four M5 clearance holes 6 mm from the edges”. The AI writes the spec, builds the part and runs the checks. You get a STEP file and the report.
Hosted version. A hosted server, so you can connect by URL with nothing installed, is built and security-tested but not yet online. ChatGPT support and directory listings will follow it.
The toolbox
- cad_check
- Builds the part and checks every line of the spec. Failed checks come with the likely cause.
- cad_run
- Builds the part and reports its size, volume and every hole it finds. Saves STEP and STL files.
- cad_render
- Draws the part from four angles, so the AI can see which way a feature faces.
- cad_section
- Cuts the part open along a plane to show counterbores, cavities and wall thickness.
- cad_inspect
- Measures the thinnest wall and the area that would need support when 3D printing.
- cad_diff
- Compares two versions and shows where material was added or removed, so an edit can't quietly change something else.
- cad_lookup_standard
- Looks up ISO hole sizes for metric screws, so “M5 clearance hole” becomes exactly 5.5 mm.
- cad_validate_spec
- Catches mistakes in the spec itself before any checking starts.
- cad_spec_example
- Shows the AI a complete, working spec to copy from.
Honest limits
- It checks the part against the spec. If the spec misreads the brief, the part can pass and still be wrong.
- Round holes on angled faces aren't listed as holes. Those are checked with probe points and volume instead.
- A keyway or slot cut into a bore stops the checker from recognising that bore as a hole.
- It doesn't check threads, tolerances, GD&T or assemblies yet.
- It does not certify parts for real-world use. An engineer still signs off.
Questions
Does my design leave my computer?
No. The local version builds and checks parts on your machine, and only your AI provider sees the conversation. The hosted version, once it is online, will run each job in an isolated sandbox.
Which AI models work best?
Strong models like Claude Sonnet already build simple parts correctly. The harness helps most on harder parts and with mid-sized models such as Claude Haiku. Small local models are not there yet: the results section shows how far they get, and we are working on it.
What files do I get?
A STEP file for any CAD program, an STL file for 3D printing, the build123d source code, and a report that lists every check and whether it passed.
Do I need to know CAD or Python?
No. You describe the part in plain words and the AI writes the code. Knowing what you want helps, especially the dimensions and where the holes go.
Can it edit a part I already have?
Yes, if the part is a build123d script. The diff tool then shows exactly what the edit changed, so nothing else moves by accident.
Is it safe to run AI-written code?
On your own machine, the code runs in a separate process with a time limit, like any coding assistant's code. The hosted version adds a strict sandbox: it accepts only geometry code, with no file access, no network and capped memory. An independent security review tried to break out of the sandbox and failed. The gaps it found were fixed.