home / mcp / autocad mcp server
Provides an MCP-based AutoCAD integration enabling natural language interaction and drawing automation through LLMs.
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.
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.
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.pyTo 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"
]
}
}
}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.
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.
This project is currently not actively maintained due to time constraints. Contributions and collaboration are welcome to help extend and improve AutoCAD MCP capabilities.
Create a new AutoCAD drawing from natural language requests.
Draw a straight line between specified coordinates or points.
Draw a polyline defined by a sequence of points.
Create a rectangle with given corners or dimensions.
Draw a circle with a center and radius or diameter.
Add text annotations at a specified location.
Create or modify a drawing layer.
Move an existing CAD entity to a new position.
Rotate an entity around a pivot point.
Copy an existing CAD entity.
Highlight a specific entity for emphasis.
Highlight text patterns that match given criteria.
Scan the drawing and store entities in the embedded database.
Count occurrences of specified text patterns.
Execute an SQL query against the embedded CAD data store.