Skip to content
Back to search

Easy-MCP-AutoCad

这个项目是一个基于Model Context Protocol (MCP)的AutoCAD集成服务器,它允许通过自然语言与AutoCAD进行交互。通过这个服务器,用户可以使用Claude等大型语言模型来创建、修改和分析AutoCAD图纸,同时还可以存储和查询CAD元素的相关数据。目前制作参考学习,仅实现端到端之间的通信,具体工具函数尚未晚上

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/zh19980811--easy-mcp-autocad/badge.svg)](/listings/zh19980811--easy-mcp-autocad)

HTML

<a href="/listings/zh19980811--easy-mcp-autocad"><img src="/api/listings/zh19980811--easy-mcp-autocad/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. 克隆仓库 / Clone the repository

git clone https://github.com/yourusername/autocad-mcp-server.git
cd autocad-mcp-server

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 155 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/zh19980811-easy-mcp-autocad-badge.png)](https://mseep.ai/app/zh19980811-easy-mcp-autocad)
  2. # AutoCAD MCP 服务器 / AutoCAD MCP Server
  3. > ⚠️ 本项目目前维护精力有限,欢迎有兴趣的开发者参与协作!
  4. > ⚠️ Currently this project is **not actively maintained** due to time constraints. I would be **very happy to collaborate** with anyone interested in co-maintaining or extending it.
  5. 基于 **Model Context Protocol (MCP)** 的 AutoCAD 集成服务器,允许通过 **Claude** 等大型语言模型 (LLM) 与 AutoCAD 进行自然语言交互。
  6. An AutoCAD integration server based on **Model Context Protocol (MCP)**, enabling natural language interaction with AutoCAD via large language models like **Claude**.
  7. > 🔗 项目在 MseeP.ai 展示 / Referenced on MseeP.ai:
  8. > <https://mseep.ai/app/zh19980811-easy-mcp-autocad>
  9. 🎬 **演示视频 / Demo Video**:
  10. [![AutoCAD MCP 演示视频](https://img.youtube.com/vi/-I6CTc3Xaek/0.jpg)](https://www.youtube.com/watch?v=-I6CTc3Xaek)
  11. ---
  12. ## ✨ 功能特点 / Features
  13. - 🗣️ 自然语言控制 AutoCAD 图纸 / Natural language control of AutoCAD drawings
  14. - ✏️ 基础绘图功能(线条、圆)/ Basic drawing tools (line, circle)
  15. - 📚 图层管理 / Layer management
  16. - 🧠 自动生成 PMC 控制图 / Auto-generate PMC control diagrams
  17. - 🔍 图纸元素分析 / Drawing element analysis
  18. - 🔦 文本高亮匹配 / Highlight specific text patterns
  19. - 💾 内嵌 SQLite 数据库存储 CAD 元素 / Integrated SQLite storage for CAD elements
  20. ---
  21. ## 🖥️ 系统要求 / System Requirements
  22. - Python 3.10+
  23. - AutoCAD 2018+ (需支持 COM 接口 / with COM interface support)
  24. - Windows 操作系统 / Windows OS
  25. ---
  26. ## ⚙️ 安装步骤 / Installation
  27. ### 1. 克隆仓库 / Clone the repository
  28. ```bash
  29. git clone https://github.com/yourusername/autocad-mcp-server.git
  30. cd autocad-mcp-server
  31. ```
  32. ## 2. 创建虚拟环境 / Create virtual environment
  33. **Windows:**
  34. ```bash
  35. python -m venv .venv
  36. .venv\Scripts\activate
  37. ```
  38. **macOS / Linux:**
  39. ```bash
  40. python -m venv .venv
  41. source .venv/bin/activate
  42. ```
  43. ---
  44. ## 3. 安装依赖 / Install dependencies
  45. ```bash
  46. pip install -r requirements.txt
  47. ```
  48. ---
  49. ## 4. (可选)构建可执行文件 / (Optional) Build as executable
  50. ```bash
  51. pyinstaller --onefile server.py
  52. ```
  53. ---
  54. ## 🚀 使用方法 / How to Use
  55. ### 独立运行服务器 / Run server independently
  56. ```bash
  57. python server.py
  58. ```
  59. ---
  60. ### 集成 Claude Desktop / Integrate with Claude Desktop
  61. 编辑配置文件 / Edit config file:
  62. **Windows 路径 / Config path on Windows:**
  63. `%APPDATA%\Claude\claude_desktop_config.json`
  64. **推荐配置 (源码运行) / Recommended Config (Run from source):**
  65. > 💡 请将 `path/to/project` 替换为您实际的项目绝对路径。
  66. > 💡 Please replace `path/to/project` with your actual absolute project path.
  67. ```json
  68. {
  69. "mcpServers": {
  70. "easy-autocad": {
  71. "command": "C:/path/to/project/.venv/Scripts/python.exe",
  72. "args": [
  73. "C:/path/to/project/server.py"
  74. ]
  75. }
  76. }
  77. }
  78. ```
  79. > **注意 / Note**:
  80. >
  81. > 1. 请使用正斜杠 `/` 或双反斜杠 `\\` 作为路径分隔符。
  82. > 2. `python.exe` 必须指向 `.venv` 虚拟环境中的解释器。
  83. ---
  84. ## 🧰 工具 API / Available API Tools
  85. | 功能 / Function | 描述 / Description |
  86. |:------------------------|:-------------------------------------------|
  87. | `create_new_drawing` | 创建新的图纸 / Create a new drawing |
  88. | `draw_line` | 画直线 / Draw a line |
  89. | `draw_polyline` | 画多段线 / Draw a polyline |
  90. | `draw_rectangle` | 画矩形 / Draw a rectangle |
  91. | `draw_circle` | 画圆 / Draw a circle |
  92. | `draw_text` | 添加文字 / Add text annotation |
  93. | `create_layer` | 创建或修改图层 / Create or modify layer |
  94. | `move_entity` | 移动实体 / Move entity |
  95. | `rotate_entity` | 旋转实体 / Rotate entity |
  96. | `copy_entity` | 复制实体 / Copy entity |
  97. | `highlight_entity` | 高亮显示实体 / Highlight entity |
  98. | `highlight_text_matches`| 高亮显示匹配文本 / Highlight matching text |
  99. | `scan_all_entities` | 扫描并入库 / Scan and save entities |
  100. | `count_text_patterns` | 统计文本模式 / Count text patterns |
  101. | `execute_query` | 执行SQL查询 / Execute SQL query |
  102. ---
  103. ## 🙋‍♂️ 维护状态 / Maintenance Notice
  104. ⚠️ 当前我正忙于其他项目,维护精力有限。欢迎 Fork 项目或提交 PR,一起完善 AutoCAD 智能交互生态!
  105. ⚠️ I'm currently busy and not able to actively maintain this repo. PRs and collaborators are welcome!
  106. 📬 联系我 / Contact: <1062723732@qq.com>
  107. ---
  108. Made with ❤️ for open-source learning.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.