AutoCAD MCP Pro
Provides production-grade AutoCAD automation for AI agents, using live COM automation on Windows or a headless DXF engine. Enables drawing creation and editing, entity and layer management, dimensioning, QA/critique workflows, checkpoints, and P&ID/mechanical drawing operations through a typed tool contract.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
AutoCAD MCP Pro
Production-grade AutoCAD automation for AI agents. Live through COM on Windows, or headless through ezdxf anywhere — one typed contract, two engines.
Install · What's new · Gallery · Tools · Engines · Verification · Evidence · Limits · Config · Changelog
v1.8 release snapshot: 261 tools · 13 resources · 5 prompt templates · 7589 collected tests. 257 is the registered count. Since 1.8.0 a default install lists six over
tools/list(DISCOVERY_MODE=search:search_tools,describe_tool,call_tooland the threeDISCOVERY_PINNEDtools), and every tool the profile and packs allow stays callable by name;DISCOVERY_MODE=offlists 253: the 252 a default profile enables (ENABLE_3Dunset hides the five solids) plusdescribe_tool.system_aboutis the runtime authority.
What's new in 1.8
1.7 made what the server draws provable. 1.8.0 makes it remember, finish a job in one call and measure itself honestly (design). The new tools are entity_modify_where, layer_rename, layer_merge, checkpoint_create, checkpoint_list, checkpoint_restore, drawing_history, mech_part_revise and pid_project, and the new resources autocad://critique/focuses and autocad://pid/project/last; the counts are in the release snapshot above, and system_about is the authority.
What 1.8.0 adds | |
It remembers | The operation journal is durable by default (sqlite in |
One call, not hundreds |
|
Six tools listed, every tool callable |
|
One error envelope | Every error on every route is |
QA that names what it did not check | Every critique lane writes |
Parts revised, P&IDs as projects |
|
DWG opens headlessly |
|
Narrowed on request |
|
The live engine draws where it means to | A live seat draws in model space until |
Four tracker reports, fixed the same day |
|
Evidence | Correctness suite 83 / 83 against v1.7.0's 61 / 83, 22 fixed and 0 regressed ( |
One call where 1.7 needed hundreds
drawing_open(path) the journal continues the file's id and revision
entity_modify_where(where, set, dry_run=True) count, would_change and a preview
cad_batch(steps, expected_revision=...) all or nothing; a missing handle refuses the batch
dimension_auto(selector={"layer": "GEOMETRY"}) a part dimensioned in one call
drawing_critique(focus=None, summary=True) compact; qa_coverage names every lane not checked
drawing_history(handle=..., detail="args") what a value was in round 2, after a restart
checkpoint_restore("cp-3", mode="new_document") back to a stored state, as its own documentSeveral defaults changed. Each has a switch back to 1.7.0's behaviour where one exists (DISCOVERY_MODE=off, cad_batch(on_error="stop"), JOURNAL_DURABLE=off, LISP_POLICY=denylist, strict_critique=False, COM_REFRESH_MODE=regen, ...), and the changelog's Breaking at a glance lists every one. Not in 1.8.0: no B40 feature-table row is transcribed (every size is still refused by name), and the native .NET worker is deferred to 1.9.0 by a rule fixed before any measurement (docs/adr/0001-native-worker.md).
Earlier releases, 1.7 and 1.6 included, are in the changelog.
Related MCP server: AutoCAD MCP Pro
What it draws
Not a mockup. Every line on this A3 sheet was drawn by the tools this server exposes — an ISO 5457 frame with zones, involute gear geometry (m6, z24), a DIN 6885 keyed bore, the section A-A cut along the keyway with hatched faces, centre lines, an ISO 128-40 cutting plane, an Ra 1.6 surface-texture symbol, six ISO 129 dimensions with the bore at Ø40 H7 +0.025 / 0 from the ISO 286 tables, an ISO 7200 title block and a revision row — then rendered headlessly by view_render. drawing_critique(focus=None) returns 0 issues and the finalize gate scores it 100 (grade A) over 176 entities. Rebuild it with python scripts/render_readme_showcase.py.
The catalogue, authored in code. 43 ISO 10628-2 / ISA-5.1 symbols: 11 valve bodies × 6 actuators, 6 rotating machines, 4 heat exchangers, 6 parametric vessels, 7 inline items, the instrument bubble in 4 types × 5 locations, 5 line markers and 3 connectors. Every one was placed through pid_symbol_insert's own path. Rebuild it with python scripts/render_pid_catalog.py.
Why this exists
A big MCP server is expensive to be connected to. Listing the whole catalog (DISCOVERY_MODE=off, 253 tools) costs a client 59,138 tokens of prompt payload before it has asked for anything. Since 1.8.0 a default install lists six tools instead - search_tools, describe_tool, call_tool and the three DISCOVERY_PINNED tools - for 1,026 tokens, and every tool stays callable by name.
A drafter searches for FILLET, not entity_fillet. Before the corpus, those command names appeared in no tool name or description. That was df = 0 against a stock index: the tools were not ranked badly, they were absent. The fix was data: an authored corpus of 207 AutoCAD command names and 1,479 distinct synonym phrases covering all 257 registered tools. A test refuses to let a tool exist without one.
Advertised surface | Tools listed | Prompt payload | Wire ( | 1.7.0 prompt payload | 1.7.0 wire |
| 6 | 1,026 | 1,300 | — | — |
| 3 | 220 | 230 | 455 | 503 |
| 253 | 59,138 | 78,391 | 62,471 (243 tools) | 89,350 |
| 207 | 46,767 | 62,425 | 47,955 (198) | 69,391 |
| 204 | 44,901 | 60,289 | 46,679 (196) | 67,974 |
| 192 | 40,722 | 55,169 | 41,902 (184) | 61,546 |
| 68 | 16,182 | 21,189 | 17,945 (66) | 25,146 |
Server instructions (the longest text the builder writes) | — | 199 | 199 | 461 | 461 |
Measured on the 1.8.0 release tree withpython -m benchmarks.token_suite (idle lane, over the real in-memory server; token-cost.json). The 1.7.0 columns are the v1.7.0 tag measured the same way with this release's lock (benchmarks/token_budget.json, v1.7.0_measured); 1.7.0's own README quoted the wire column on its older lock (89,226 / 61,422 / 25,066 / 503). Tokens are offline ratio estimates, not tokenizer counts, and they are the uncached cost: prompt caching amortises the idle term. The prompt payload is the tools array a client forwards to the model; the wire column is the whole tools/list result, the basis of every figure up to 1.7.0. In off mode the list carries describe_tool too, and a description over 800 characters is listed as its leading paragraphs plus Details: describe_tool., the full text one describe_tool call away. benchmarks/token_suite.py --tokenizer anthropic counts for real.
Install
pip install autocad-mcp-pro # or: uvx autocad-mcp-pro
autocad-mcp # stdio MCP server, backend auto-selectedAUTOCAD_MCP_BACKEND=ezdxf autocad-mcp # portable DXF engine, no AutoCAD needed
AUTOCAD_MCP_BACKEND=com autocad-mcp # live AutoCAD (needs the [com] extra)Extra | Pulls in | For |
(none) |
| Headless DXF on any OS — no rendering |
|
| Live AutoCAD control + window capture |
|
| PDF export and headless PNG, any platform |
|
| XLSX workbooks (takeoffs, |
| everything above | Development and CI |
The bare installcannot draw pixels — ezdxf.addons.drawing imports Pillow unconditionally, so every render path needs it. Add [pdf] for images on Linux or macOS.
As a Claude Code plugin
The server and the premium skill install together. The skill teaches the measured workflow: requirements → geometry → verified on the CAD → saved → reopened → delivered.
claude plugin marketplace add U-C4N/Autocad-MCP
claude plugin install autocad-mcp-pro@autocad-mcpThe plugin runs uvx --from "autocad-mcp-pro[com,pdf,office]==1.8.0" autocad-mcp, which is this release at exactly the plugin's version, so it needs uv. Set AUTOCAD_MCP_SOURCE to a checkout (C:/path/to/Autocad-MCP[com,pdf,office]) to run that code instead. The plugin starts the server in search mode (DISCOVERY_MODE=${AUTOCAD_MCP_DISCOVERY:-search}); set AUTOCAD_MCP_DISCOVERY=off for the full catalog. Already running the server yourself? Keep one: turn the plugin's server off in /mcp, or copy .claude/skills/autocad-mcp-premium/ into your .claude/skills/ instead. plugin/README.md has the details.
{
"mcpServers": {
"autocad": {
"command": "autocad-mcp",
"env": {
"AUTOCAD_MCP_BACKEND": "auto",
"ALLOWED_PATHS": "C:\\Users\\you\\Documents\\AutoCAD",
"TOOL_PROFILE": "full",
"TOOL_PACKS": "all",
"DISCOVERY_MODE": "search"
}
}
}
}It works with Claude Desktop, Cursor, or any stdio MCP host. For HTTP, run autocad-mcp --transport http --port 8000. It binds loopback only, unless remote HTTP is explicitly enabled and a bearer token is set.
What you get
Area | What it does |
Drawing lifecycle | create, open (a damaged DXF with |
Durability & history | headless, every save, open, new drawing, rollback batch and |
Geometry | lines, arcs, polylines (with |
Set-based edits |
|
Annotation | ISO 129 toleranced dimensions, ISO 286 fits ( |
Engineering generators | involute gears (front + section A-A), DIN 6885 keyed bores, ISO A3 title block |
Mechanical parts | one part model (segments or outline + typed features) and one view engine: front / side / top / section / detail with hidden lines, ISO 128-50 cut faces and ISO 129 dimensions. ISO 4014/4017/4032/7089/4762 fasteners and ISO 15 bearings insert as real blocks with attributes. |
Sheet & delivery | ISO 5457 frames A4-A0 with zones and trim marks, ISO 7200 title blocks for every size, revision blocks with clouds, ISO 7573 parts lists with ISO 6433 balloons linked by XDATA, CSV/XLSX extraction, xrefs and images on both engines, real |
Architecture | one plan model (walls with hosted doors and windows) and one engine that resolves L / T / X junctions, cuts openings and draws poché by material. Room areas are measured from the faces the walls enclose, never typed, and rooms are read back from any plan with a confidence. Door / window / room schedules are real TABLEs. Also a furniture and sanitary catalogue at nominal sizes, a structural grid, north arrow, section / level / elevation marks, exterior dimension chains, and English or Turkish labels ( |
Understanding & takeoffs |
|
P&ID | catalogue blocks with ports and tags (ISO 10628-2 / ISA-5.1), port-to-port lines with ISA-5.1 classes and line numbers, |
Styles & standards | ISO-25 / ANSI dimension styles, ISOCP / ROMANS text styles, ISO / ANSI leader styles from authored presets; |
Discovery | the default since 1.8.0 ( |
Batching |
|
Paper space | tab lifecycle, viewports, |
Page setup & templates | ISO 216 / ANSI Y14.1 sheets, ctb catalog, |
Environment | several open documents headlessly, portable layer states ( |
Selection | window vs crossing stated back to the caller; a polygon tested against its own shape, not its bounding box |
Boundaries |
|
Measurement |
|
Hatch depth | gradients, in-place edits, typed edge boundaries (headless), island styles |
Annotation objects | WIPEOUT, REVCLOUD, MTEXT background masks (headless), text find/replace |
3D solids |
|
Quality loop |
|
Verification |
|
Delivery |
|
Safe edits | documents carry an id and a content revision; |
Errors | every failure on every route is one typed envelope: |
Security |
|
Session metrics |
|
Live speed | the live engine refreshes the display once per COM job ( |
257 tools in 28 groups. TOOL_PACKS=core hides these from a client that needs none of them: the ten pid_* tools, the 22 environment tools, the 15 mechanical tools, the 12 architectural tools and the two plant takeoffs. TOOL_PACKS=core,mech keeps the mechanical ones, TOOL_PACKS=core,arch the architectural ones, and TOOL_PACKS=core,plant the takeoffs. There are also 13 resources that cost nothing in the tool budget (autocad://drawing/info, layers, blocks, entities/stats, entities/{layer_name}, system/status, pid/symbols, pid/project/last, standards/isa51, standards/coverage, critique/focuses, and the task recipes recipes/index and recipes/{recipe_id} - seven recipes, among them layer_cleanup and dimension_part, each one cad_batch) and 5 prompt templates.
Three rules worth knowing.
Every coordinate in and out of a tool is WCS on both engines. The one exception is TEXT
rotation, which stays in the entity frame: a mirrored TEXT is mirror-imaged, and no scalar angle expresses that.Never read vertices back and shoelace them. That silently loses 28.2% of the area on a semicircular edge.
analysis_measure_entity(handle)reads the real geometry and states its own accuracy.A lineweight of -3 is Default (the LWDEFAULT setting), not ByLayer: ByLayer is -1 and ByBlock -2. Every lineweight input also takes the names
"ByLayer","ByBlock"and"Default", a layer refuses ByLayer and ByBlock by name, and entity rows carrylineweight_name.
The two engines
One contract across 23 modules in backends/contracts/. @capability(key, reason=…) supplies a default that refuses, and a test holds both backends' capability key sets equal. There are 45 capability keys. Read system_capabilities at runtime rather than trusting the table: several depend on what the machine has installed (matplotlib, openpyxl, the ODA File Converter).
Capability | COM (live AutoCAD) | ezdxf (headless) |
Live document control | ✅ | — |
Cross-platform, no AutoCAD | — | ✅ |
Transactions and rollback | ✅ | ✅ |
Paper-space layouts + viewports | ✅ | ✅ |
Viewport model-content rendering | ✅ | ✅ ᵐ (no borders) |
Selection window / crossing / polygon | ✅ | ✅ |
Entity area by handle | ActiveX | Analytic, bulges included |
HATCH filled area (islands subtracted) | AutoCAD's own number | Loops walked, |
HATCH loops and DIMENSION fields in | ✅ read from a | ✅ |
A session bound to its document | ✅ an active-tab switch is refused, | — only the server switches documents |
Where new geometry goes | model space until | model space until |
Raw commands |
| — refused by name |
REGION / 3DSOLID area | ✅ | — ACIS is opaque to ezdxf |
3D solids | ✅ with | — |
DWG read | ✅ native |
|
DWG write | ✅ | via the ODA File Converter, if installed |
| ✅ | DXF only — |
Reading a foreign drawing ( | ✅ one | ✅ |
XLSX workbooks | ✅ ᵒ | ✅ ᵒ |
Preferences · launch · operator prompts | ✅ | — refused by name |
WIPEOUT · MTEXT background colour | — verified absent, AutoCAD 2026 | ✅ |
REVCLOUD · BPOLY · typed hatch edges | — no ActiveX member | ✅ |
CHSPACE | — unverified on a live seat | ✅ ᶜ |
Undo history | ✅ AutoCAD's own; a checkpoint restores as a new document ( | durable checkpoints, also after a restart; per-call steps opt-in with |
TABLE and MLEADER | Native | Portable composite |
Screenshots and PDF | Window capture, DPI-aware: the server makes itself DPI-aware before reading AutoCAD's window rectangle, so the whole window is captured at any Windows display scaling, and the report states | Matplotlib ᵐ |
A region screenshot ( | ✅ the | ✅ ᵐ |
ᵐ Needs matplotlib ([pdf]/[full]). Without it, png, pdf, viewport_render and handle_overlay report unsupported headlessly. ᵒ Needs openpyxl ([office]/[full]). Without it, XLSX is refused with xlsx_write and CSV is still written. ᶜ Headless CHSPACE has four restrictions, named in its capability reason: top-view untwisted viewports only; dimensions refused unless frozen; ACIS, proxy and table entities refused; viewport clipping reported rather than applied.
The COM paths run against alive AutoCAD 2026 through eight asserting smoke scripts (scripts/smoke_*_com.py) on one harness (scripts/live/harness.py: attach only, its own documents, an active-document guard). The 1.7.0 runs passed 129 / 129 checks on the close-out commit 13499fe; their JSON is committed under benchmarks/results/live/. These runs catch what no headless test can: ActiveX refuses entity.Layer on a missing layer where ezdxf quietly creates it, calls a block reference BLOCKREFERENCE rather than INSERT, and, once pywin32's type-library cache exists, hands every listed entity back as a bare IAcadEntity with no endpoints. Each of those broke a tool that passed every headless test.
The verification workflow
drawing_preflight(intent, requirements) typed items: id, quantity, target + unit, feature, source
drawing_plan(..., persist_requirements=True) the set travels inside the DWG/DXF
mech_part_draw(spec) every entity tagged with its feature
drawing_verify_requirements(use_stored=True) measured on the document: pass / fail / unknown / ambiguous
drawing_critique(focus=None) drafting checks over every entity of every space
drawing_deliver(..., requirements=...) exported, reopened, measured again on the file
drawing_verify_requirements(manifest_path=) later: has anything in the delivery changed since?A drafting score is not an acceptance. drawing_finalize still returns its 0–100 score, but with requirements= a requirement that does not pass blocks it (failed_acceptance), whatever the score.
Evidence
Every number here is produced by a script under benchmarks/ and published as JSON under benchmarks/results/published/; benchmarks/README.md explains each lane and keeps the full tables.
83 deterministic headless checks run against the previous tag and the current tree, each in its own subprocess:
Version | Checks passing | Pass rate | Fixed | Regressed |
v1.7.0 (baseline) | 61 / 83 | 73.5 % | — | — |
v1.8.0 (this release) | 83 / 83 | 100 % | 22 | 0 |
The task matrix v9 (49 tasks, each one able to fail) passes 47 / 47 of the tasks the headless engine attempts (lanes-v9/); the headless performance gate against v1.7.0 is ok: true with ratios 0.96 to 1.06, the 1.06 being the durable journal's one commit per mutating call (perf-v1.7.0-vs-v1.8.0.json); the token budget gate exits 0 (token-cost.json); and all fourteen live smokes passed on AutoCAD 2026 for this release at da2d7f6, before the four tracker fixes (matrix.json). What was measured and found wanting is in the changelog's Live evidence and under the limits below.
What this release is bad at
A page that only lists strengths is a page that has not been measured.
Headless entity creation is slower than v1.4.0, and neither 1.6, 1.7 nor 1.8 won it back. 1.8.0 is not slower than 1.7.0 beyond the gate's noise, and 1.7.0 not slower than 1.6.0 (measured); the loss is 1.6's against v1.4.0, and winning it back is B10, 1.8.1. 1.8.0 adds two measured costs of its own on that path, both named above: the durable journal's commit on every mutating call, and the atomic save's fsync and verification. These are medians of five alternating runs on one machine, with one interpreter (CPython 3.11.15) and one ezdxf, v1.4.0's code against 1.6.0's (perf-v1.4.0-vs-v1.6.0.json):
Workload | v1.4.0 | v1.6.0 | v1.6.0, |
2,000 lines, one call each | 244.5 ms | 306.1 ms (1.25×) | 284.9 ms (1.17×) |
10,000 lines: build, DXF export, reopen | 1,847.9 ms | 2,553.5 ms (1.38×) | 2,216.4 ms (1.20×) |
Region query over 10,000 entities | 665.2 ms | 712.2 ms (1.07×) | 783.9 ms (1.18×) |
Premium quality pass | 150.6 ms | 65.3 ms (2.3× faster) | 69.9 ms |
The per-call timeout stops one hung call from wedging a server whose document lock is a single asyncio.Lock. It explains only part of the slowdown: switched off, creation is still 1.17× and 1.20× slower. The rest is extra work per call that 1.6 has not removed. A cProfile of the event-loop thread counts 491,071 function calls for the 2,000 creates, against v1.4.0's 319,038. Earlier READMEs said that switching the timeout off returned creation to v1.4.0's numbers. Measured this way, it does not. The region-query row, which moves the wrong way, shows this machine's noise floor (about ±10 %). Roadmap criterion 7 is not met and moves to 1.7.1.
Four mechanical feature tables ship empty. DIN 471/472 retaining-ring grooves, DIN 509 undercuts, DIN 332 centre holes and ISO 3601-2 O-ring grooves have their drawing code and their provenance tests, but no rows. A groove diameter written from memory is a wrong workshop drawing, while a narrow table is merely narrow. So every size is refused by name until rows verified against the standard's own table are transcribed. Since 1.8.0 a row reaches the tables only through a double entry: typed twice into engineering/mech/standards/data/<std>.a.json and .b.json by two named people, with the edition, table and page, checked against physical invariants and generated into _rows.py by scripts/build_standards.py (--check is a gate). ISO 3601-2 is now two tables, radial static and axial, so the eight tables are DIN 471, DIN 472, DIN 509-E, DIN 509-F, DIN 332-A, DIN 332-B, ISO 3601-2 and ISO 3601-2-axial. The licensed copies were not at hand for 1.8.0, so every one of them is still empty and deferred to 1.8.1 by name.
Undo after a restart is as fine-grained as your checkpoints. Headless, a checkpoint is taken at a save, an open, a new drawing, a rollback batch or a transaction boundary, and at checkpoint_create - never per call - so drawing_undo after a restart steps back to the last of those, not one call. Label a point you may want back with checkpoint_create(label). Redo across a restart is not kept. On a live seat a checkpoint is a Document.Export, taken only at checkpoint_create, at each transaction_begin and before entity_delete_many / drawing_purge / text_find_replace - not at a save, an open or a new drawing - and it restores only as a new document. Without a state folder (JOURNAL_DURABLE=off) there are no checkpoints.
A part revision refuses what it cannot rebuild. mech_part_revise refuses a part with a detail view or two views sharing a view tag, and over a hand edit of a tagged entity or a part drawn before 1.8.0 unless overwrite=True - which replaces the hand edit with the model. Reconciling a revision with a changed spec, and keeping a hand edit, are 1.8.1. Dimension handles change on every revision. A part drawn before 1.8.0 is an unstamped info issue of the model_drift focus until it is revised.
The live speed-ups miss three of their four targets. One display refresh per COM job, bulk tools as one sliced job and owner-block reads for the corner operations are in 1.8.0, and benchmarks/perf_com.py measured them against v1.7.0 with targets fixed in advance (AutoCAD 2026, 1.8.0): entity_batch_create(200) is 2.9× faster than 200 single creates and entity_delete_many(200) 3.8× faster than 200 single deletes, against a target of 5× each; the single entity_create_circle median is 8.9 % lower, against 30 %; and the fillet time at 10,000 lines against 5,000, whose target is at most 1.2×, varies between runs on that seat (55× in the committed run, 1.19× in a run an hour earlier). A 1.8.0 fillet is still 4× to 200× faster than 1.7.0's (perf_com.json). The native .NET worker is deferred to 1.9.0 under a rule written before any measurement (ADR 0001).
Takeoffs are estimates, and they say so.
A layout length is the rectilinear minimum spanning tree of the tags a run connects, plus a stated vertical allowance, and it is labelled an estimate.
A P&ID length is used only when
drawing_scale_checkcalls the P&ID to scale.A power the P&ID does not state stays empty and becomes an open item, and no cable-section table is authored: a section comes only from your
section_rules.Where no callout names a panel, the nearest panel is inferred and flagged.
Detail copies of equipment are flagged, and excluded only when you ask.
The readers were tuned on the synthetic plant pair and on one real P&ID / layout pair that is not in this repository. Another drafting office's layer and text conventions may need vocabulary.
Verification measures what it can bind, and says so when it cannot. A requirement is measured on a feature it can identify: by handle, by the feature tag this server's generators write, by an architectural element, by a geometric predicate or by a DIMENSION's defpoints. On somebody else's drawing that usually means a predicate. Two equal candidates are ambiguous, and a spline or a tilted plane is unsupported. Neither is a pass, so a report full of unknown is a report that needs better selectors, not a clean part.
A live revision sees the operator's object edits, not everything. No COM event sink is used (one left the seat refusing Documents.Add()); a transient AutoLISP database reactor in the bound document, read through VL.Application.16, counts object changes, and a change since the server's previous call is one more revision. Measured on AutoCAD 2026: an entity added, moved, re-propertied or deleted, a layer added or changed, ERASE and U each move it by one. A view change and a system variable written with SetVariable do not, an edit made while a server call runs is folded into that call, and without Visual LISP the revision counts this server's writes only (system_status.operator_edits says which). Two counter reads per live call, 0.6-1.2 ms each (median, two runs). Two servers bound to one document each keep their own counter id, so a read by one never moves the other's revision; a write by one is an outside edit to the other. The preview's entity fingerprints still back every apply.
The operation journal is durable, and it writes to disk. Every call's record goes into <ACADMCP_STATE_DIR>/journal.sqlite3 (default %LOCALAPPDATA%\autocad-mcp-pro\state), so a client operation id replays after a restart, and a call that was running when its server died answers requires_reconcile (error_kind: "process_exit"). By default the arguments are kept up to 4,096 bytes; JOURNAL_ARGS=digest keeps only their sha256, and JOURNAL_DURABLE=off restores the in-memory journal. A folder inside a repository checkout or beside drawings is refused, and an unusable store leaves the journal in memory with system_status.state_store.degraded. No call fails because of its journal, but a restart then forgets.
A damaged DXF is recovered only when you ask, and only partly. A file that does not parse is refused by name (damaged_drawing, naming recover=True) and the open document is kept. drawing_open(path, recover=True) reads it with ezdxf.recover, which drops what it cannot parse, not always with a fix entry: read recovered.entities_read before trusting the result. The recovered drawing will not save over the damaged file without drawing_save(overwrite_source=True). A DWG is not recovered (recover_unsupported; use AutoCAD's own RECOVER).
No Plant 3D. The roadmap's track D (read-only queries of a Plant 3D project) was dropped: the maintainer does not use Plant 3D, and a reader tested against nobody's real projects would be a guess. Roadmap criterion 5 is withdrawn, not met.
No REGION or 2D booleans headlessly. add_region() produces a REGION with zero ACIS bytes, and the greiner_hormann substitute loses 28.2% of the area on a square with one semicircular edge.
system_run_command / system_run_lisp are a guardrail, not a security boundary. The rejection message says so in those words. A 36-verb denylist refuses the obvious cases (policy_refused, with the typed tools for the refused verbs in alternatives), but AutoCAD accepts hundreds of commands, and DANGEROUS_COMMANDS_ENABLED=true switches the list off entirely. LISP is narrower: under LISP_POLICY=read (the default) a real reader runs only the AutoLISP read tier and sends everything else to the same denylist, which also re-scans every read-tier verdict; there is no write tier before 1.8.1 (LISP_POLICY=denylist is the 1.7 behaviour, off checks nothing). To take the escape hatches away altogether, TOOL_DENYLIST=system_run_command,system_run_lisp.
Path validation is per-tool, and unscoped until you scope it. With ALLOWED_PATHS empty (the default), the only positive bound is a ten-entry system-directory denylist that does not include C:/Users, /home, /root or /var. Set ALLOWED_PATHS.
Non-AutoCAD ProgIDs are unverified. CAD_PROGID changes which COM application the backend attaches to; nothing beyond the connection has been tested against BricsCAD, ZWCAD or GstarCAD.
The live engine attaches to your session, or starts one. With the default CAD_LAUNCH=auto, the first tool call attaches to a running AutoCAD and starts one when none runs; set CAD_LAUNCH=never to have the server work only in the session you opened, and it answers cad_not_running until you open AutoCAD (#19). The launch path itself - Dispatch, the Visible retry and the Quit of an instance that never comes up - is covered by fake-COM tests and was not exercised on a live seat.
Known limitations of the P&ID track
The default router is orthogonal and blind; avoid sees symbols. pid_line_draw picks auto (still the default) from seven orthogonal candidates, by fewest bends then length:
straight;
one bend;
two bends through the midline;
a stub out of each port joined by three bends.
You can also take direct, or pass waypoints. Since 1.8.0, route="avoid" (and pid_from_spec's sheet.routing: "avoid") searches an orthogonal route that keeps clearance from every symbol that is not one of its ends and from every keep_out box; it refuses no_route naming the enclosing symbols' tags, or with on_blocked="cross" runs through as few blocked grid edges as it can (not always the fewest boxes) and lists them in obstacle_hits. Every route counts the existing lines it crosses (crossings); avoid adds a cost for each, but a crossing is allowed, never refused. A dense sheet can exhaust the 50,000-node search (routing_budget_exceeded; pid_line_draw does not expose the budget, so pass waypoints), a line-number label is placed after routing and is only reported when it overlaps a symbol (label_hits), and a per-line avoid inside pid_from_spec is refused.
A foreign drawing is read at the confidence it earns, and no higher. A block this server did not place classifies at 0.6, with inferred ports, by its TAG-style attribute or a keyword in its name. It classifies at 0.3 when a line merely touches it, and a 0.3 guess can neither raise nor suppress a critique finding.
On the live engine, an INSERT turned off a right angle has members ActiveX cannot measure, so it reports an approximate box. pid_graph takes the tighter wall of that box and the attribute-inclusive box on every side. Even so, a line ending on such a body's true edge can still be reported dangling, with the nearest port as the hint. Read stats.confidence_min first.
Projects are read, not written. pid_graph links off-page connectors within one drawing; pid_project (1.8.0) matches them across up to 50 sheet files, finds cross-sheet duplicate tags and line-number breaks, and never modifies a sheet. A project-wide tag sequence, and refusing a tag another sheet already holds, are 1.8.1. LINK ids are compared case-sensitively and tags case-folded. A .dwg sheet is read through the live backend (a headless pid_project refuses it; a headless drawing_open converts one only when ODA or accoreconsole is installed). There is no DEXPI/Proteus export and there are no ISA-5.2 binary-logic symbols in this release. Both cuts are recorded in the spec so nobody re-derives them.
Known limitations of the settings track
Layer states are ours. layer_state_save writes a portable snapshot into an ACADMCP_LAYERSTATES XRECORD. It survives save/reopen on both engines and travels with the DWG/DXF. It is not an AutoCAD LAYERSTATE and does not appear in the Layer States Manager, which is why system_capabilities reports layer_states as mode: "xrecord".
Six of the 22 environment tools need a live seat. Preferences, launching, the operator prompts and the five summary fields of document properties are refused headlessly with preferences / dwgprops / live_application / interactive_prompt. Each is a refusal, not a stub.
A .dwt template is the same case (dwt_write): a .dwt is a DWG container, so headlessly the template is saved as DXF. mleaderstyle_create is not such a case. ActiveX has no MLeaderStyle collection, but the ACAD_MLEADERSTYLE dictionary holds full IAcadMLeaderStyle objects, so both engines create leader styles.
A dimension is redrawn on a style change, a scale and a point edit only. Since 1.8.0, dimstyle_modify redraws every dimension using the style on both engines (rerendered; live through Update() and a read-back of the *D text), and entity_scale and entity_edit_geometry redraw the DIMENSION they change. A move, rotate, mirror, copy or array does not redraw it yet (1.8.1), and neither does a DIMENSION inside a block definition; dimension_truth reports a block that shows another text than its style formats as dim_render_stale. Headless, ezdxf 1.4.4 draws a two-line angular dimension's reflex angle, which that focus reports as not repairable here: redraw it in AutoCAD. The live redraw has not yet been run on a seat.
Known limitations of the architecture track
Nominal, not standard. The furniture and sanitary blocks carry nominal catalogue sizes and say so. The stair tool reports the Blondel relation (2R + G within 600–650 mm) as a design rule, never as a building code. The arch layer colours are a repository convention: ISO 13567 fixes the names, not the colours. Labels speak English or Turkish; any other lang is refused with the list.
Configuration
Nothing loads a .env file — export these, or set them in your MCP client's env block.
Variable | Default | Purpose |
|
|
|
|
| COM ProgID the live backend attaches to |
|
| Whether the live engine may start the CAD application when none is running: |
|
|
|
|
| Vertical packs to advertise: |
|
|
|
|
| Comma-separated tools search mode lists directly, as shortened cards (full input schema; |
|
| Expose the opt-in |
|
| Python logging level |
| (empty) | Comma-separated absolute paths the server may access |
|
| Maximum retained undo snapshots |
|
| Headless per-call undo steps (a full DXF snapshot per mutating call), used before the durable checkpoints; |
|
| Reject larger DXF input (512 MB); |
|
| Refuse a QA read (critique, validator, finalize, deliver) of a larger drawing with |
|
| Bound list/selection response sizes |
|
| Items per list of a |
|
| Trays a parametric column may carry; |
|
| Per-call live AutoCAD timeout (s); |
|
| Seconds a live |
|
| How long a command sent to AutoCAD's command line ( |
|
| A live job that asked for at most this many display refreshes, each naming its entity, calls |
|
|
|
| (unset) | The |
|
| One DWG -> DXF conversion's deadline (kept inside |
|
| Per-call headless timeout (s). A read that overruns is never quarantined: until it ends, other calls on its document are refused by name ( |
|
| Seconds shutdown waits for a worker still inside a call before exiting without it; |
|
| The operation journal, pending-save markers, file lineage, durable checkpoints ( |
|
|
|
|
| What a journal row keeps of the arguments: |
|
| sqlite |
|
| Journal rows older than this are dropped when the store opens |
|
| A client id's answer above this keeps only its sha256 and replays as |
|
| Checkpoints kept per drawing lineage besides its first (S0); older ones are evicted (listed with |
|
| The checkpoint disk budget across lineages: the least recently written lineage, oldest checkpoint first, is evicted, never the one just written (so the disk stays at or below the budget plus one checkpoint) |
|
| The most checkpoint bytes one lineage keeps |
| (off) |
|
|
|
|
| (empty) | Comma-separated tool names or globs ( |
| (empty) | Comma-separated tool names or globs that are neither advertised nor callable |
|
| The highest tool cost a call may carry: |
|
| Allow blocked commands/LISP; reported as unsafe mode |
|
| How |
|
| Permit a non-loopback HTTP bind (which also needs a token and |
| (empty) | Bearer token required for remote HTTP; scopes |
| (empty) | A second bearer token with only |
| (empty) | Origins an HTTP request may carry; any other Origin is refused 403. A browser-based MCP inspector needs its own origin listed (e.g. |
| (empty) | Host headers accepted besides the bound host:port and the loopback names; any other is refused 421. |
|
| An HTTP request body over this (8 MiB) is refused 413, counted on chunked bodies too; |
Architecture
The diagram under The two engines is the call path; the typed contract is 23 modules under backends/contracts/ with 45 capability keys held equal on both engines.
The sequence in scripts/render_readme_showcase.py, which produced the gear sheet:
drawing_new() + drawing_plan(...) ISO linetypes + layers bootstrapped, the plan on record
drawing_apply_iso_layers("mech") ISO 128 lineweights per layer
dimstyle_create("ISO-35", ...) 3.5 mm text and arrows for an A3 sheet
sheet_frame(size="A3") ISO 5457 frame with zones
gear_draw_spur_front_view( involute flanks, not a decorated circle
module=6, teeth=24, bore_diameter=40,
keyway_width=12, keyway_depth=3.3)
gear_draw_section_aa(face_width=46) then cut along the keyway, faces hatched (hatch_material)
centre_marks(...) + section_line(...) centre lines, the A-A cutting plane
dimension_linear(...) x5 ISO 129: pitch Ø144, tip Ø156, face 46, keyway 12 and 43.3
dimension_diameter(..., fit="H7") Ø40 H7 +0.025 / 0 from the authored ISO 286 tables
surface_texture(..., ra=1.6) on the bore
titleblock_apply(title="SPUR GEAR m6 z24", material="C45E", ...) + a revision row
drawing_critique(focus=None) -> [] must be empty before finalize
view_render(max_px=3200) -> PNGThe full production loop adds drawing_preflight and drawing_plan at the front, drawing_refine after the critique, and layout_create + viewport_create + drawing_deliver at the end.
Development
uv sync --locked --all-extras
uv run pytest
uv run ruff check . && uv run ruff format --check .uv.lock pins the whole transitive graph, so this reproduces CI exactly. CI runs Linux (3.11 / 3.12) and Windows (mocked COM), plus package, Docker and MCP-registry jobs. It also runs claude plugin validate --strict on the marketplace and the plugin, the generated-file gates (build_plugin.py --check, generate_tool_inventory.py --check, check_doc_numbers.py), the token-budget job (python -m benchmarks.token_suite --lanes idle,task --budget benchmarks/token_budget.json and python -m benchmarks.call_budget: a ci-gated ceiling breached, an idle row grown more than 5 % over the published report or a scripted job not done fails the PR) and a contents check of the built wheel and sdist: the wheel holds the server and nothing else, and the sdist holds only what git tracks. The release gate runs the same three test lanes, plus a headless lane that runs the correctness suite against the previous tag with --fail-on-regression, before anything reaches PyPI. Releases are tag-driven: git tag vX.Y.Z && git push origin vX.Y.Z.
The live COM paths are checked on a running AutoCAD, never in CI: python scripts/smoke_verify_com.py --json out/verify.json (and the twelve other scripts/smoke_*_com.py) attaches to the open seat, works only in documents it creates, and closes them. python scripts/live/run_all.py runs all fourteen, each in its own process, and writes one matrix per release. For 1.8.0 every one passed in one run of one committed tree, with scripts/smoke_accore.py (the headless DWG read through accoreconsole) among them (AutoCAD 2026, 1.8.0): matrix.json. That run passed the five smokes written for 1.8.0, smoke_space_com.py, smoke_edit_com.py, smoke_render_com.py, smoke_lisp_com.py (the AutoLISP read tier) and smoke_durability_com.py (checkpoints, the refused in-place restore, a new_document restore), and the stages 1.8.0 added to older ones: set edits, dimension truth and dimension auto in smoke_settings_com.py, the revise stage in smoke_mech_com.py, and the avoid and project stages in smoke_pid_com.py (AutoCAD 2026, 1.8.0). The B40 stage of smoke_mech_com.py ran in the same run (AutoCAD 2026, 1.8.0) and skipped all eight feature tables, which ship with no rows.
Roadmap
1.7.1
Speed. Win back the headless creation throughput that 1.6 lost against v1.4.0 (criterion 7). Arm the per-call timeout only where a call can block, and remove the per-call work that came with it.
The XDATA rework: chunking, case and budget.
1.8
In 1.8.0 (first phase, see the changelog): the durable operation journal with idempotency across restarts, atomic saves,
drawing_open(recover=True)(ezdxf.recover, first planned for 1.7.1), one typed error envelope, theproperty_overridefocus, in-place polyline and label edits, region screenshots, and the live engine's target space. Second phase: set-based edits (entity_modify_where,layer_rename,layer_merge),dimension_autofor a whole part, the QA coverage ledger and compact QA answers, thedimension_truthfocus with dimensions redrawn on a style change, the tool and write-path policy and the HTTP guard, the AutoLISP read tier, session metrics, the token and call budgets in CI, durable checkpoints with undo after a restart, the atomiccad_batchdefault,drawing_history, and search mode by default. Third phase:mech_part_revise(parametric edit and rebuild of a drawn part, with its model history), obstacle-aware P&ID routing,pid_projectacross sheet files, a headless DWG read throughaccoreconsole, one display refresh per live job and bulk tools as one job, the B40 double-entry pipeline, and ADR 0001.1.8.1: the transcribed rows for DIN 471/472, DIN 509, DIN 332 and ISO 3601-2 (all eight tables deferred, each waiting on its licensed copy), the LISP write tier, batch lease and
confirm_large,cad_batchstep coalescing, thepid_projectwrite side,mech_part_revise's reconciliation and keep-the-hand-edit modes, DWG export and AUDIT throughaccoreconsole.
1.9: IEC 60617 electrical schematics, reusing the P&ID track's symbol, port and graph machinery. A native .NET worker only if ADR 0001's rule fires on live measurements.
Architecture decisions live in docs/adr/: ADR 0001 records why 1.8.0 ships no native .NET worker and the rule that decides it for 1.9.0.
Features ship when their contracts and limitations are testable — not when they make a longer checklist.
Star History
Author
Umutcan Edizsalan · Mechanical engineering work at Anka-Makine · GitHub @U-C4N
Built from production drawing work, then made model-agnostic through MCP.
License
mcp-name: io.github.u-c4n/autocad-mcp
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read, query, edit and render DWG drawings with AI. No AutoCAD required.
DXF and PDF/X-4 for AI agents: structured facts, PNG renders, an interactive in-chat viewer.
Headless CAD engine & MCP server for 2D/3D drafting, solids, DXF/SVG export, and automation.
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to create, read, validate, and critique production CAD drawings through one typed contract, running either live against AutoCAD over COM on Windows or headlessly with ezdxf anywhere. It covers mechanical parts and ISO sheets, architectural floor plans, P&ID drafting and reading, plus dimension, tolerance, and standards checks.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to drive production-grade CAD automation either live through COM on Windows or headlessly via ezdxf on any platform, using one typed contract across both engines. It covers drawing creation, P&ID, mechanical and architectural drafting, ISO GD&T and dimension-tolerance validation, takeoffs, and drawing understanding.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to drive AutoCAD automation through one typed contract over two engines — live COM on Windows or headless ezdxf anywhere — to draft, edit and read drawings, including mechanical parts and sheets, architectural plans with measured room areas, and P&ID diagrams. It also critiques existing drawings, checks scales and topology, and produces takeoff workbooks.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to drive production-grade CAD automation against live AutoCAD on Windows or headlessly through ezdxf anywhere, using one typed contract across both engines. It covers drawing and dimensioning, ISO GD&T and tolerance validation, P&ID drafting and reading, mechanical part sheets, architectural plans, and quantity takeoffs into workbooks.-