Skip to main content

acad-mcp — let Claude drive AutoCAD

Português

An MCP server that lets Claude (and other MCP clients) draw, edit, read and check drawings in the AutoCAD running on your Windows PC — and process whole folders of DWGs without opening them.

demo

  • 61 tools + a guided prompt, every write is one undo step (Ctrl+Z).
  • Fast on large drawings: reads run as LISP inside AutoCAD — 50,000 entities in ~15 s (vs ~22 min over COM).
  • Batch: run a routine or a layer standard over a folder with AutoCAD's console engine (no window, in parallel). Originals are never modified — copies go to an output folder.
  • Routines without AI: built-in LISP routines (find/replace, fill title blocks, export attributes, count blocks, layer standard from CSV, purge/audit, plot PDF) that a person can also type as MCP_... commands.
  • Recreate drawings: import vector PDFs with real measurements, DXF/DWG, or trace scans/photos into lines; a coordinate grid on screenshots lets the model compare and fix.
  • English and Portuguese (ACAD_MCP_LANG=pt).

AutoCAD is a registered trademark of Autodesk, Inc. This project is not affiliated with or endorsed by Autodesk.

Requirements

  • Windows and the full AutoCAD (uses COM/ActiveX). AutoCAD LT is not supported (no COM, no console). Tested on AutoCAD 2027; earlier versions (2021+) are likely to work but are not verified.
  • uv (it installs Python 3.13 for you).
  • Linux/macOS: not possible — AutoCAD's automation only exists on Windows.

Install

Claude Desktop — extension (easiest)

Download acad-mcp-<version>.mcpb from the Releases page and open it with Claude Desktop (Settings → Extensions). Options: language, read-only, LISP on/off, auto-restore window.

Claude Desktop — config file

{
  "mcpServers": {
    "acad": { "command": "uvx", "args": ["acad-mcp"], "env": { "ACAD_MCP_LANG": "en" } }
  }
}

Edit the config with Claude fully closed (tray icon → Quit): Claude rewrites the file from memory when it quits, which would drop your change.

One-click install from this folder (Windows)

Double-click INSTALAR.bat: it checks AutoCAD, asks the language, closes Claude (after asking), installs uv if missing, installs Python and the dependencies, configures Claude (with a backup), runs a self-test and reopens Claude. A .venv copied from another PC is detected and rebuilt.

Claude Code

claude mcp add --scope user acad -- uvx acad-mcp

Other MCP clients

Any client that runs local stdio servers: command uvx, args ["acad-mcp"]. For HTTP: acad-mcp --http (listens on 127.0.0.1:8765/mcp only).

Use

Open AutoCAD and keep its window not minimized (it may stay behind other windows). Then ask, e.g.:

  • "Create layers WALL (red, 0.35) and AXIS (green, CENTER) and draw a 4 × 3 m room with axes and dimensions."
  • "Count the blocks and export their attributes to a CSV on my Desktop."
  • "Check this drawing against the example standard and fix what you can."
  • "In C:\Projects\Sheets, replace 'REV A' with 'REV B' in every drawing." (batch, originals untouched)
  • "Recreate the attached part directly in AutoCAD with dimensions, then show me."

Tools

Group Tools
Document status, list_documents, new_drawing, open_drawing, activate_drawing, save_drawing, close_drawing
Read drawing_info, list_layers, list_styles, list_blocks, query_entities, get_entity, get_selection
View get_view_image (screenshot, optional coordinate grid), zoom_view
Draw draw_line, draw_polyline, draw_rectangle, draw_circle, draw_arc, draw_text, draw_dimension, draw_hatch, draw_leader, draw_table, insert_block, create_block, draw_batch
Edit transform_entities, array_entities, offset_entity, erase_entities, set_entity_properties, edit_text, set_block_attributes, modify_geometry, explode_entities
Layers & styles manage_layer, manage_text_style, set_current, load_linetype
Data quantities, block_report (CSV)
Standards list_standards, check_standards, apply_standards, purge_and_audit
Files & recreate import_file (DXF, DWG, vector PDF, image), list_received_files, trace_image
Routines & batch list_routines, run_routine, save_routine, export_routines_for_autocad, batch_process, batch_status
Escape hatches run_command, run_lisp, undo, cancel_command

Prompt: recreate_drawing — measurements first, ask for what is missing, draw, compare, fix.

Configuration

