home / mcp / cad mcp server

CAD MCP Server

Provides CAD drawing automation by parsing natural language commands and performing drawing actions across AutoCAD, GCAD, and ZWCAD.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "piexl-cad-mcp": {
      "command": "python",
      "args": [
        "src/server.py"
      ]
    }
  }
}

CAD-MCP is a protocol server that enables controlling CAD software via natural language instructions. This makes it easier to create and modify CAD drawings by issuing textual commands, automating drawing tasks across supported CAD applications.

How to use

You run the server and connect an MCP client to issue natural language commands. The server translates your instructions into CAD operations such as drawing lines, circles, arcs, polylines, text, hatch patterns, and dimensions, and can save drawings to DWG format. You can configure the server to target AutoCAD or compatible CAD software and then use supported MCP clients to send commands like create lines, add text, or apply colors to drawing objects.

How to install

Prerequisites you need before installation: Windows operating system, installed CAD software (AutoCAD, GstarCAD, or ZWCAD). Install Python and required Python packages so the MCP server can run.

# 1) Install Python from the official source
# 2) Install Windows build tools if needed
# 3) Install project dependencies
pip install -r requirements.txt
# 4) Start the MCP server
python src/server.py

Configuration and usage notes

Configure the server to target your CAD software and tune startup timing and command delays as needed. The main configuration file is located at src/config.json and includes server information, CAD software type, startup wait time, and output settings.

Client integration examples

To connect an MCP client, you can run a local command for a quick test and then point your client to the server. A typical local run uses Python to start the server and a local client to issue commands.

Tools and endpoints

The server exposes a set of drawing and editing actions you can invoke through natural language processing. The available functions include drawing lines, circles, arcs, polylines, rectangles, and text, as well as adding hatch patterns, linear dimensions, and saving the current drawing.

Available tools

draw_line

Draw a straight line between two points or coordinates with optional layer, color, and line type.

draw_circle

Create a circle with a given center and radius, including optional fill and color.

draw_arc

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

draw_polyline

Draw a connected sequence of points forming a polyline with optional vertex properties.

draw_rectangle

Create a rectangle using two corner points or a corner, width, and height specification.

draw_text

Add text at a specified location with font, height, and alignment options.

draw_hatch

Apply a hatch pattern to a closed boundary or region.

add_dimension

Add linear dimension measurements between two points or features.

save_drawing

Save the current CAD drawing to a DWG file in the configured output directory.

process_command

Process natural language instructions into concrete CAD operations.