What is mcdrafter?
mcdrafter is a FastMCP 3.x server that lets an LLM agent work with CAD files: open them, measure them, convert them, and — the part that motivated the project — make sense of real civil engineering drawings without a human driving AutoCAD.
It exposes 19 tools in two distinct tiers.
The pure-ezdxf tier (no CAD kernel required)
Section titled “The pure-ezdxf tier (no CAD kernel required)”Six tools built on ezdxf and shapely that run anywhere Python runs. No FreeCAD, no display, no OpenCASCADE:
| Tool | What it answers |
|---|---|
survey_dxf_layers |
Which layers actually carry geometry, and how much? |
extract_parcels |
What closed parcels (and acreage) does the boundary linework enclose? |
extract_annotations |
What does the text say — labels, callouts, notes, title blocks? |
list_sheets |
What sheets are in this plan set? |
measure_by_layer |
How many feet of road edge? How much easement area? |
render_svg |
What does this linework actually look like? |
These are the workhorses for the kind of file you actually receive in the wild. The reference fixture for this tier is a real-world 22 MB Civil 3D subdivision plan set — 941 layers, 1,440 block definitions, 19 sheets — and every design decision (bound-xref layer matching, multileader text harvesting, noding open courses) traces back to something that file did that a naive implementation missed.
The FreeCAD tier
Section titled “The FreeCAD tier”Thirteen tools that use FreeCAD’s Python API for work that needs a real CAD kernel: opening and analyzing many formats, format conversion, 2D/3D geometry creation, parametric sketches, boolean operations, geometry modification (fillet, chamfer, shell), mesh generation, technical drawings, assemblies, and material properties. See the document, geometry, and production reference pages.
FreeCAD is optional at runtime. If it’s not installed, the server still starts, the ezdxf tier works fully, and FreeCAD-backed tools return a per-call error instead of crashing the session. In Docker, FreeCAD is opt-in via the WITH_FREECAD=1 build argument — see Run with Docker.
How calls work
Section titled “How calls work”Every tool (except list_supported_formats) takes a single operation argument with a uniform envelope: a file path, an operation name, and a free-form parameters dict. See the operation envelope for the exact shape and error conventions.
Transports
Section titled “Transports”The server speaks standard MCP over two transports:
- stdio — for local clients like Claude Code (
cad-mcp-server --transport stdio) - HTTP — the default, with stateless JSON responses tuned for reverse-proxied remote clients
See Getting started for connecting a client, and Configuration for environment variables and CLI flags.