Skip to main content
Glama
daobataotie

CAD-MCP Server

by daobataotie

CAD-MCP服务器(CAD模型控制协议服务器)

English |中文

项目介绍

CAD-MCP 是一项创新的 CAD 控制服务,允许通过自然语言指令控制 CAD 软件进行绘图操作。该项目结合了自然语言处理和 CAD 自动化技术,使用户能够通过简单的文本命令创建和修改 CAD 图纸,而无需手动操作 CAD 界面。

Related MCP server: CAD-MCP

特征

CAD 控制功能

  • 支持多种CAD软件:支持主流CAD软件,包括AutoCAD、GstarCAD(GCAD)、ZWCAD

  • 基本绘图功能

    • 线条画

    • 圆形绘图

    • 圆弧绘制

    • 矩形绘制

    • 折线绘制

    • 文本添加

    • 图案填充

    • 尺寸标注

  • 图层管理:创建和切换图层

  • 图形保存:将当前图形保存为 DWG 文件

自然语言处理功能

  • 命令解析:将自然语言指令解析为CAD操作参数

  • 颜色识别:从文本中提取颜色信息并将其应用于绘图对象

  • 形状关键词映射:支持各种形状描述词的识别

  • 动作关键字映射:识别各种绘图和编辑动作

演示

以下是演示视频。

演示

安装要求

依赖项

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

系统要求

  • Windows操作系统

  • 已安装的 CAD 软件(AutoCAD、GstarCAD 或 ZWCAD)

配置

配置文件位于src/config.json ,包含以下主要设置:

{
    "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 :服务器名称和版本信息

  • 计算机辅助设计

    • type :CAD 软件类型(AutoCAD、GCAD、GstarCAD 或 ZWCAD)

    • startup_wait_time :CAD启动等待时间(秒)

    • command_delay :命令执行延迟(秒)

  • 输出:输出文件设置

用法

启动服务

python src/server.py

克劳德桌面和风帆冲浪

# 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"
            ]
        }
    }
}

光标

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

光标配置

注:新版cursor也改为JSON配置,请参考上一节

MCP 检查器

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

服务 API

服务端提供的主要API函数如下:

  • draw_line :画一条线

  • draw_circle :画一个圆圈

  • draw_arc :绘制圆弧

  • draw_polyline :绘制折线

  • draw_rectangle :绘制矩形

  • draw_text :添加文本

  • draw_hatch :绘制阴影图案

  • add_dimension :添加线性维度

  • save_drawing :保存绘图

  • process_command :处理自然语言命令

项目结构

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

执照

MIT 许可证

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
2dResponse time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to control CAD software like AutoCAD, GstarCAD, and ZWCAD through natural language instructions via the Model Context Protocol. It supports automated drawing of shapes, layer management, and saving designs to DWG files without manual interface interaction.
    2
  • A
    license
    Not graded
    quality
    C
    maintenance
    Controls CAD applications (AutoCAD, ZWCAD, etc.) via AI assistants through the Model Context Protocol, enabling drawing, layer management, and automation through natural language or direct tool calls.
    85
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Convert Revit files to XKT, IFC, or DWG and query BIM data via natural language.

  • DXF and PDF/X-4 for AI agents: structured facts, PNG renders, an interactive in-chat viewer.

  • Manage projects, tasks, time tracking, and team collaboration through natural language.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/daobataotie/CAD-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server