Logo: Autocad MCP

Autocad MCP

Communautéit
U-C4N

Production-grade AutoCAD MCP server for AI agents — 122 tools, dual COM (live AutoCAD) + headless ezdxf engines, ISO GD&T and dimension-tolerance validation for CAD automation.

EditeurU-C4N
RepositoryAutocad-MCP
SproochPython
Forks
29
Stären
98
Disponibel Tools
0
Transporttypstdio
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Autocad MCP bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 0

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 98, Forks: 29.

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.

CI PyPI Downloads Python 3.11+ License: MIT

Install · Tools · Engines · Evidence · Limits · Config · Changelog

Not a mockup. Every line on this sheet was drawn by the tools this server exposes — ISO layers, involute gear geometry, DIN 6885 keyway, section A-A, ISO 129 dimensions, an ISO 286 H7 bore fit, ISO 7200 title block — then rendered headlessly by view_screenshot. drawing_critique returns 0 issues on it. Rebuild it with python scripts/render_readme_showcase.py.

v1.5 release snapshot: 154 tools · 6 resources · 5 prompt templates · 1369 collected tests. 154 is the registered count; a default install advertises 149 over tools/list, because ENABLE_3D is unset. system_about is the runtime authority.

Why this exists

A big MCP server is expensive to be connected to. The full catalog costs a client 40,305 tokens before it has asked for anything. Discovery mode replaces it with two tools and costs 356.

A drafter searches for FILLET, not entity_fillet. Those command names appeared in no tool name or description — df = 0 against a stock index, not badly ranked but absent. The fix was data: an authored corpus of 158 AutoCAD command names and 672 synonym phrases covering all 154 tools. A test refuses to let a tool exist without one.

Advertised surfaceTools seenIdle cost
TOOL_PROFILE=full (default)14940,305 tokens
TOOL_PROFILE=lean4712,131 tokens
DISCOVERY_MODE=search2356 tokens

[!NOTE] Offline ratio estimates, not tokenizer counts, and the uncached ratio — prompt caching amortises the idle term. benchmarks/token_suite.py --tokenizer anthropic counts for real.

Install

bash
pip install autocad-mcp-pro     # or: uvx autocad-mcp-pro
autocad-mcp                     # stdio MCP server, backend auto-selected
bash
AUTOCAD_MCP_BACKEND=ezdxf autocad-mcp    # portable DXF engine, no AutoCAD needed
AUTOCAD_MCP_BACKEND=com   autocad-mcp    # live AutoCAD (needs the [com] extra)
ExtraPulls inFor
(none)fastmcp, ezdxf, pydanticHeadless DXF on any OS — no rendering
[com]pywin32, PillowLive AutoCAD control + window capture
[pdf]matplotlibPDF export and headless PNG, any platform
[full]everything aboveDevelopment and CI

[!NOTE] The bare install cannot draw pixels — ezdxf.addons.drawing imports Pillow unconditionally, so every render path needs it. Add [pdf] for images on Linux or macOS.

json
{
  "mcpServers": {
    "autocad": {
      "command": "autocad-mcp",
      "env": {
        "AUTOCAD_MCP_BACKEND": "auto",
        "ALLOWED_PATHS": "C:\\Users\\you\\Documents\\AutoCAD",
        "TOOL_PROFILE": "full",
        "DISCOVERY_MODE": "off"
      }
    }
  }
}

Claude Desktop, Cursor, or any stdio MCP host. For HTTP: autocad-mcp --transport http --port 8000 — loopback only unless remote HTTP is explicitly enabled and a bearer token is set.

What you get

AreaWhat it does
Drawing lifecyclecreate, open, save, export DXF/PDF, audit (repairs), purge, undo/redo
Geometrylines, arcs, polylines, splines, hatches, trim/extend/fillet/chamfer, handle-preserving edits
AnnotationISO 129 toleranced dimensions, ISO 286 fits (fit="H7"), TABLE, MLEADER, GD&T frames and datums (ISO 1101)
Engineering generatorsinvolute gears (front + section A-A), DIN 6885 keyed bores, ISO A3 title block
Discoverysearch_tools ranked over an AutoCAD command and synonym corpus — FILLET, BPOLY, QSELECT, WBLOCK, OVERKILL, CHSPACE each rank #1 of the 149-tool advertised catalog
Batchingcad_batch runs a step list in one round trip; fields= projects 11 result-heavy tools
Paper spacetab lifecycle, viewports, entity_change_space (CHSPACE), drawing_export_pdf(layout=…)
Selectionwindow vs crossing stated back to the caller; a polygon tested against its own shape, not its bounding box
Boundariesboundary_trace (BOUNDARY/BPOLY) chains loose edges into one closed polyline, arcs kept as bulges (headless)
Measurementanalysis_measure_entity measures what is in the drawing, by handle
Hatch depthgradients, in-place edits, typed edge boundaries (headless), island styles
Annotation objectsWIPEOUT, REVCLOUD, MTEXT background masks (headless), text find/replace
3D solidssolid_box/cylinder/extrude/revolve/boolean on live AutoCAD (ENABLE_3D=true)
Quality loopdrawing_preflight → drawing_plan → drawing_critique → drawing_refine → drawing_finalize (0–100 score)
Deliverydrawing_deliver: DXF/PDF/PNG + SHA-256 manifest + reopen-parity checks

