Cover image
Try Now
2025-04-09

CAD MCP Server

3 years

Works with Finder

3

Github Watches

3

Github Forks

31

Github Stars

CAD-MCP Server (CAD Model Control Protocol Server)

English | 中文

Project Introduction

CAD-MCP is an innovative CAD control service that allows controlling CAD software for drawing operations through natural language instructions. This project combines natural language processing and CAD automation technology, enabling users to create and modify CAD drawings through simple text commands without manually operating the CAD interface.

Features

CAD Control Functions

  • Multiple CAD Software Support: Supports mainstream CAD software including AutoCAD, GstarCAD (GCAD) and ZWCAD
  • Basic Drawing Functions:
    • Line drawing
    • Circle drawing
    • Arc drawing
    • Rectangle drawing
    • Polyline drawing
    • Text addition
    • Pattern filling
    • Dimension annotation
  • Layer Management: Create and switch layers
  • Drawing Save: Save the current drawing as a DWG file

Natural Language Processing Functions

  • Command Parsing: Parse natural language instructions into CAD operation parameters
  • Color Recognition: Extract color information from text and apply it to drawing objects
  • Shape Keyword Mapping: Support recognition of various shape description words
  • Action Keyword Mapping: Recognize various drawing and editing actions

Demo

The following is the demo video.

Demo

Installation Requirements

Dependencies

pywin32>=228    # Windows COM interface support
mcp>=0.1.0      # Model Control Protocol library
pydantic>=2.0.0 # Data validation
typing>=3.7.4.3 # Type annotation support

System Requirements

  • Windows operating system
  • Installed CAD software (AutoCAD, GstarCAD, or ZWCAD)

Configuration

The configuration file is located at src/config.json and contains the following main settings:

{
    "server": {
        "name": "CAD MCP Server",
        "version": "1.0.0"
    },
    "cad": {
        "type": "AutoCAD",  
        "startup_wait_time": 20,
        "command_delay": 0.5
    },
    "output": {
        "directory": "./output",
        "default_filename": "cad_drawing.dwg"
    }
}
  • server: Server name and version information
  • cad:
    • type: CAD software type (AutoCAD, GCAD, GstarCAD, or ZWCAD)
    • startup_wait_time: CAD startup waiting time (seconds)
    • command_delay: Command execution delay (seconds)
  • output: Output file settings

Usage

Starting the Service

python src/server.py

Claude Desktop & Windsurf

# add to claude_desktop_config.json. Note: use your path  
{
    "mcpServers": {
        "CAD": {
            "command": "python",
            "args": [
                # your path, e.g.: "C:\\cad-mcp\\src\\server.py"
                "~/server.py"
            ]
        }
    }
}

Cursor

# Add according to the following diagram Cursor MCP. Note: use your path  

Cursor config

MCP Inspector

# Note: use your path  
npx -y @modelcontextprotocol/inspector python C:\\cad-mcp\\src\\server.py

Service API

The server provides the following main API functions:

  • draw_line: Draw a line
  • draw_circle: Draw a circle
  • draw_arc: Draw an arc
  • draw_polyline: Draw a polyline
  • draw_rectangle: Draw a rectangle
  • draw_text: Add text
  • draw_hatch: Draw a hatch pattern
  • add_dimension: Add linear dimension
  • save_drawing: Save the drawing
  • process_command: Process natural language commands

Project Structure

CAD-MCP/
├── imgs/                # Images and video resources
│   └── CAD-mcp.mp4     # Demo video
├── requirements.txt     # Project dependencies
└── src/                 # Source code
    ├── __init__.py     # Package initialization
    ├── cad_controller.py # CAD controller
    ├── config.json     # Configuration file
    ├── nlp_processor.py # Natural language processor
    └── server.py       # Server implementation

License

MIT License

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • jae-jae
  • MCP server for fetch web page content using Playwright headless browser.

  • ravitemer
  • A powerful Neovim plugin for managing MCP (Model Context Protocol) servers

  • patruff
  • Bridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools

  • pontusab
  • The Cursor & Windsurf community, find rules and MCPs

  • av
  • Effortlessly run LLM backends, APIs, frontends, and services with one command.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • appcypher
  • Awesome MCP Servers - A curated list of Model Context Protocol servers

    Reviews

    2 (1)
    Avatar
    user_PUQZQMTE
    2025-04-17

    CAD-MCP by daobataotie is an exceptional tool for CAD professionals. The functionalities it offers are comprehensive and user-friendly. The intuitive interface streamlines the design process, making complex tasks much simpler. Highly recommend checking it out on GitHub for anyone looking to enhance their CAD workflow!