← Back to directory
A

AutoCAD MCP Server

Community
MCP server for AutoCAD LT automation and headless DXF generation
GitHub source repository ↗
★ 468 Stars Category · Dev Tools Popular Source revision 95476a33a1c2
46FMRS · D
Reliability
6/20
Security and permissions
6/20
Maintenance
7/20
Documentation
15/20
Setup experience
12/20

This server provides a powerful MCP interface for AutoCAD LT with dual backends for flexibility. It supports rich entity operations, P&ID symbols, and arbitrary AutoLISP execution, offering high extensibility. However, it relies on Windows environment and AutoCAD LT's limitations.

Read the FMRS scoring method →

An MCP server for automating AutoCAD LT and generating DXF headlessly. It provides two backends: File IPC (requires AutoCAD LT 2024+ on Windows) and ezdxf (cross-platform, headless). The server exposes 8 consolidated tools (drawing, entity, layer, block, annotation, pid, view, system) over stdio transport. It supports freehand AutoLISP execution, focus-free dispatch, undo/redo, P&ID symbols, and robust IPC with ESC prefix and UTF-8 fallback.

Tools

drawing
File/drawing management: create, open, save, export DXF, plot PDF, purge, get system variables, undo/redo.
entity
Entity CRUD and modification: create line, circle, polyline, rectangle, arc, ellipse, mtext, hatch; list, count, get; copy, move, rotate, scale, mirror, offset, array, fillet, chamfer, erase.
layer
Layer management: list, create, set current, set properties, freeze, thaw, lock, unlock.
block
Block operations: list, insert, insert with attributes, get attributes, update attribute, define (ezdxf only).
annotation
Annotations: create text, linear dimension, aligned dimension, angular dimension, radius dimension, leader.
pid
P&ID operations: setup layers, insert symbols (CTO library), draw process lines, connect equipment, add flow arrows, equipment tags, line numbers, valves, instruments, pumps, tanks.
view
Viewport and screenshot: zoom extents, zoom window, get screenshot as PNG.
system
Server management: status, health, backend info, runtime info, init, execute AutoLISP (File IPC only).

Setup

Clone the repository: git clone https://github.com/puran-water/autocad-mcp.git, then cd autocad-mcp and run uv sync. In AutoCAD LT, open and load <repo>/lisp-code/mcp_dispatch.lsp using APPLOAD (optionally add to Startup Suite). Configure your MCP client (e.g., Claude Desktop) with the mcpServers configuration pointing to the venv's python.exe and set AUTOCAD_MCP_BACKEND to auto (or file_ipc/ezdxf). If your client runs in WSL, launch via cmd.exe. Verify by calling system(operation="status").

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"
      }
    }
  }
}

Fit and risk

Best for

  • Engineers and designers needing to automate AutoCAD LT (Windows)
  • Developers who want to generate DXF without AutoCAD
  • Process industry applications integrating with CTO P&ID symbol library

Not for

  • Not for AutoCAD LT on Mac (does not support AutoLISP)
  • Not for users needing 3D operations or Express Tools (LT limitations)
  • Not for users needing ActiveX/COM (vlax-*) functionality

Required permissions

  • Requires access to AutoCAD LT window messaging (PostMessageW)
  • Needs read/write access to C:/temp (IPC directory, configurable)
  • Allows execution of arbitrary AutoLISP code (execute_lisp)
  • Requires access to CTO P&ID symbol library if using pid tools

Risks and side effects

  • Sending keystrokes to AutoCAD may interfere with current drawing; save work regularly
  • execute_lisp can run arbitrary code, posing security risks
  • IPC timeouts may cause command failures; adjust environment variables
  • File IPC backend requires native Windows Python; WSL needs special configuration

Troubleshooting

  1. Check that mcp_dispatch.lsp is loaded in AutoCAD and shows 'MCP Dispatch v3.1 loaded'
  2. Verify AUTOCAD_MCP_BACKEND is set to auto or file_ipc, and Python is native Windows
  3. Ensure the IPC directory (C:/temp) exists and is writable
  4. Increase AUTOCAD_MCP_IPC_TIMEOUT if commands are timing out
  5. Press ESC in AutoCAD to cancel any pending commands

Use cases

Automate AutoCAD LT drawing creation and editing via natural language
Generate DXF files headlessly for automated testing or batch processing
Insert P&ID symbols and process lines in AutoCAD automatically
Execute custom AutoLISP code to extend automation capabilities

Supported clients

Claude DesktopFull support
Claude CodeFull support