154 tools in 19 groups. Plus 6 resources that cost nothing in the tool budget (autocad://drawing/info, layers, blocks, entities/stats, entities/{layer_name}, system/status) and 5 prompt templates.

Two 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 because a mirrored TEXT is mirror-imaged and no scalar angle expresses that. And never read vertices back and shoelace them: that loses 28.2% of the area on a semicircular edge, silently. analysis_measure_entity(handle) reads the real geometry and states its own accuracy.

The two engines

One contract across 19 modules in backends/contracts/. @capability(key, reason=…) supplies a default that refuses, and a test holds both backends' capability key sets equal. There are 27 capability keys; read system_capabilities at runtime rather than trusting the table — five of them depend on how the machine is set up.

CapabilityCOM (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 handleActiveX .AreaAnalytic, bulges included
HATCH filled area (islands subtracted)AutoCAD's own numberLoops walked, hatch_style reported
REGION / 3DSOLID area✅— ACIS is opaque to ezdxf
3D solids✅ with ENABLE_3D=true—
DWG write✅—
WIPEOUT · MTEXT background colour— verified absent, AutoCAD 2026✅
REVCLOUD · BPOLY · typed hatch edges— no ActiveX member✅
CHSPACE— unverified on a live seat✅ ᶜ
Undo history✅opt-in — EZDXF_UNDO_DEPTH
TABLE and MLEADERNativePortable composite
Screenshots and PDFWindow captureMatplotlib ᵐ

ᵐ Needs matplotlib ([pdf]/[full]); without it png, pdf, viewport_render and handle_overlay report unsupported headlessly. ᶜ Headless CHSPACE carries four named restrictions in its capability reason: top-view untwisted viewports only, dimensions refused unless frozen, ACIS/proxy/table refused, viewport clipping reported rather than applied.

[!IMPORTANT] Every COM path added in v1.5 was executed against a live AutoCAD 2026. That run found four defects reading could not — the largest being that AcadPViewport has no ViewCenter member, so the line setting it had been silently swallowed by a bare except since v1.4.

Evidence

Self-measurement, produced by scripts in benchmarks/.

Correctness — every release re-proves itself

26 deterministic headless checks against the previous tag and the current tree, each in its own subprocess so a hard crash counts as a miss rather than killing the run.

VersionChecks passingPass rateFixedRegressed
v1.5.0 (baseline)24 / 2692.3 %——
v1.5.1 (this release)26 / 26100 %20

Against the older v1.4.0 baseline the same suite reports 21 / 26 → 26 / 26, five fixed, zero regressed. Three of the five are new capability (miss → pass); two are repaired defects (fail → pass) — the diameter and radius callouts, which measured the leader as geometry and dimensioned a 40 mm bore as 60 at default settings.

The task matrix — five tasks that can fail

An earlier matrix scored this server 10/10, which carried no information: every task in it exercised something the server was built around. Five were added because they can fail, and three did while being written.

TaskVerified against
tool_discoverysix AutoCAD command names, each ranking #1
token_budget40,305 → 356 tokens, against a ceiling fixed in advance
hatch_islands300 filled with the island, 400 ignoring it
selection_filterwindow 1, crossing 2, bounding box 3, polygon 1
measure_from_handle139.2699 against the 100.0 a vertex shoelace gives

Headless performance

Workloads call the same backend methods the MCP tools call, so server-side overhead is included. Numbers move with hardware; the report records the machine fingerprint. Read the next section before quoting them — this release is slower than v1.4.0 at creating entities, on purpose.

What this release is bad at

A page that only lists strengths is a page that has not been measured.

Entity creation is slower than v1.4.0. Median of three runs on one machine and interpreter: 2,000 lines 1.4× slower, the 10,000-line roundtrip 2.3× slower. Attributed — setting EZDXF_CALL_TIMEOUT=0 returns creation to v1.4.0's numbers. The cost is the per-call asyncio.wait_for wrapped around every headless call so one hung call can no longer wedge a server whose document lock is a single asyncio.Lock. Deliberate trade, documented knob, on the 1.6 roadmap. The premium quality pass went the other way — 3.7× faster.

Wave A shipped 13 tools of a planned 39. Every cut is backed by a measurement. The REGION and 2D-boolean family went because 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, but AutoCAD accepts hundreds of commands and DANGEROUS_COMMANDS_ENABLED=true switches it off entirely.

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.

Configuration

Nothing loads a .env file — export these, or set them in your MCP client's env block.

VariableDefaultPurpose
AUTOCAD_MCP_BACKENDautoauto, com, or ezdxf
CAD_PROGIDAutoCAD.ApplicationCOM ProgID the live backend attaches to
TOOL_PROFILEfulllean (47 curated tools) or full
DISCOVERY_MODEoffsearch replaces the catalog with search_tools + call_tool
ENABLE_3DfalseExpose the opt-in solid_* tools (COM)
LOG_LEVELINFOPython logging level
ALLOWED_PATHS(empty)Comma-separated absolute paths the server may access
MAX_UNDO_STACK5Maximum retained undo snapshots
EZDXF_UNDO_DEPTH0Headless undo history depth; 0 disables it
MAX_DXF_BYTES52428800Reject larger DXF input; 0 disables
MAX_LIST_LIMIT5000Bound list/selection response sizes
COM_CALL_TIMEOUT60Per-call live AutoCAD timeout (s); 0 disables
EZDXF_CALL_TIMEOUT120Per-call headless timeout (s); 0 disables
DANGEROUS_COMMANDS_ENABLEDfalseAllow blocked commands/LISP; reported as unsafe mode
ALLOW_REMOTE_HTTPfalsePermit a non-loopback HTTP bind
MCP_AUTH_TOKEN(empty)Bearer token required for remote HTTP

Architecture

The sequence in scripts/render_readme_showcase.py, which produced the hero sheet:

text
drawing_new()                                    ISO linetypes + layers bootstrapped
drawing_apply_iso_layers("mech")                 ISO 128 lineweights per layer
drawing_settings({units: "mm", linear_precision: 2})

gear_draw_spur_front_view(                       involute flanks, not a decorated circle
    module=6, teeth=24, center=[135, 172],
    bore_diameter=40, keyway_width=12, keyway_depth=3.3)
gear_draw_section_aa(x_offset=300, face_width=46)

dimension_linear(...)                            ISO 129
dimension_diameter(..., fit="H7")                deviations from authored ISO 286 tables
titleblock_apply_iso_a3(title="SPUR GEAR m6 z24", material="C45E", ...)

drawing_critique(focus=None)                     -> []  must be empty before finalize
view_screenshot()                                -> PNG

The 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

bash
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), Windows (mocked-COM), plus package, Docker and MCP-registry jobs; the release gate runs the same three test lanes before anything reaches PyPI. Releases are tag-driven: git tag vX.Y.Z && git push origin vX.Y.Z.

Roadmap (1.6)

Give back the creation throughput the per-call timeout costs — arm it only for calls that can actually block. ISO 286 interference shafts r/s/t/u. HATCH boundary geometry in entity_get (1.5 measures a hatch's filled area but does not hand back its loops). REGION/3DSOLID area headlessly, which needs a modelling kernel ezdxf does not have. An allowlist of permitted AutoLISP heads, replacing the denylist — enumerating dangerous symbols does not terminate. ezdxf.recover as a fallback on drawing_open.

Features ship when their contracts and limitations are testable — not when they make a longer checklist.

Star History

Star History Chart

Author

Umutcan Edizsalan · Mechanical engineering work at Anka-Makine · GitHub @U-C4N

Built from production drawing work, then made model-agnostic through MCP.

License

MIT

mcp-name: io.github.u-c4n/autocad-mcp

Autocad MCP MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Autocad MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung, fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector: D'Optioun „Dësen Apparat“ ass ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Setzt de kopéierte Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Autocad MCP als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a setzt d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Setzt d'MCP-Serverkonfiguratioun fir Autocad MCP an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert d'Säit, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "u-c4n-autocad-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vun der Integratioun Autocad MCP. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vun der Integratioun Autocad MCP.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat Autocad MCP bei dëser Aufgab hëllefen?
Autocad MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat Autocad MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server Autocad MCP benotzt?

Autocad MCP ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Autocad MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Autocad MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat Autocad MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Autocad MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech Autocad MCP MCP mat TypingMind?

Autocad MCP leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann den MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Autocad MCP MCP an TypingMind zur Verfügung?

Autocad MCP stellt MCP-Funktioune zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Autocad MCP MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Autocad MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