autocad
🏗️ Python MCP server for AutoCAD automation - Create walls, doors, windows & building structures programmatically via COM interface with intelligent layer management
claude mcp add --transport stdio thepiruthvirajan-autocad-mcp-server python C:\path\to\your\autocad-mcp-server\test_script.py \ --env PYTHONPATH="C:\path\to\your\autocad-mcp-server"
How to use
This AutoCAD MCP Server provides programmatic control over AutoCAD through COM automation. Built as a Python-based MCP server, it exposes capabilities to manage drawing entities, layers, and structures using natural language or direct API calls. It integrates with Claude Desktop and other MCP clients, enabling you to create rooms, walls, doors, windows, and other architectural elements, assign them to appropriate layers, and query drawing information such as layers and entity counts. Typical workflows include asking Claude to create a room with specific dimensions, querying the current drawing status, or batch-manipulating entities across layers. The server supports both conversational usage via Claude and direct API usage for custom integrations via the provided Python interface (e.g., AutoCADCOMServer).
How to install
Prerequisites:
- Operating System: Windows (COM automation required)
- AutoCAD installed (any version with COM support)
- Python 3.8 or higher
- Claude Desktop (for MCP integration) or another MCP client
Installation steps (Method 1: Using pip - Recommended):
-
Clone the repository and set up the environment git clone https://github.com/yourusername/autocad-mcp-server cd autocad-mcp-server
-
Create and activate a virtual environment python -m venv venv
Windows
venv\Scripts\activate
macOS/Linux (if ever supported)
source venv/bin/activate
-
Install the package in editable mode pip install -e .
-
Ensure dependencies are installed pip install mcp>=1.0.0 pywin32>=306
Method 2: Using uv (Faster) for environments that support it:
- Install uv pip install uv
- Clone and setup as above
- Create environment and install uv venv uv pip install -e .
Notes:
- The package relies on Windows COM automation; ensure AutoCAD is accessible from the environment where the server runs.
- If you plan to run tests or examples, the repository includes test_script.py used for quick connectivity checks.
Additional notes
Tips and common issues:
- Ensure AutoCAD is open and ready before starting the MCP server or testing via test_script.py.
- If Claude Desktop cannot find the MCP server, verify the Claude config path and restart Claude Desktop after updating the MCP configuration.
- Use the provided environment variable PYTHONPATH to point Claude to your local project, if running from a custom location.
- For advanced usage, the Direct API section demonstrates how to instantiate AutoCADCOMServer and perform operations like creating structures and querying entities.
- If you encounter permission issues with COM registration, run the terminal as Administrator on Windows.
- When running in a virtual environment, ensure the environment’s Python interpreter is the one invoking the MCP server.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP