AutoCAD LT AutoLISP MCP Server logo

AutoCAD LT AutoLISP MCP Server

Organization
puran-water

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

Publisherpuran-water
Repositoryautocad-mcp
LanguagePython
Forks
82
Stars
523
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    AutoCAD LT AutoLISP MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    523 stars and 82 forks from the linked repository.

AutoCAD MCP Server

MCP server for AutoCAD LT automation and headless DXF generation.

Two backends, one API:

BackendRuntimeRequires AutoCAD?Screenshot
File IPCWindows PythonYes — AutoCAD LT 2024+ (Windows)Win32 PrintWindow
ezdxfAny platformNo (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 LT 2024 or newer — AutoLISP support was added in LT 2024 for Windows. AutoCAD LT for Mac exists but 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.

Quick Start

1. Clone and install

powershell
git clone https://github.com/puran-water/autocad-mcp.git
cd autocad-mcp
uv sync

2. Load the LISP dispatcher in AutoCAD LT

Open AutoCAD LT and load mcp_dispatch.lsp using APPLOAD:

  1. Type APPLOAD in the AutoCAD command line
  2. Browse to <repo>/lisp-code/mcp_dispatch.lsp
  3. Click Load
  4. You should see: === 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.

3. Configure your MCP client

Add to your MCP client configuration (e.g. Claude Desktop claude_desktop_config.json):

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 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).

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:

json
{
  "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

OperationDescriptionFile IPCezdxf
createReset to clean drawing (erase all + purge)YesYes
openOpen an existing drawingYesYes (DXF)
infoGet entity count and layersYesYes
saveSave current drawing (to path if given)YesYes
save_as_dxfExport as DXFYesYes
plot_pdfPlot to PDFYesNo
purgePurge unused objectsYesYes
get_variablesGet system variables by nameYesYes
undoUndo last operationYesNo
redoRedo last undone operationYesNo

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, chamfer are 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

OperationFile IPCezdxf
listYesYes
insertYesYes
insert_with_attributesYesYes
get_attributesYesYes
update_attributeYesYes
defineNoYes

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

OperationDescription
zoom_extentsZoom to show all entities
zoom_windowZoom to a specified window
get_screenshotCapture 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_lisp runs arbitrary AutoLISP code (File IPC only). Pass data: {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 LT)
    │   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

VariableDefaultDescription
AUTOCAD_MCP_BACKENDautoBackend selection: auto, file_ipc, ezdxf
AUTOCAD_MCP_IPC_DIRC:/tempDirectory for IPC command/result JSON files (must match on both Python and LISP sides)
AUTOCAD_MCP_IPC_TIMEOUT10.0IPC command timeout in seconds (1-300)
AUTOCAD_MCP_ONLY_TEXTfalseDisable screenshot capture (text feedback only)

Note: If you change AUTOCAD_MCP_IPC_DIR, you must also update the *mcp-ipc-dir* variable in mcp_dispatch.lsp to match.

Development

powershell
uv sync
uv run pytest tests/ -v

AutoCAD LT AutoLISP Compatibility

AutoLISP was added to AutoCAD LT in the 2024 release (Windows only). AutoCAD LT for Mac does not support AutoLISP.

Supported (LT 2024+ Windows)Not Supported
.lsp / .fas / .vlx / .dclVLIDE (Visual LISP IDE)
All vl-* utility functionsvlax-* (ActiveX/COM)
File I/O (open, read-line, etc.)Express Tools
Entity access (entget, entmod, etc.)3D operations
Selection setsAutoLISP on Mac

The mcp_dispatch.lsp dispatcher is fully compatible with 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 drawing tool.
  • Drawing open — Open existing .dwg files programmatically (FILEDIA suppressed).
  • Drawing create — Now resets current drawing (erase all + purge) instead of _.NEW, preserving the LISP dispatcher namespace.
  • Drawing save with path — save with a path parameter uses SAVEAS; without path uses QSAVE.
  • get_variables fix — Respects the names parameter; 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_TIMEOUT env var (1–300 seconds, default 10).
  • Thread-safe backend init — asyncio.Lock prevents parallel initialization races.

License

MIT

Installation

TypingMind
{
  "mcpServers": {
    "autocad-mcp": {
      "command": "path\\to\\autocad-mcp\\venv\\Scripts\\python.exe",
      "args": [
        "path\\to\\autocad-mcp\\server_lisp_fast.py"
      ]
    }
  }
}

Use AutoCAD LT AutoLISP MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once AutoCAD LT AutoLISP MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add AutoCAD LT AutoLISP MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the AutoCAD LT AutoLISP MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "autocad-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the AutoCAD LT AutoLISP MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the AutoCAD LT AutoLISP MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use AutoCAD LT AutoLISP MCP Server to help me with this task?
AutoCAD LT AutoLISP MCP Server
Sure. I read it.
Here is what I found using AutoCAD LT AutoLISP MCP Server.

Frequently asked questions

What is the AutoCAD LT AutoLISP MCP Server MCP server used for?

AutoCAD LT AutoLISP MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use AutoCAD LT AutoLISP MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use AutoCAD LT AutoLISP MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use AutoCAD LT AutoLISP MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With AutoCAD LT AutoLISP MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect AutoCAD LT AutoLISP MCP Server MCP to TypingMind?

AutoCAD LT AutoLISP MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does AutoCAD LT AutoLISP MCP Server MCP provide in TypingMind?

AutoCAD LT AutoLISP MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use AutoCAD LT AutoLISP MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If AutoCAD LT AutoLISP MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