Are you the author? Sign in to claim
CAD MCP tool
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.
当前 Phase、下一允许动作和安全能力状态以
current status 顶部的 cad-max-current-authority 区块为唯一
authority。事实源职责、文档预算、验证证据和 CI 生命周期见
current docs。任何 CI 绿色都不表示真实 AutoCAD 或 DWG 能力已实现。
Implemented now:
Not implemented:
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.
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.
AutoCAD 2024, AutoCAD LT, ZWCAD, GstarCAD, Tianzheng, SolidWorks, FreeCAD, 3D modeling, and cloud batch processing are explicitly outside this phase.
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.
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
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:
No CAD command handler is registered in Phase 0.
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.
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.
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.
Future file operations must normalize an absolute path and prove it is inside an allowed root. An empty allowlist grants no file access.
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.
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.
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.
MIT. See LICENSE.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows