daobataotie/CAD-MCP
CAD MCP Server
480 ★70 forksPythonUpdated 1y ago
What you need to know
CAD control MCP server that lets users create and modify CAD drawings through natural language instructions, supporting AutoCAD, GstarCAD (GCAD), and ZWCAD via Windows COM.
Install
pip install pywin32>=228 mcp>=0.1.0 pydantic>=2.0.0 typing>=3.7.4.3 (see requirements.txt) python src/server.py (starts the service)
Usage
- •Set the CAD software type in src/config.json (cad.type: AutoCAD/GCAD/GstarCAD/ZWCAD, startup_wait_time, command_delay)
- •Add to claude_desktop_config.json with command 'python' and args pointing to your path to src/server.py (Claude Desktop and Windsurf)
- •Debug with MCP Inspector: npx -y @modelcontextprotocol/inspector python C:\cad-mcp\src\server.py
- •Call API functions: draw_line, draw_circle, draw_arc, draw_polyline, draw_rectangle, draw_text, draw_hatch, add_dimension, save_drawing (DWG), process_command (natural language)
Key features
- ✓Supports AutoCAD, GstarCAD (GCAD), and ZWCAD
- ✓Basic drawing tools: line, circle, arc, rectangle, polyline, text, hatch pattern, linear dimension
- ✓Layer management: create and switch layers; save current drawing as DWG
- ✓Natural language processing: command parsing, color recognition from text, shape keyword mapping, action keyword mapping
Caveats
- ⚠Windows-only — requires pywin32 for the Windows COM interface and an installed CAD application (AutoCAD, GstarCAD, or ZWCAD)
- ⚠Controlled by config.json (server name/version, CAD type, output directory); drawing output defaults to ./output/cad_drawing.dwg
Platforms: WindowsClients: Claude Desktop · Windsurf · Cursor · MCP Inspector
Documentation ↗Reviewed 2026-08-07
Topics
aicadcadmcpmcpmodel-context-protocol
- Stars
- 480★
- Forks
- 70
- Language
- Python
- License
- MIT
- Created
- 2025-03-24
- Last push
- 2025-07-21