
客户端中立的MCP服务器用于AutoCAD自动化,检查过2D/3D几何结构,支持原生预览和无头DXF传输。
概览
AutoCAD-MCP 将 Codex、Claude Code、Claude Desktop、Cursor 及任何标准 MCP 客户端连接到完整的 AutoCAD、AutoCAD LT 或无头 DXF 后端。它专为必须证明自己绘制内容而非仅仅报告脚本运行的代理而设计。 - 严格输入,处理回读、请求/实际差别和文档修订。本地工作者事务是原子级的;兼容性 COM/LISP 路径报告补偿限制,而非承诺无法证明的回滚。- 结构化二维绘图、图层、尺寸、拓扑 DRC、原生 AutoCAD 实体和布尔、有界产品特征、动态筛选和固定摄像机审阅视图。- DWG/DXF/PDF/PNG 输出,导出 DXF 重新审计,纸张和比例尺验证,几何摘要、清单和 SHA-256 哈希。 [EOS]- AutoCAD 默认保持任务栏可见但最小化,绘图不会抢走焦点,且不启动预览/PDF 查看器。- 一台 MCP 客户端 STDIO 服务器;无仅 Codex 或仅支持 Claude 协议。
概述(AI 翻译)
可靠的AutoCAD自动化AI代理,包含校验几何、原生3D和交付证据。
英文 |简体中文
AutoCAD-MCP 将 Codex、Claude Code、Claude Desktop、Cursor 及任何标准 MCP 客户端连接到完整的 AutoCAD、AutoCAD LT 或无头 DXF 后端。它专为必须证明自己绘制内容而非仅仅报告脚本运行的代理而设计。
为什么选择AutoCAD-MCP
- **已检查写入:**严格输入、处理回读、请求/实际差别和文档修订。本地工作者事务是原子的;兼容性COM/LISP路径报告的是补偿限制,而非承诺无法证明的回滚。
- **有用的CAD覆盖:**结构化二维绘图、图层、尺寸、拓扑DRC、原生AutoCAD实体和布尔值、有界积特征、运动筛查以及固定摄像机审视视图。
- 交付证据: DWG/DXF/PDF/PNG 输出、导出 DXF 重新审计、纸质和比例尺验证、几何摘要、清单和 SHA-256 哈希值。
- 桌面友好: AutoCAD默认保持任务栏可见但最小化,绘图不会抢夺焦点,预览/PDF查看器不会启动。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
AutoCAD-MCP
Reliable AutoCAD automation for AI agents, with checked geometry, native 3D, and delivery evidence.
AutoCAD-MCP connects Codex, Claude Code, Claude Desktop, Cursor, and any standard MCP client to full AutoCAD, AutoCAD LT, or a headless DXF backend. It is built for agents that must prove what they drew, not merely report that a script ran.
Why AutoCAD-MCP
- Checked writes: strict inputs, handle readback, requested/actual diffs, and document revisions. Native-worker transactions are atomic; compatibility COM/LISP paths report compensation limits instead of promising rollback they cannot prove.
- Useful CAD coverage: structured 2D drawing, layers, dimensions, topology DRC, native AutoCAD solids and booleans, bounded product features, motion screening, and fixed-camera review views.
- Delivery evidence: DWG/DXF/PDF/PNG outputs, exported-DXF re-audit, paper and scale verification, geometry digests, manifests, and SHA-256 hashes.
- Desktop friendly: AutoCAD stays taskbar-visible but minimized by default, drawing does not steal focus, and preview/PDF viewers are not launched.
- Client neutral: one stdio server for MCP clients; no Codex-only or Claude-only protocol.
- Honest limits: unsupported edge selection, shelling, exact continuous motion, and material rendering are reported explicitly instead of being simulated.
Try It Without AutoCAD
The headless demo creates a mechanical DXF, runs semantic DRC, renders a deterministic PNG, and prints the evidence:
git clone https://github.com/beiming183-cloud/AutoCAD-MCP.git
cd AutoCAD-MCP
uv sync
uv run python examples/headless_demo.py
Expected result: ok: true, six entities, and drc_status: PASS. Outputs are written to demo-output/ unless AUTOCAD_MCP_OUTPUT_ROOT is set.
Native AutoCAD Showcase
With a healthy, manually opened AutoCAD session, reproduce the promotional rotary actuator as editable native solids:
uv run python examples/generate_actuator_promo.py --record --pause 1.0
Recording mode activates AutoCAD once, creates a blank document, frames the planned model before the first write, pauses one second after each completed semantic step, and leaves the final document open. It deliberately skips PNG/PDF
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"autocad-mcp": {
"command": "C:\\path\\to\\autocad-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "autocad_mcp"],
"env": {
"AUTOCAD_MCP_BACKEND": "file_ipc",
"AUTOCAD_MCP_LISP_PATH": "C:\\path\\to\\autocad-mcp\\lisp-code\\mcp_dispatch.lsp"
}
}
}
}