home / mcp / autocad mcp server

AutoCAD MCP Server

Provides an MCP-based AutoCAD integration enabling natural language interaction and drawing automation through LLMs.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "zh19980811-easy-mcp-autocad": {
      "command": "C:/path/to/project/.venv/Scripts/python.exe",
      "args": [
        "C:/path/to/project/server.py"
      ]
    }
  }
}

This MCP server provides an integration between AutoCAD and large language models, enabling natural language interaction to create and manage drawings, layers, and CAD elements. It supports basic drawing commands, element analysis, and in-drawing automation through a configurable MCP client setup.

How to use

You interact with AutoCAD through an MCP client by sending natural language requests that map to available drawing and management tools. Use it to create drawings, draw lines and circles, manage layers, highlight text, analyze drawing elements, and store data in an embedded database. The server exposes a set of functions you can invoke via the MCP protocol, and you can integrate it with a local or remote client that supports MCP.

How to install

Prerequisites: ensure you have Python 3.10 or newer, AutoCAD 2018 or newer with COM interface support, and a Windows operating system.

# 1. Clone the repository
git clone https://github.com/yourusername/autocad-mcp-server.git
cd autocad-mcp-server

# 2. Create a virtual environment
# Windows
python -m venv .venv
.venv\Scripts\activate

# macOS / Linux
python -m venv .venv
source .venv/bin/activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Optional: Build as executable
pyinstaller --onefile server.py

Additional setup and configuration

To run the server locally and integrate with Claude Desktop, use the following configuration snippet. This example shows a local Python runtime inside a virtual environment starting the server script.

{
  "mcpServers": {
    "easy-autocad": {
      "command": "C:/path/to/project/.venv/Scripts/python.exe",
      "args": [
        "C:/path/to/project/server.py"
      ]
    }
  }
}

Security and notes

Keep your environment secure by restricting MCP client access to trusted agents. Store any sensitive configuration outside of the repository and use environment-based secrets where possible.

Tools and capabilities

The server exposes a set of drawing and management tools you can invoke via MCP calls. Available functions include creating drawings, drawing lines, polylines, rectangles, circles, adding text, creating or modifying layers, moving and rotating entities, copying entities, highlighting entities and text matches, scanning and storing entities, counting text patterns, and executing SQL queries.

Maintenance notice

This project is currently not actively maintained due to time constraints. Contributions and collaboration are welcome to help extend and improve AutoCAD MCP capabilities.

Available tools

create_new_drawing

Create a new AutoCAD drawing from natural language requests.

draw_line

Draw a straight line between specified coordinates or points.

draw_polyline

Draw a polyline defined by a sequence of points.

draw_rectangle

Create a rectangle with given corners or dimensions.

draw_circle

Draw a circle with a center and radius or diameter.

draw_text

Add text annotations at a specified location.

create_layer

Create or modify a drawing layer.

move_entity

Move an existing CAD entity to a new position.

rotate_entity

Rotate an entity around a pivot point.

copy_entity

Copy an existing CAD entity.

highlight_entity

Highlight a specific entity for emphasis.

highlight_text_matches

Highlight text patterns that match given criteria.

scan_all_entities

Scan the drawing and store entities in the embedded database.

count_text_patterns

Count occurrences of specified text patterns.

execute_query

Execute an SQL query against the embedded CAD data store.