Enables interaction with a running AutoCAD instance to programmatically create geometric elements such as lines, polylines, rectangles, circles, ellipses, and arcs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AutoCAD MCP ServerDraw a circle at (10, 20) with a radius of 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AutoCAD MCP Server v0.1
A Model Context Protocol (MCP) server that enables AI agents to interact with AutoCAD through Python automation. This server provides basic drawing tools for creating geometric shapes and elements in AutoCAD.
š Features
Basic Drawing Tools: Lines, polylines, rectangles, circles, ellipses, and arcs
AI Agent Integration: Compatible with MCP-enabled AI assistants
Real-time AutoCAD Control: Direct integration with running AutoCAD instances
Simple Setup: Easy configuration and deployment
š Available Tools
Tool | Description | Parameters |
| Draw a line between two points |
|
| Draw a polyline through multiple points |
|
| Draw a rectangle with opposite corners |
|
| Draw a circle with center and radius |
|
| Draw an ellipse with center and axes |
|
| Draw an arc with center, radius, and angles |
|
š ļø Prerequisites
AutoCAD: Must be installed and running on Windows
Python: 3.8 or higher
uv: Python package manager (recommended)
š¦ Installation
Clone this repository:
Install dependencies:
Or with pip:
āļø Configuration
Ensure AutoCAD is running on your system
Add the server configuration to your MCP client:
š Usage
Starting the Server
Example AI Agent Commands
Once connected to an MCP-enabled AI assistant, you can use natural language commands:
"Draw a line from (0,0) to (10,10)"
"Create a rectangle with corners at (5,5) and (15,15)"
"Draw a circle at the origin with radius 5"
"Make an arc centered at (10,10) with radius 8 from 0° to 90°"
Direct API Usage
š§ Development
Project Structure
Adding New Tools
To add a new drawing tool:
Define the tool function with the
@mcp.tooldecoratorUse the
pyautocadlibrary to interact with AutoCADReturn a descriptive string about the action performed
Example:
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
š Version History
v0.1 - Initial release with basic drawing tools
Lines, polylines, rectangles, circles, ellipses, and arcs
Basic MCP server implementation
AutoCAD integration via pyautocad
š® Roadmap
Advanced drawing tools (splines, hatches, dimensions)
Layer management
Block insertion and manipulation
3D drawing capabilities
Drawing modification tools (move, copy, rotate, scale)
File operations (open, save, import, export)
ā ļø Known Limitations
Windows only (due to AutoCAD COM interface requirements)
Requires AutoCAD to be running
Basic error handling (improvements planned for v0.2)
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
FastMCP for the MCP server framework
pyautocad for AutoCAD automation
The Model Context Protocol community
š Support
If you encounter any issues or have questions:
Check the Issues page
Create a new issue with detailed information
Join the discussion in the MCP community
Note: This is version 0.1 - a foundational release. More advanced features and tools are in development and will be released in future versions.