Variable Default Meaning
ACAD_MCP_LANG en pt for Portuguese descriptions and messages
ACAD_MCP_READ_ONLY 0 1 = only reading tools are registered
ACAD_MCP_ALLOW_LISP 1 0 disables run_lisp, routines and batch routines
ACAD_MCP_ALLOW_COMMANDS 1 0 disables run_command
ACAD_MCP_AUTO_RESTORE 0 1 restores a minimized AutoCAD when needed (AutoCAD may grab focus)
ACAD_MCP_COMMAND_TIMEOUT 30 seconds before a command waiting for input is cancelled
ACAD_MCP_FAST_THRESHOLD 300 entity count above which reads use in-process LISP
ACAD_MCP_STANDARDS_DIR Documents\AutoCAD MCP\standards your JSON standards
ACAD_MCP_ROUTINES_DIR Documents\AutoCAD MCP\routines your saved routines

How it works (and what was measured)

  • One COM thread talks to AutoCAD; a COM message filter retries calls while AutoCAD is busy, so a tool is never re-run (re-running duplicated saves during development).
  • Commands/LISP go through SendCommand with a watchdog: if a command waits for input, ESC is sent to the drawing area (ESC to the main window does not cancel). The command line rejects expressions over ~1–2 k characters, so long LISP is written to a temp file and read+evaluated (reading text does not trigger SECURELOAD, unlike (load)).
  • With the window minimized, SendCommand gets queued and AutoCAD freezes when restored, so commands, LISP and screenshots refuse to run minimized (unless auto-restore is on). Direct drawing/editing works minimized.
  • COM selection sets leave internal "OLEAPPLICATION" undo records; undo skips them.
  • Batch console engine (accoreconsole.exe): pure AutoLISP and vlax-curve-* work, vla-* does not; plotting to PDF and saving work. Measured: 3 files in ~1.5 s with 3 workers. Use engine="gui" for vla-* routines and JSON standards.
  • PDF import: -PDFIMPORT runs without a dialog. PDFs plotted by AutoCAD came back at real size; PDFs without CAD scale come in inches (1 pt = 1/72") — rescale and check one known measurement.
  • trace_image is a draft: straight strokes within ~1 % on clean drawings in tests; curves and text are not traced.

Safety

  • Never writes over an existing file without overwrite=true; closing with unsaved changes needs discard_changes=true; batch only touches copies.
  • run_command blocks SHELL, START, NETLOAD, APPLOAD, SCRIPT, QUIT and similar; file dialogs are off.
  • run_lisp blocks startapp, file deletion/renaming, registry writes, etc. It is not a sandbox — LISP can do a lot. Disable it with ACAD_MCP_ALLOW_LISP=0 or use read-only mode.
  • HTTP mode listens on localhost only. Never expose it publicly without authentication: whoever reaches it controls your AutoCAD. See SECURITY.md.

ChatGPT

ChatGPT only talks to remote MCP servers. See docs/chatgpt.md (OpenAI Secure MCP Tunnel; not fully verified yet).

Development

uv sync
uv run pytest -m "not live"     # no AutoCAD needed
uv run pytest                   # also the live tests: AutoCAD open, window not minimized
uv build                        # wheel + sdist
uv run python scripts/build_mcpb.py   # Claude Desktop extension (needs Node.js)

The live tests create their own drawings and close them without saving; they never touch yours.

License

MIT — see LICENSE.

Metadata

Release files for acad-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acad-mcp 0.2.0
File Size Uploaded Provenance Actions
acad_mcp-0.2.0.tar.gz 91.6 kB Without provenance Details for acad_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acad-mcp 0.2.0
File Interpreter ABI Platform Actions
acad_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for acad_mcp-0.2.0-py3-none-any.whl

Total release size: 200.2 kB

Release files / acad_mcp-0.2.0.tar.gz

Download URL acad_mcp-0.2.0.tar.gz
Size 91.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3c8dc608f8fb585d7810e60cebbda09506063b6ce3a4993eb4b7a4179b3bffa1
BLAKE2b-256 checksum
How to use checksums
81fe261e0c13049fb06dcbfd5f02e7906ec3842d6af761c71eb3fbf180c77e0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / acad_mcp-0.2.0-py3-none-any.whl

Download URL acad_mcp-0.2.0-py3-none-any.whl
Size 108.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f49609b6fd7aa53d8479a8781618fccb4ab5b122174e6acbf71023903c248e5
BLAKE2b-256 checksum
How to use checksums
359a0959041cb8a375b10748f806d66d96d3ef29cb090224df24c48c79c8022d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for acad-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page