best-cad-mcp — Claude Code MCP server: what it does, how to install
A Windows MCP server that links AI agents to live AutoCAD sessions. It inspects DWG elements via entity handles, plans guarded edits, and tests geometry.
claude mcp add --env CAD_MCP_WORKSPACE_ROOT=<CAD_MCP_WORKSPACE_ROOT> --transport stdio best-cad-mcp -- uvx best-cad-mcpWhat best-cad-mcp does
This server connects your coding assistant to a running AutoCAD instance on Windows via stdio. Rather than relying on raster snapshots, the agent tracks precise entity handles across model space. It constructs a structured intermediate graph, evaluates dimensional bindings, and prepares explicit CADPlans.
Safety sits at the core of the architecture. Every modification undergoes dry-run validation before committing to the document. To safeguard COM apartment threading, all AutoCAD calls execute sequentially on a dedicated event-loop worker. Scan states and audit data live locally in an SQLite database.
The server requires AutoCAD running under the exact same Windows user profile. Without Python 3.11 or later and an active CAD license, communication fails immediately.
What it helps with
- Inspect DWG elements by targeting persistent entity handles
- Generate multi-view mechanical drawings from structured specifications
- Run dry-run validations on geometric constraints before saving
- Export verified drawings to DXF and PDF for visual review
Example prompts for the agent
- Inspect the current DWG drawing and list all unconstrained dimensions
- Build a CADPlan to generate a flanged coupling and run a dry-run check
- Verify geometric constraints across the active model and plot to PDF
How to install best-cad-mcp
Platform CLI
claude mcp add --env CAD_MCP_WORKSPACE_ROOT=<CAD_MCP_WORKSPACE_ROOT> --transport stdio best-cad-mcp -- uvx best-cad-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from best-cad-mcp <command>
Platform CLI
codex mcp add best-cad-mcp --env CAD_MCP_WORKSPACE_ROOT=<CAD_MCP_WORKSPACE_ROOT> -- uvx best-cad-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from best-cad-mcp <command>
Config file
{
"mcpServers": {
"best-cad-mcp": {
"command": "uvx",
"args": [
"best-cad-mcp"
],
"env": {
"CAD_MCP_WORKSPACE_ROOT": "<CAD_MCP_WORKSPACE_ROOT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from best-cad-mcp <command>
Config file
{
"servers": {
"best-cad-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"best-cad-mcp"
],
"env": {
"CAD_MCP_WORKSPACE_ROOT": "<CAD_MCP_WORKSPACE_ROOT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from best-cad-mcp <command>
Platform CLI
gemini mcp add -e CAD_MCP_WORKSPACE_ROOT=<CAD_MCP_WORKSPACE_ROOT> best-cad-mcp uvx best-cad-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from best-cad-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about best-cad-mcp
How do I install best-cad-mcp in Claude Code?
Run claude mcp add best-cad-mcp -- uvx best-cad-mcp. To specify your project directory directly, execute claude mcp add --env CAD_MCP_WORKSPACE_ROOT=<CAD_MCP_WORKSPACE_ROOT> --transport stdio best-cad-mcp -- uvx best-cad-mcp.
What does best-cad-mcp do?
It provides programmatic control over AutoCAD entities using native object handles. Agents can query geometry, draft assembly layouts, and validate rules before applying changes.
What are the environment requirements?
It requires Windows, Python 3.11 or newer, and AutoCAD (2020 or newer recommended). The client process and AutoCAD must share the same Windows user session for COM communication to work.