MCP server for AutoCAD LT v3.1: freehand AutoLISP execution, 8 consolidated tools, File IPC + ezdxf backends, focus-free dispatch, undo/redo, P&ID symbols, and robust IPC with ESC prefix and UTF-8 fal
翻訳待ち
開発ツールPython · Common LispGitHub @puran-water自分でインストール所有者未確認
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
MCP server for AutoCAD LT v3.1: freehand AutoLISP execution, 8 consolidated tools, File IPC + ezdxf backends, focus-free dispatch, undo/redo, P&ID symbols, and robust IPC with ESC prefix and UTF-8 fallback. Companion agent skill: puran-water/autocad-drafting
翻訳待ち
Loading the full README.
Read the full README ↗This is an active drawing-automation integration used alongside the PuranOS engineering workflow. AutoCAD LT and headless DXF are distinct backends with the platform requirements below. The current guarded revision helpers operate on an explicitly identified working drawing; engineering basis, canonical equipment records and release decisions live in the wider workflow.
Sizing-to-balance, proposals and BEPs produce the engineering basis. PuranOS Studio presents retained review publications. Neither a successful CAD command nor a screenshot approves a design. This repository is maintained separately from the six-server public calculation mirror.
Built by Puran Water · Discuss engineering or a drawing workflow.
MCP server for AutoCAD LT automation and headless DXF generation.
Two backends, one API:
| Backend | Runtime | Requires AutoCAD? | Screenshot |
|---|---|---|---|
| File IPC | Windows Python | Yes — AutoCAD LT 2024+ (Windows) | Win32 PrintWindow |
| ezdxf | Any platform | No (headless) | matplotlib render |
The server exposes 8 consolidated tools (drawing, entity, layer, block, annotation, pid, view, system) over the MCP stdio transport. An MCP client (Claude Desktop, Claude Code, etc.) connects and drives AutoCAD through natural-language requests.
The ezdxf headless backend works on any platform (Linux, macOS, WSL) for offline DXF generation without AutoCAD installed.
git clone https://github.com/puran-water/autocad-mcp.git
cd autocad-mcp
uv sync
Open AutoCAD LT and load mcp_dispatch.lsp using APPLOAD:
APPLOAD in the AutoCAD command line<repo>/lisp-code/mcp_dispatch.lsp=== MCP Dispatch v3.1 loaded === and Ready for commands via (c:mcp-dispatch)Tip: Add the file to your AutoCAD Startup Suite (in the APPLOAD dialog) so it loads automatically with every drawing.
Add to your MCP client configuration (e.g. Claude Desktop 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": "file_ipc" }
}
}
}
Key points:
command must point to the Windows Python inside the project venv (not WSL python).AUTOCAD_MCP_BACKEND can be auto (default — tries File IPC, falls back to ezdxf), file_ipc (requires AutoCAD), or ezdxf (headless only).If your MCP client runs in WSL (e.g. Claude Code), launch the server through cmd.exe so it runs as a native Windows process:
{
"mcpServers": {
"autocad-mcp": {
"type": "stdio",
"command": "cmd.exe",
"args": ["/d", "/s", "/c", "cd /d C:\\path\\to\\autocad-mcp && set AUTOCAD_MCP_BACKEND=file_ipc&& .venv\\Scripts\\python.exe -m autocad_mcp"]
}
}
}
From your MCP client, call:
system(operation="status")
You should see backend: "file_ipc" if AutoCAD is running, or backend: "ezdxf" for headless mode.
For native DWG work, require file_ipc; the examples above disable headless fallback.
Verify DWGNAME, DWGPREFIX, CTAB and DBMOD with drawing.get_variables, then
inspect a screenshot before editing. status alone does not identify the active DWG.
Use a Windows-local working copy if Windows cannot access a WSL UNC path, and copy
saved deliverables back explicitly. Never use drawing.create to make a working copy:
it erases and purges the active drawing.
system(operation="revision", data={"action": "read", "drawing": "C:/work/copy.dwg", "handles": ["ABCD"]}) reads native entities. The revision adapter supports bounded
exports, layout frames, guarded edits, plotting and AutoCAD 2010 saves. Each mutation
batch has 1–7 operations, a unique journal path, expected document identity and old
entity values. Receipts retain before/after state and created handles. Read the
operation reference and recovery procedure before use.
Revision clouds can follow an orthogonal route instead of enclosing unrelated labels:
{
"action": "batch",
"drawing": "C:/work/copy.dwg",
"id": "route-cloud-01",
"journal": "C:/work/route-cloud-01.json",
"operations": [{
"kind": "cloud", "item": "approved-change-42",
"space": "Model", "layer": "REV-01",
"points": [[0,0], [8,0], [8,2], [2,2], [2,8], [0,8]],
"arc": 0.4, "text_height": 0.3, "revision": "01",
"marker_position": [10,3]
}]
}
Create the revision layer first. Pass this object to system with operation="revision".
For the Windows CLI, save the object as request.json (the extra action is ignored):
python -m autocad_mcp.revision batch request.json --output receipt.json
An existing MCP session can use the updated helper through execute_lisp without
acquiring a new tool schema: replace action with operation in the request, then
compile on WSL and submit the resulting expression as data.code:
This is the beginning of the README. Read the rest at the original. Read the full README ↗