{"id":"dfee5ccc-84ea-475e-b4ac-a104b2ce64bd","slug":"autocad-mac-mcp","kind":"mcp","name":"autocad-mac-mcp","summary":"MCP server for AutoCAD for Mac. Claude reads and writes the open drawing: AutoLISP, entities, files, KML. No Windows needed.","owner":"medjbilou","repoUrl":"https://github.com/medjbilou/autocad-mac-mcp","license":"MIT","licenseTier":"permissive","trust":"community","stars":2,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-08-26T14:19:13.000Z","addedAt":"2026-10-21T06:39:04.196Z","logoUrl":"https://avatars.githubusercontent.com/u/257621483?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["files-documents","cloud-infra","memory-knowledge"],"tags":["autocad","autolisp","claude","macos"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-21T06:40:24.817Z","sample":false,"url":"https://conduits.dev/tools/autocad-mac-mcp","language":"Python","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<p align=\"center\">\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"autocad-mac-mcp: Claude reads and writes the drawing open in AutoCAD for Mac. Diagram: Claude types a load command into the AutoCAD command line, AutoLISP runs in the drawing, and the result comes back through a file.\">\n</p>\n\nThe AutoCAD MCP servers I could find all assume Windows. They reach AutoCAD through COM, a .NET plugin or Win32 window messages, and none of those exist on a Mac. This server takes the one route the Mac build leaves open: it 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.\n\n```\n# example session (numbers are illustrative)\nyou    > what layers are in this drawing, and how many pipes are on PIPES-MAIN?\nclaude > autocad_drawing_info()                                 -> 42 layers, 2731 entities, units = metres\nclaude > autocad_entities(layer=\"PIPES-MAIN\", types=\"LWPOLYLINE\") -> 184 polylines, 3218 m in total\n```\n\n## Quick start\n\nYou need macOS, AutoCAD for Mac 2024 or newer (the full version; AutoCAD LT has no AutoLISP), [uv](https://docs.astral.sh/uv/), and Accessibility permission for the terminal or app that will run the server (System Settings, Privacy & Security, Accessibility).\n\n```bash\ngit clone https://github.com/medjbilou/autocad-mac-mcp && cd autocad-mac-mcp\nuv run --script server.py --setup      # once: lets AutoCAD load scripts from ~/.acmcp without asking\nuv run --script server.py --selftest   # with a drawing open in AutoCAD; prints \"selftest OK in 1.0s\"\nclaude mcp add --scope user autocad -- uv run --script \"$PWD/server.py\"\n```\n\nOpen a drawing in AutoCAD, then ask Claude things like:\n\n> List the layers and count the entities on each.\n> Move everything on layer TEMP to layer DEMO and colour it red.\n> Export the IRRIGATION* layers to a KML I can open in Google Earth.\n\nClaude Desktop and Cursor take the same command in their MCP config:\n\n```json\n{ \"mcpServers\": { \"autocad\": { \"command\": \"uv\", \"args\": [\"run\", \"--script\", \"/path/to/autocad-mac-mcp/server.py\"] } } }\n```\n\n## What Claude can do\n\n| | Tool | What it does |\n|---|---|---|\n| Target | `autocad_target` | point everything at one `.dwg`: launches AutoCAD if it is closed, opens the file if it is not open, answers missing-font dialogs, switches to it, remembers it. Call it first |\n| Read | `autocad_drawing_info` | name, path, units, extents, layer list, entity count |\n| | `autocad_entities` | entities by layer or type wildcard as TSV: handles, coordinates to 3 decimals, polyline vertices with bulges, radii, arc angles. `to_file=` exports without a limit |\n| | `autocad_drawings`, `autocad_switch_drawing` | list the open drawings, activate one by name |\n| | `autocad_screenshot` | PNG of the AutoCAD window |\n| Write | `autocad_draw` | polylines, lines, circles, text and block inserts. Creates layers as needed; one undo step per call |\n| | `autocad_modify` | by handle: erase, move, change layer, set colour |\n| | `autocad_lisp` | run any AutoLISP and get the last value back. Everything else is built on this |\n| | `autocad_command` | any native command sequence, for example `ZOOM E` or `_.LAYER _M NEW` |\n| Files and geo | `autocad_file` | open, save, save as, close, export DXF, export PDF. Dialogs are handled |\n| | `autocad_kml_export`, `autocad_kml_import` | layers to KML and back, with an offset from drawing units to a projected CRS and an EPSG code (anything pyproj knows) |\n| UI | `autocad_dialog` | read the modal alert AutoCAD is showing (text and buttons) and press one by name |\n| | `autocad_gui` | key, type or click, then return a screenshot |\n\n## How it works\n\n<p align=\"center\">\n  <img src=\"./assets/readme/how-it-works.svg\" width=\"100%\" alt=\"Four stages: Claude calls a tool; the server writes run.lsp and types a load command into AutoCAD through System Events; AutoLISP runs inside the drawing and writes out.txt; the server reads it and returns the result in about one second.\">\n</p>\n\nAutoCAD for Mac has no `accoreconsole`, no AppleScript dictionary and no COM. It does have a command line that accepts `(load \"file.lsp\")`, so each tool call does three things:\n\n1. Writes `~/.acmcp/run.lsp`. Your code is wrapped in `vl-catch-all-apply`, the result is printed to `~/.acmcp/out.txt`, and a `done` marker is written afterwards.\n2. Brings AutoCAD to the front, checks that it really is frontmost, presses Esc twice and types the load command through macOS System Events.\n3. Polls for `done` and returns the contents of the file.\n\nIf a dialog blocks the command line, the server sees it through the Accessibility API and reports it instead of hanging, so Claude can answer it with `autocad_dialog`.\n\n## Limits\n\nRead these before you depend on it.\n\n- It works by typing. One call at a time (the server holds a lock; do not let your client run tool calls in parallel). AutoCAD comes to the front for the keystroke, then your previous app gets focus back (set `ACMCP_KEEP_FOCUS=1` to leave AutoCAD in front). Don't type in AutoCAD while Claude is working.\n- AutoLISP only. `vla-*` and `vlax-*` (ActiveX) do not exist in the Mac build. `entget`, `entmake`, `entmod`, `ssget`, `tblnext` and `command` all work.\n- No headless mode, but no clicking either: `autocad_target(path)` launches AutoCAD and opens the drawing itself (about 40 s cold, 5 s warm). Every later call re-checks that this drawing is the active one and refuses to type into the Start tab. Only a \"Save changes?\" dialog stops it — that one is yours to answer with `autocad_dialog`.\n- Precision. `autocad_lisp` prints reals with 6 significant digits, which is the AutoLISP default. `autocad_entities` uses `rtos` and is exact to 3 decimals, so use it for coordinates.\n- `export_pdf` assumes the `DWG To PDF.pc3` plotter and an ISO A1 sheet. Change it in `server.py` if your setup differs.\n\n## Troubleshooting\n\n| Symptom | What to do |\n|---|---|\n| `AutoCAD is not running` / `no drawing is open (Start tab)` | Call `autocad_target(\"/path/to/file.dwg\")`. |\n| `blocked by a dialog ['Save', \"Don't Save\", 'Cancel']` | Your call: `autocad_dialog(press=\"Save\")` or `\"Don't Save\"`. The server never decides this for you. |\n| `AutoCAD did not respond in 30s` | No dialog and a drawing open? Then the terminal probably lacks Accessibility permission. |\n| `AutoCAD is not frontmost ... refusing to type` | Something took focus during the call. Retry; the server re-activates AutoCAD on each attempt. |\n| The first call shows a \"Load this file?\" prompt | Run `--setup` again. It adds `~/.acmcp` to `TRUSTEDPATHS`. |\n| `ModuleNotFoundError: mcp.server.fastmcp` | You have `mcp` 2.x installed. The script pins `mcp<2`; run it with `uv run --script`. |\n| A different AutoCAD version | `ACMCP_BUNDLE_ID=com.autodesk.AutoCAD2026 uv run --script server.py` |\n\n## Why this exists\n\nI needed Claude to read irrigation plans out of AutoCAD on a Mac, and every MCP I found assumed Windows. The server is a single file (`server.py`, about 450 lines) so it is easy to read and adapt. The same pattern works for any Mac app that has a command line or a scripting console but no API.\n\n<p align=\"center\">\n  <a href=\"https://github.com/oil-oil/beautify-github-readme\"><img src=\"./assets/readme/made-with-beautify.svg\" width=\"300\" alt=\"README made with beautify-github-readme\"></a>\n</p>\n\nMIT, Mohammed Jbilou\n"}