autocad-mac-mcp — MCP server for AutoCAD for Mac
An MCP server that lets Claude read and write the drawing open in AutoCAD for Mac. The AutoCAD MCP servers that already existed reach AutoCAD through COM, a .NET plugin or Win32 messages, none of which exist on a Mac; this one types into AutoCAD's own command line and reads the answer back from a file. A call takes about a second, there is no plugin to install, and the whole AutoLISP API is available.
- Python
- MCP
- AutoLISP
- AutoCAD for Mac
- macOS Accessibility API
- pyproj
- uv
Capabilities
- Target one `.dwg`: launches AutoCAD if it is closed, opens the file, answers missing-font dialogs and switches to it
- Read drawing info (units, extents, layers, entity count) and entities by layer or type as TSV, with coordinates exact to 3 decimals
- Write polylines, lines, circles, text and block inserts, one undo step per call; erase, move, re-layer or recolour by handle
- Run any AutoLISP or native command sequence and get the last value back
- Open, save, save as, close, export DXF and PDF
- Export layers to KML and import them back, with an offset to a projected CRS and any EPSG code pyproj knows
- Read a blocking dialog and press one of its buttons by name; take a screenshot of the AutoCAD window
How it works
- Each call writes `~/.acmcp/run.lsp`, wrapped in `vl-catch-all-apply`, which prints its result to `~/.acmcp/out.txt`
- The server brings AutoCAD to the front, checks it really is frontmost and types the `(load ...)` command through macOS System Events
- It polls for a `done` marker and returns the file; if a dialog blocks the command line, the Accessibility API reports it instead of hanging
Stack
- A single Python file (`server.py`, about 450 lines) run with `uv run --script`, MCP via FastMCP
- Works with Claude Code, Claude Desktop and Cursor; needs AutoCAD for Mac 2024 or newer (full version, not LT)