AutoCAD MCP 服务

AutoCAD MCP 是一个用于在 Windows 上自动化完整 AutoCAD 的模型上下文协议桥接服务,提供服务器状态查询、实体列举、约束代码生成和曲面展开等功能。

  • by ahmetcemkaraca
  • Python
  • 本地部署
  • 31 星标
  • 更新于
在 GitHub 查看 ahmetcemkaraca/AutoCAD_MCP

使用说明

AutoCAD MCP

⚠️ This repository is archived. Development continues in the organization repository: ACKaraca/AutoCAD_MCP. Please open issues and pull requests there.

An experimental Model Context Protocol bridge for automating full AutoCAD on Windows.

This repository is now independently maintained after the original upstream project became unavailable.

Project direction

The canonical stdio server is autocad_mcp.server. Its active catalog is the five non-mutating tools server_status, list_entities, get_entity_info, generate_constrained_code, and unfold_surface; src.server is a protocol-safe compatibility shim, not a second implementation. The pure MCP contract has Linux automated evidence with unavailable or injected services. It is not evidence of a Windows COM or AutoCAD connection. See the roadmap for acceptance criteria and delivery order.

generate_constrained_code returns reviewed Python, AutoLISP or VBA source from bounded literal recipes. It never executes or saves that text and needs no AutoCAD connection. The complete SDK CallToolResult body is limited to 65,536 UTF-8 bytes, including nested JSON text escaping. See the code-generation decision and usage.

unfold_surface accepts a complete caller-supplied triangular mesh and explicit seams/units. It returns independently verified 2D geometry without reading or editing AutoCAD. Numerical work runs in a cooperative worker thread; the actual SDK result body is bounded to 4 MiB. See the surface-unfolding decision.

Current limitations

The delayed Windows AutoCAD adapter and guarded AutoCAD 2026 smoke harness are implemented, but no real Windows/AutoCAD run has been recorded. Full AutoCAD 2021-2026 is targeted, not verified. src/mcp_integration/enhanced_mcp_server.py is experimental and unconnected; it is not launched or advertised by the canonical server. Read the Windows smoke guide and project status before relying on the server with production drawings.

Requirements

  • Windows
  • Full AutoCAD 2021-2026; compatibility is targeted and tracked per release
  • Python 3.12 or newer

The first guarded real-device smoke requires 64-bit CPython 3.12 exactly; the package metadata remains >=3.12 for ordinary development.

AutoCAD LT and AutoCAD hosted on Linux or macOS are outside the supported scope. See the compatibility policy.

Development setup

The manifest's canonical command is uv run python -m autocad_mcp.server. The core MCP tests exercise that entry point and the src.server compatibility shim on Linux without COM modules. They do not establish a supported Windows installation or successful startup with a real AutoCAD session. See testing, project status, and the epic portfolio.

Documentation

Start with the documentation index. Historical documents from the adopted repository are preserved in the legacy archive and are not current product documentation.

Contributing

Read AGENTS.md before making changes. Use an English-language feature branch, commit history, and pull request; routine development does not go directly to main.

License

AutoCAD MCP is available under the MIT License.