CAD-MAX
A safety-first foundation for connecting an MCP client to AutoCAD, currently providing read-only drawing status and health/version/capabilities tools via a Python MCP server and localhost C# bridge.
README
CAD-MAX
CAD-MAX is a safety-first foundation for connecting an MCP client to AutoCAD through a Python MCP server and a localhost C# bridge.
Current version: 0.1.0. Phase 0 repository bootstrap is complete. Phase 1 is active; its plan/governance batch is accepted, and the plugin-bootstrap batch has not started.
Project governance / 项目治理
当前 Phase、下一允许动作和安全能力状态以
current status 顶部的 cad-max-current-authority 区块为唯一
authority。事实源职责、文档预算、验证证据和 CI 生命周期见
current docs。任何 CI 绿色都不表示真实 AutoCAD 或 DWG 能力已实现。
Current real completion
Implemented now:
- Python 3.12 package cad-max-mcp with stdio and Streamable HTTP transports.
- MCP tools cad_system for health, version, and capabilities.
- MCP tool drawing with the read-only status operation.
- NullCadBackend for machines without AutoCAD.
- AutoCadBridgeBackend with bounded localhost HTTP calls and structured failures.
- Shared versioned JSON contracts and matching Python/C# models.
- .NET 8 bridge dispatcher, localhost development Host, and test suite.
- A compilable net8.0-windows AutoCAD plugin boundary with no Autodesk references.
- Read-only, write-disabled, script-disabled, loopback-only defaults.
Not implemented:
- Real AutoCAD attachment.
- Reading a live drawing.
- Creating, modifying, saving, exporting, or validating DWG content.
- Any script, AutoLISP, arbitrary code, write, or remote-network tool.
CAD-MAX does not currently modify DWG files. When no bridge is configured, drawing status returns BACKEND_NOT_CONFIGURED. The development bridge has no AutoCAD command handlers, so an unknown command returns NOT_IMPLEMENTED rather than fake success.
Architecture
MCP client
|
| stdio or Streamable HTTP at 127.0.0.1:47771/mcp
v
Python cad-max-mcp
|
| localhost HTTP and versioned JSON
v
C# CadMax.Bridge.Host at 127.0.0.1:47770
|
| future AutoCAD Managed .NET API adapter
v
AutoCAD 2025 or 2026 plugin
|
v
2D DWG document context
Python owns the MCP protocol and client-facing validation. C# will own all future AutoCAD execution because Autodesk's supported managed API, application context, and document context belong inside the AutoCAD process. See Architecture and ADR 0001.
Supported baseline
- Windows 10 or 11 for the future AutoCAD bridge.
- Python 3.12.
- uv.
- .NET 8 SDK.
- AutoCAD 2025 or 2026 for future plugin integration.
- 2D DWG scope only.
AutoCAD 2024, AutoCAD LT, ZWCAD, GstarCAD, Tianzheng, SolidWorks, FreeCAD, 3D modeling, and cloud batch processing are explicitly outside this phase.
Local setup
Install Python 3.12, uv, and the .NET 8 SDK. Then run:
uv sync --frozen
uv run cad-max-mcp doctor
The doctor command emits structured JSON and returns exit code 0 when the safe base configuration is valid.
Start the MCP server
Stdio:
uv run cad-max-mcp serve --transport stdio
Streamable HTTP:
uv run cad-max-mcp serve --transport streamable-http
The HTTP endpoint is http://127.0.0.1:47771/mcp. Configuration rejects 0.0.0.0 and other non-loopback hosts.
PowerShell wrappers are also available:
.\scripts\run-mcp-stdio.ps1
.\scripts\run-mcp-http.ps1
Start the development bridge
The bridge does not require AutoCAD and exposes only health, capabilities, and a fail-closed command dispatcher:
dotnet run --project src/dotnet/CadMax.Bridge.Host
Endpoints:
- GET http://127.0.0.1:47770/health
- GET http://127.0.0.1:47770/v1/capabilities
- POST http://127.0.0.1:47770/v1/commands
No CAD command handler is registered in Phase 0.
Test and verify
Python:
uv sync --frozen
uv run ruff check .
uv run ruff format --check .
uv run mypy src/python
uv run pytest
.NET:
dotnet restore src/dotnet/CadMax.sln --locked-mode --configfile NuGet.Config
dotnet build src/dotnet/CadMax.sln --configuration Release --no-restore
dotnet test src/dotnet/CadMax.sln --configuration Release --no-build
Unified PowerShell verification:
.\scripts\verify.ps1
The script stops with a non-zero exit code on the first failed check.
MCP client configuration example
Replace the path with your local checkout:
{
"mcpServers": {
"cad-max": {
"command": "uv",
"args": [
"--directory",
"C:\\path\\to\\CAD-MAX",
"run",
"cad-max-mcp",
"serve",
"--transport",
"stdio"
]
}
}
}
More examples are in MCP client setup.
Configuration and safe defaults
Environment variables use the CAD_MAX_ prefix. The committed .env.example contains names and safe example values only. A real .env file is ignored and is not loaded implicitly by the application.
- readOnly is true.
- allowWrite is false.
- allowScript is false.
- httpHost is 127.0.0.1.
- allowedRoots is empty.
- bridgeUrl is unset.
Future file operations must normalize an absolute path and prove it is inside an allowed root. An empty allowlist grants no file access.
Why Autodesk DLLs are not in this repository
AcDbMgd.dll, AcMgd.dll, AcCoreMgd.dll, Autodesk SDK files, and AutoCAD redistributables are proprietary and installation-specific. They must be referenced from a licensed local AutoCAD installation through uncommitted machine-local MSBuild configuration. CI does not install AutoCAD and does not need these DLLs. See AutoCAD SDK setup.
Security warning
CAD automation can alter valuable drawings. Keep the HTTP services on loopback, keep writes and scripts disabled, never expose the development Host through a tunnel, and work on backed-up test drawings when a future write phase is enabled. See Security model.
Roadmap
The ordered delivery plan is in ROADMAP.md. Phase 1 will establish a real AutoCAD 2025/2026 connection and lifecycle boundary without enabling arbitrary DWG editing. The executable read-only scope and numbered work batches are in the Phase 1 AutoCAD Connection plan; that plan does not replace current authority.
License
MIT. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。