AutoCAD MCP Server
Provides tools for interacting with AutoCAD, enabling AI agents to create, open, and manage drawings, manipulate entities (lines, circles, polylines, etc.), manage layers and blocks, add annotations and dimensions, perform P&ID operations with CTO symbol library, capture screenshots, and execute arbitrary AutoLISP code. It also supports headless DXF generation when AutoCAD is not available.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AutoCAD MCP ServerDraw a circle with center at 5,5 and radius 3"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AutoCAD MCP Server (NNDK fork)
MCP server for full AutoCAD (primary: AutoCAD 2027) and headless DXF generation. Upstream also supports AutoCAD LT 2024+; this fork’s working environment is full AutoCAD 2027, not LT.
Two backends, one API:
Backend | Runtime | Requires AutoCAD? | Screenshot |
File IPC | Windows Python | Yes — AutoCAD (full) / 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.
Prerequisites (File IPC backend)
Windows 10/11 (the File IPC backend uses Win32 APIs for focus-free window messaging)
AutoCAD (full) — recommended AutoCAD 2027; or AutoCAD LT 2024+ (Windows AutoLISP). AutoCAD LT for Mac does not support AutoLISP.
Python 3.10+ (Windows native — not WSL Python)
uv package manager (install guide)
The ezdxf headless backend works on any platform (Linux, macOS, WSL) for offline DXF generation without AutoCAD installed.
Russian setup notes for this fork: SETUP.ru.md.
Related MCP server: AutoCAD MCP Server
Quick Start
1. Clone and install
git clone https://github.com/gpt2nndk/autocad-mcp-nndk.git
cd autocad-mcp-nndk
uv sync2. Load the LISP dispatcher in AutoCAD
Open AutoCAD and load mcp_dispatch.lsp using APPLOAD:
Type
APPLOADin the AutoCAD command lineBrowse to
<repo>/lisp-code/mcp_dispatch.lspClick Load
You should see:
=== MCP Dispatch v3.1 loaded ===andReady 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.
3. Configure your MCP client
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": "auto" }
}
}
}Key points:
The
commandmust point to the Windows Python inside the project venv (not WSL python).AUTOCAD_MCP_BACKENDcan beauto(default — tries File IPC, falls back to ezdxf),file_ipc(requires AutoCAD), orezdxf(headless only).
Running from WSL
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 && .venv\\Scripts\\python.exe -m autocad_mcp"],
"env": { "AUTOCAD_MCP_BACKEND": "auto" }
}
}
}4. Verify
From your MCP client, call:
system(operation="status")You should see backend: "file_ipc" if AutoCAD is running, or backend: "ezdxf" for headless mode.
Tools
drawing — File/drawing management
Operation | Description | File IPC | ezdxf |
| Reset to clean drawing (erase all + purge) | Yes | Yes |
| Open an existing drawing | Yes | Yes (DXF) |
| Get entity count and layers | Yes | Yes |
| Save current drawing (to path if given) | Yes | Yes |
| Export as DXF | Yes | Yes |
| Plot to PDF | Yes | No |
| Purge unused objects | Yes | Yes |
| Get system variables by name | Yes | Yes |
| Undo last operation | Yes | No |
| Redo last undone operation | Yes | No |
entity — Entity CRUD + modification
Create: create_line, create_circle, create_polyline, create_rectangle, create_arc, create_ellipse, create_mtext, create_hatch
Read: list, count, get
Modify: copy, move, rotate, scale, mirror, offset*, array, fillet*, chamfer*, erase
*
offset,fillet,chamferare File IPC only (not supported in ezdxf headless backend).
layer — Layer management
list, create, set_current, set_properties, freeze, thaw, lock, unlock
block — Block operations
Operation | File IPC | ezdxf |
| Yes | Yes |
| Yes | Yes |
| Yes | Yes |
| Yes | Yes |
| Yes | Yes |
| No | Yes |
annotation — Text, dimensions, leaders
create_text, create_dimension_linear, create_dimension_aligned, create_dimension_angular, create_dimension_radius, create_leader
pid — P&ID operations (CTO symbol library)
setup_layers, insert_symbol, list_symbols, draw_process_line, connect_equipment, add_flow_arrow, add_equipment_tag, add_line_number, insert_valve, insert_instrument, insert_pump, insert_tank
P&ID symbol insertion requires the CAD Tools Online (CTO) P&ID Symbol Library installed at
C:\PIDv4-CTO\. The ezdxf backend has built-in CTO library support. For the File IPC backend, some P&ID operations require additional LISP helpers — see the P&ID section in the wiki for setup details.
view — Viewport and screenshot
Operation | Description |
| Zoom to show all entities |
| Zoom to a specified window |
| Capture current AutoCAD view as PNG |
Screenshots use PrintWindow (Win32) for the File IPC backend — works even when AutoCAD is minimized or in the background. The ezdxf backend renders via matplotlib.
system — Server management
status, health, get_backend, runtime, init, execute_lisp
execute_lispruns arbitrary AutoLISP code (File IPC only). Passdata: {code: "(+ 1 2)"}. This turns the server into an extensible automation platform — any valid AutoLISP expression can be executed.
Architecture
MCP Client (Claude)
│ stdio (JSON-RPC)
▼
Python MCP Server (autocad_mcp)
│
├── File IPC Backend ──► C:/temp/*.json ──► mcp_dispatch.lsp (AutoCAD)
│ PostMessageW(WM_CHAR) to MDIClient — no focus steal
│
└── ezdxf Backend ──► in-memory DXF (headless, no AutoCAD needed)The File IPC backend sends keystrokes to AutoCAD's MDIClient window via PostMessageW(WM_CHAR), triggering the (c:mcp-dispatch) AutoLISP command. This approach does not steal window focus — you can continue working in other applications while automation runs.
Environment Variables
Variable | Default | Description |
|
| Backend selection: |
|
| Directory for IPC command/result JSON files (must match on both Python and LISP sides) |
|
| IPC command timeout in seconds (1-300) |
|
| Disable screenshot capture (text feedback only) |
Note: If you change
AUTOCAD_MCP_IPC_DIR, you must also update the*mcp-ipc-dir*variable inmcp_dispatch.lspto match.
Development
uv sync
uv run pytest tests/ -vAutoCAD AutoLISP Compatibility
This fork’s primary environment is full AutoCAD 2027.
AutoLISP is available in full AutoCAD. It was also added to AutoCAD LT in the 2024 release (Windows only). AutoCAD LT for Mac does not support AutoLISP.
Supported | Not Supported |
| VLIDE (Visual LISP IDE) |
All | Express Tools (varies by install) |
File I/O ( | AutoLISP on Mac LT |
Entity access ( | |
Selection sets |
On full AutoCAD 2027, ActiveX/COM (vlax-*) and SendCommand are available and preferred when IPC keystrokes fail.
The mcp_dispatch.lsp dispatcher works with full AutoCAD and LT 2024+.
What's New in v3.1
execute_lisp— Run arbitrary AutoLISP code via temp file pattern. Turns the server from a fixed command set into an extensible automation platform.Undo / Redo — Single-step undo and redo via
drawingtool.Drawing open — Open existing
.dwgfiles programmatically (FILEDIA suppressed).Drawing create — Now resets current drawing (erase all + purge) instead of
_.NEW, preserving the LISP dispatcher namespace.Drawing save with path —
savewith apathparameter uses SAVEAS; without path uses QSAVE.get_variablesfix — Respects thenamesparameter; returns requested variables with proper type handling.Polyline/leader fix — Point arrays properly encoded via semicolon-delimited format.
ESC prefix — Sends 2x ESC before each dispatch to cancel stale pending commands from prior timeouts.
UTF-8/cp1252 fallback — Handles non-ASCII characters in LISP result files (AutoCAD writes Windows-1252).
Configurable IPC timeout —
AUTOCAD_MCP_IPC_TIMEOUTenv var (1–300 seconds, default 10).Thread-safe backend init —
asyncio.Lockprevents parallel initialization races.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA server that enables natural language interaction with AutoCAD through large language models like Claude, allowing users to create and modify drawings using conversational commands.Last updated232
- Flicense-qualityCmaintenanceAn MCP server that bridges Claude with AutoCAD, enabling to generate architectural floor plans, draw geometry, and export DXF files just by describing what you need in natural language.Last updated
- Alicense-qualityCmaintenanceEnables natural-language control of AutoCAD LT for automation and headless DXF generation, supporting drawing, entity, layer, block, annotation, P&ID, and system operations via an MCP interface.Last updatedMIT
- AlicenseAqualityAmaintenanceMCP server for full AutoCAD automation, AutoCAD LT automation, and headless DXF generation. It provides 8 consolidated tools for drawing, entity, layer, block, annotation, P&ID, view, and system operations via MCP stdio transport.Last updated123MIT
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
GibsonAI MCP server: manage your databases with natural language
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gpt2nndk/mvp-podschet-kj-pilony'
If you have feedback or need assistance with the MCP directory API, please join our Discord server