MCP Directory

AutoCAD MCP

Drive AutoCAD LT via AutoLISP or generate DXF headlessly — 8 consolidated tools for drafting, P&ID and screenshots.

Unverified
stdio (local)
No auth
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
git clone https://github.com/puran-water/autocad-mcp.git && cd autocad-mcp && uv sync

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "autocad-mcp": {
      "command": "C:\\path\\to\\autocad-mcp\\.venv\\Scripts\\python.exe",
      "args": [
        "-m",
        "autocad_mcp"
      ],
      "env": {
        "AUTOCAD_MCP_BACKEND": "auto"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Windows 10/11 + AutoCAD LT 2024 or newer for the File IPC backend (ezdxf backend runs on any platform without AutoCAD)
  • Python 3.10+ (Windows-native, not WSL) and the uv package manager
  • CAD Tools Online P&ID Symbol Library at C:\PIDv4-CTO\ for P&ID symbol insertion (optional)

About AutoCAD MCP

Both backends implement the same tool API, and AUTOCAD_MCP_BACKEND=auto tries File IPC first, falling back to ezdxf when AutoCAD is not running. You can verify which one is active by calling system(operation="status") — it reports backend: file_ipc or ezdxf.

The File IPC path is the interesting engineering: it requires AutoCAD LT 2024+ on Windows because AutoLISP only arrived in LT with the 2024 release (LT for Mac has no AutoLISP at all). You load lisp-code/mcp_dispatch.lsp once via APPLOAD, and the Python server then triggers (c:mcp-dispatch) by posting WM_CHAR messages — no focus steal, so you keep working in other apps while the automation runs. Screenshots use Win32 PrintWindow and work even with AutoCAD minimized.

Coverage is drafting-practical: lines, circles, polylines, rectangles, arcs, ellipses, MText and hatches; copy/move/rotate/scale/mirror/array plus File-IPC-only offset/fillet/chamfer; layers with freeze/lock; blocks with attribute read/write; linear, aligned, angular and radius dimensions; PDF plotting and undo/redo (File IPC only). The pid tool adds P&ID symbol insertion from the CTO library, process lines, flow arrows and equipment tags.

Trade-offs: the headless ezdxf backend cannot plot PDFs, undo, or do offset/fillet/chamfer; the IPC directory must match between the Python server and the LISP dispatcher; and the server needs Windows-native Python (not WSL) — though a documented cmd.exe wrapper config lets WSL-hosted clients like Claude Code launch it as a native process.

Tools & capabilities (8)

drawing

File management: create/open/save drawings, DXF export, PDF plot, purge, system variables, undo/redo.

entity

Entity CRUD: create lines/circles/polylines/hatches and modify with copy, move, rotate, mirror, array, fillet.

layer

Layer management: list, create, set current, properties, freeze/thaw, lock/unlock.

block

Block operations: list, insert with attributes, read/update attributes, define (ezdxf).

annotation

Text, linear/aligned/angular/radius dimensions and leaders.

pid

P&ID operations: CTO symbols, process lines, valves, instruments, pumps, tags and line numbers.

view

Zoom extents/window and capture the current view as a PNG screenshot.

system

Server management: status, health, backend info, and execute_lisp for arbitrary AutoLISP.

When to use it

  • Generate DXF drawings headlessly on any OS without an AutoCAD license (ezdxf backend)
  • Automate repetitive LT drafting: layers, blocks with attributes, dimensioning
  • Assemble P&ID diagrams with CTO symbols: equipment, valves, instruments, line numbers
  • Let the agent screenshot the current view to check its own work, even with AutoCAD minimized

Quick setup

  1. 1git clone https://github.com/puran-water/autocad-mcp.git && cd autocad-mcp && uv sync (Windows-native Python 3.10+)
  2. 2In AutoCAD LT 2024+, run APPLOAD and load lisp-code/mcp_dispatch.lsp (add it to the Startup Suite for auto-load)
  3. 3Point your MCP client at .venv\Scripts\python.exe with args -m autocad_mcp and env AUTOCAD_MCP_BACKEND=auto
  4. 4From WSL-hosted clients, wrap the command in cmd.exe /d /s /c so the server runs as a native Windows process
  5. 5Verify with system(operation="status") — expect backend file_ipc with AutoCAD running, ezdxf otherwise

Security notes

Local stdio server with no cloud calls; the File IPC backend exchanges JSON command files in C:/temp (configurable via AUTOCAD_MCP_IPC_DIR) and sends keystrokes into your AutoCAD session. system(execute_lisp) executes arbitrary AutoLISP — effectively code execution inside AutoCAD — and drawing(create) erases the current drawing, so work on copies.

AutoCAD MCP FAQ

Do I need AutoCAD installed to use it?

No — the ezdxf backend generates and edits DXF headlessly on Linux, macOS or WSL with no AutoCAD at all. You only need Windows plus AutoCAD LT 2024+ for the File IPC backend, which unlocks PDF plotting, offset/fillet/chamfer, undo/redo and live screenshots of the real app.

Why does it require AutoCAD LT 2024 or newer?

AutoLISP support was only added to AutoCAD LT in the 2024 release (Windows). The server's dispatcher, mcp_dispatch.lsp, is AutoLISP, so earlier LT versions and AutoCAD LT for Mac (which never got AutoLISP) cannot run it.

Is it safe to run against production drawings?

Run it on copies. Everything stays local (stdio, no network), but drawing(create) erases and purges the current drawing, and system(execute_lisp) runs arbitrary AutoLISP inside AutoCAD. Review generated LISP the way you would review generated shell commands.

Alternatives to AutoCAD MCP

Compare all alternatives →

Control Blender from Claude and other LLMs for prompt-assisted 3D modeling, scene creation, and asset generation.

Unverified
stdio (local)
No auth
Python
22 tools
Updated 21 days agoRepo

Popular community server that feeds Figma layout data to coding agents via a Figma API token.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 1 month agoRepo

Generate beautiful, modern UI components from natural-language descriptions inside your IDE.

Unverified
stdio (local)
API key
TypeScript
4 tools
Updated 4 months agoRepo