Skip to main content
Glama
Ajmalpshaik

AutoCAD MCP

by Ajmalpshaik

AutoCAD MCP

Public, but still a work in progress. This is Ajmal's working copy of the AutoCAD MCP server and the drawing packages made with it. You are welcome to read it, try it and share ideas through an Issue, but expect things to change.

An MCP server that lets Claude drive the AutoCAD already open on your machine.

You describe the drawing. AutoCAD MCP does the AutoCAD work behind it.


What it is

AutoCAD MCP connects Claude to a running copy of full AutoCAD through AutoCAD's COM Automation interface. Claude reads the drawing you have open and draws into it live. Geometry appears on screen as it is created, and every tool call lands as one undo step, so anything Claude does can be reversed with one Ctrl+Z.

"Check the AutoCAD connection and tell me what's open."
"Draw a 5000 x 3000 rectangle at the origin on a new layer A-WALL, in red."
"Find every text that says FFL and tell me where it is."
"Total the length of everything on layer M-PIPE-CWS."
"I've selected some objects - move them 1200 to the right."

It is not an AutoCAD plug-in. Nothing is installed inside AutoCAD. It is an outside program that attaches to AutoCAD the same way a VBA macro would.

Related MCP server: vn-autocad-claude

Four parts

Part

Responsibility

Folder

The server

The MCP server: 50 autocad_* tools, the COM link, AutoLISP helpers

src/autocad_mcp/

Generators

Python scripts that build whole drawing packages through the server (AHU, CCTV)

generators/

Drawings

What the generators produced: DWG, PDF, PNG previews

drawings/

Tools & tests

Live smoke test, protocol check, offline and live test suites

tools/, tests/

Everything else is documentation (docs/), configuration examples (examples/) and stopped experiments kept for reference (archive/).


What you need

OS

Windows (COM Automation is Windows-only)

AutoCAD

2015 or newer, full AutoCAD, not LT (LT has no COM Automation)

Python

3.10 or newer

AutoCAD must have been started normally at least once so it registers its COM interface.

Quick start

python -m venv .venv
.venv\Scripts\python.exe -m pip install -e ".[dev]"

Check the 50 tools register (AutoCAD not needed):

.venv\Scripts\autocad-mcp.exe --list-tools

Check it reaches AutoCAD (open AutoCAD with any drawing first):

.venv\Scripts\python.exe tools/smoke_test.py

Connect it to Claude Code (this repository's .mcp.json already does this when Claude Code is opened in this folder):

claude mcp add autocad -- "D:\06_Development\09_Autocad MCP\Autocad MCP\.venv\Scripts\autocad-mcp.exe"

Full steps, Claude Desktop and network use: docs/SETUP.md.


What it can do today

Group

Tools

Detail

Session and files

10

status, open, save, switch, export PDF/DXF, zoom, system variables

Drawing

12

line, polyline, rectangle, circle, arc, ellipse, point, text, mtext, dimension, block, hatch

Bulk drawing

1

autocad_batch_draw: hundreds of entities in one AutoLISP round trip (about 9x faster)

Querying

6

list and filter entities, selection, find text, extents, measure

Modifying

9

move, copy, rotate, scale, mirror, offset, array, modify, delete (delete needs confirm=true)

Layers and blocks

7

list, create, state, current, delete, blocks, styles

Escape hatches

5

any command, AutoLISP with a result, purge, regen, audit

Every tool with its options: docs/03-tools-reference.md.

Drawing packages made with it so far (outputs in drawings/):

Package

Sheets

Generator

AHU-01 GA, isometric, P&ID, BMS, plant room, details, SLD, TAB

11 (A1)

generators/ahu_*.py

CCTV full package, sample building B1+G+4, MOI SSD Qatar

42 (A1)

generators/cctv_*.py

CCTV pole enclosure installation detail, Type A / B

1 (A1)

generators/encl_*.py

How to run them: docs/04-drawing-generators.md.


You are

Read

The owner

docs/HANDOVER.md: where work stopped and what is next

Setting it up

docs/SETUP.md, then docs/TROUBLESHOOTING.md

Changing the code

docs/PROJECT-MAP.md, CONTRIBUTING.md

An AI agent

AGENTS.md

The full documentation index is docs/README.md.

Safety in one paragraph

Each tool call is one undo group. Deleting needs an explicit confirm=true, and without it the tool only shows what it would delete. Commands that open a modal dialog are refused, because a dialog blocks AutoCAD until a person closes it. The HTTP transport has no authentication; use it only on a network you trust. More in SECURITY.md.

Licence

MIT. See LICENSE.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects Claude to a running Autodesk Civil 3D instance via COM automation to perform drawing, surface, alignment, COGO point, line, and corridor operations.
    9
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects Claude AI to AutoCAD for architectural design, enabling natural language to execute 684 commands. Automates drawing creation and editing through the Model Context Protocol.
    16 npm
    8
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables Claude Web to control a local AutoCAD instance via MCP, exposing 149 tools for CAD operations with dual COM/ezdxf backend support.
    -