home / mcp / cad mcp server

CAD MCP Server

CAD MCP Server

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

Prerequisites you need to prepare before installation:

  • Python 3.8+ (Windows) or a compatible Python environment
  • Windows operating system (required for the CAD automation integration)
  • CAD software installed (AutoCAD, GstarCAD, or ZWCAD)

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.3

Start the server

To start the server locally, run the Python script that implements the MCP server. In a terminal, execute the following command:

python src/server.py

Configure MCP client connectivity

Create 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.

Available tools

draw_line

Draw a straight line between two points in the active CAD document.

draw_circle

Draw a circle with a specified center and radius.

draw_arc

Draw an arc defined by center, radius, start angle, and end angle.

draw_polyline

Draw a connected series of line segments defined by multiple points.

draw_rectangle

Draw a rectangle defined by corner coordinates or by width and height.

draw_text

Add text at a specified location with optional formatting.

draw_hatch

Fill a region with a hatch pattern.

add_dimension

Add a linear dimension between two points.

save_drawing

Save the current drawing to a DWG file.

process_command

Process a natural language command and execute corresponding CAD actions.