CAD MCP Server
Configuration
View docs{
"mcpServers": {
"daobataotie-cad-mcp": {
"command": "python",
"args": [
"C:\\cad-mcp\\src\\server.py"
]
}
}
}CAD-MCP Server lets you control CAD software through natural language instructions, enabling drawing operations to be executed automatically by the server. This makes it easier to create and modify CAD drawings without manually operating the CAD interface, improving consistency and speed for repetitive tasks.
You run the CAD-MCP Server locally and connect your MCP client to it. The server exposes functions to perform CAD drawing operations such as drawing lines, circles, arcs, rectangles, polylines, adding text, hatch patterns, and adding dimensions. You can issue natural language commands to the server, which are parsed into CAD actions and applied to the active drawing. You can also save the current drawing to a DWG file.
Prerequisites you need to prepare before installation:
Install the Python dependencies needed by the server and MCP library. Open a terminal and run:
pip install pywin32>=228
pip install mcp>=0.1.0
pip install pydantic>=2.0.0
pip install typing>=3.7.4.3To start the server locally, run the Python script that implements the MCP server. In a terminal, execute the following command:
python src/server.pyCreate a client configuration that points to the local server. The server runs as a standard MCP stdio server, so you can reference it by the command to start the Python process and the path to the server script. Example client setup (adjust paths to your environment) would specify the Python command and the script path as the runtime for the CAD MCP server.
Draw a straight line between two points in the active CAD document.
Draw a circle with a specified center and radius.
Draw an arc defined by center, radius, start angle, and end angle.
Draw a connected series of line segments defined by multiple points.
Draw a rectangle defined by corner coordinates or by width and height.
Add text at a specified location with optional formatting.
Fill a region with a hatch pattern.
Add a linear dimension between two points.
Save the current drawing to a DWG file.
Process a natural language command and execute corresponding CAD actions.