Server data from the Official MCP Registry
Windows AutoCAD MCP server for handle-first CAD automation, validation, and drawing exports.
Windows AutoCAD MCP server for handle-first CAD automation, validation, and drawing exports.
Valid MCP server (2 strong, 1 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.
4 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: CAD_MCP_WORKSPACE_ROOT
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-lokmenower-best-cad-mcp": {
"env": {
"CAD_MCP_WORKSPACE_ROOT": "your-cad-mcp-workspace-root-here"
},
"args": [
"best-cad-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
best-cad-mcp is a Windows AutoCAD MCP server for agents that need to work with
real DWG projects. It exposes AutoCAD drawing, editing, inspection, metadata,
validation, export, visual grounding, and planning tools through the Model
Context Protocol, with a handle-first workflow designed for safe CAD automation.
Most CAD automation examples stop at drawing primitives. best-cad-mcp is built
for production-style agent workflows:
The server runs locally, talks to AutoCAD through Windows COM, and stores agent metadata in the workspace instead of writing hidden helper geometry into the DWG.
save_as handle capture, dependencies, postconditions, transactional
execution, and rollback attempts.AutoCAD must be installed, licensed, and able to start on the same Windows machine where the MCP server runs.
Clone the repository and install dependencies:
git clone https://github.com/LokmenoWer/best-cad-mcp.git
cd best-cad-mcp
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
python -m pip install -e .
Run the server from source:
python -m src.server
Or run the installed console command:
cad-mcp
The server is an MCP stdio process. In normal use, your MCP client starts it automatically from its configuration.
Start the MCP client from the workspace whose metadata should be used. Runtime
data is stored under that workspace unless CAD_MCP_WORKSPACE_ROOT is set.
This repository includes .codex/config.toml for project-scoped Codex usage.
After trusting the project, Codex can start the server from the checkout.
For a user-level Codex configuration after pip install -e ., add:
[mcp_servers.best-cad-mcp]
enabled = true
command = "cad-mcp"
cwd = "C:/path/to/best-cad-mcp"
startup_timeout_sec = 30
tool_timeout_sec = 120
default_tools_approval_mode = "approve"
From a virtual environment checkout:
[mcp_servers.best-cad-mcp]
enabled = true
command = "C:/path/to/best-cad-mcp/.venv/Scripts/python.exe"
args = ["-m", "src.server"]
cwd = "C:/path/to/best-cad-mcp"
startup_timeout_sec = 30
tool_timeout_sec = 120
default_tools_approval_mode = "approve"
Keep raw or destructive tools on manual approval:
[mcp_servers.best-cad-mcp.tools.send_command]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.execute_cad_plan]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.delete_entity]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.delete_entities]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.erase_selection_entities]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.delete_layer]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.purge_drawing]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.audit_drawing]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.save_drawing]
approval_mode = "prompt"
[mcp_servers.best-cad-mcp.tools.close_drawing]
approval_mode = "prompt"
This repository includes:
.mcp.json, which registers the local stdio server as best-cad-mcp..claude/settings.json, which enables the server and asks before raw or
destructive tools.The checked-in .mcp.json uses CLAUDE_PROJECT_DIR:
{
"mcpServers": {
"best-cad-mcp": {
"command": "python",
"args": ["${CLAUDE_PROJECT_DIR:-.}/src/server.py"],
"env": {
"CAD_MCP_WORKSPACE_ROOT": "${CLAUDE_PROJECT_DIR:-.}",
"PYTHONPATH": "${CLAUDE_PROJECT_DIR:-.}"
}
}
}
}
If dependencies are installed only in the project virtual environment, change
command to:
"C:/path/to/best-cad-mcp/.venv/Scripts/python.exe"
Use claude mcp list or /mcp inside Claude Code to confirm the server is
connected.
open_drawing when the user supplies a DWG path.scan_all_entities(clear_db=True, detail_level="minimal", topology_detail="summary").build_drawing_ir.summarize_drawing.detect_semantic_objects(domain="mechanical") or another suitable domain.bind_all_dimensions, extract_drawing_constraints, and
check_drawing_constraints.validate_geometry.export_view_image_with_mapping(include_overlay=True) when visual evidence
matters.ground_vlm_region or ground_vlm_overlay_id for VLM findings.explain_entity(handle) before editing.create_new_drawing.save_as
variables, and postconditions.validate_cad_plan, then dry_run_cad_plan.execute_cad_plan(..., allow_modify=True) only after modification is
authorized.scan_all_entities, build_drawing_ir, validate_geometry, and export a
review image.Runtime metadata is stored by default at:
<workspace>/.cad_mcp/workspace.db
The database scopes data by workspace, drawing, conversation, and thread. This keeps identical handles in different drawings from colliding and lets parallel agent sessions keep private annotations and query history separate.
Useful workspace tools:
get_workspace_contextset_workspace_contextactivate_workspace_drawinglist_workspace_drawingsUnderstanding tools return structured ToolResult dictionaries:
{
"ok": true,
"message": "",
"data": {},
"handles": [],
"warnings": [],
"next_tools": []
}
Read-only understanding tools do not modify the DWG. Semantic objects, constraints, validation reports, view snapshots, and VLM mappings are stored in the workspace database.
Key tools include:
build_drawing_ir and export_drawing_irsummarize_drawingfind_entities_by_descriptionexplain_entitydetect_semantic_objects, get_semantic_graph, and find_semantic_objectsbind_dimension_to_geometry and bind_all_dimensionsextract_drawing_constraints, check_drawing_constraints, and
get_drawing_constraintsvalidate_geometry and get_validation_reportpropose_repair_plan and propose_constraint_repair_planlist_cad_resources and get_cad_resourceCADPlan is the guarded path for multi-step drawing or repair. It is best for changes that touch multiple entities, need reviewable intent, or should be dry-run before execution.
{
"plan_id": "mounting-plate",
"description": "Draw a plate with four mounting holes",
"units": "mm",
"risk_level": "low",
"requires_confirmation": true,
"variables": {"origin": [0, 0, 0]},
"steps": [
{
"step_id": "plate",
"op": "draw_rectangle",
"args": {"corner1": "$origin", "corner2": [120, 80, 0], "layer": "M-PART"},
"writes": true,
"save_as": "$plate",
"postconditions": [{"type": "exists", "target": "$plate"}]
}
],
"constraints": [
{"type": "distance", "expected": 120.0}
]
}
Executable CADPlan operations include common drawing, editing, layer, dimension, hatch, and block operations. Valid CAD actions that are not yet bound inside CADPlan can still be called through their direct MCP tools.
send_command, SQL mutation, purge, and audit are disallowed by default in
CADPlan validation.
export_view_image_with_mapping(include_overlay=True) creates:
Use ground_vlm_region(snapshot_id, bbox) for VLM pixel boxes and
ground_vlm_overlay_id(snapshot_id, overlay_id) for overlay IDs. Call
explain_entity on top candidates before editing.
Top/plan modelspace views are the most reliable. Twisted, UCS, 3D, and complex layout viewport cases return warnings or lower confidence when exact grounding is not available.
The prompts/ directory contains MCP prompt source files for:
The .agents/skills/draw-assembly-diagrams skill provides agent-facing
assembly drawing workflows. Assembly rules are modular:
references/assembly/index.md selects the applicable standard module.references/assembly/standards/generic-mechanical.md is the default
mechanical assembly module.send_command behind manual approval.The server may create these files in the active workspace:
.cad_mcp/workspace.db.cad_mcp/workspace.db-wal.cad_mcp/workspace.db-shmcad_mcp.logcad_visual_exports/They are runtime artifacts and should not be committed.
src/
server.py MCP tool, prompt, and resource definitions
cad_controller.py AutoCAD COM bridge
cad_database.py SQLite persistence
cad_tools/ Tool implementations grouped by CAD domain
cad_understanding/ CAD-IR, semantics, constraints, validation, grounding
prompts/ Prompt sources loaded by MCP prompt functions
scripts/ Verification and smoke-test scripts
tests/ Unit tests that mock COM-dependent behavior
.agents/skills/ Agent skill guidance and assembly standards
.codex/ Project-scoped Codex MCP config
.claude/ and .mcp.json Claude Code MCP config
Install development dependencies:
python -m pip install -e .[dev]
Run unit tests:
python -m pytest
Run the AutoCAD MCP tool smoke verifier:
python scripts\verify_autocad_mcp_tools.py
Run the CAD understanding workflow smoke benchmark:
python scripts\verify_cad_understanding_workflow.py
Unit tests mock COM-dependent behavior and do not require AutoCAD. Smoke verification requires a local AutoCAD COM session.
src: set the server cwd to the repository
root or set PYTHONPATH to the repository root.CAD_MCP_WORKSPACE_ROOT.explain_entity.Contributions are welcome. Good changes usually include:
src/cad_tools/ or
src/cad_understanding/,src/server.py when a new capability should be exposed,Please avoid committing runtime artifacts such as .cad_mcp/, logs, exported
review images, local databases, virtual environments, or AutoCAD smoke-test
outputs.
The model-private annotation and pointer-style workflow is conceptually informed by the public Pointer-CAD project and paper: https://github.com/Snitro/Pointer-CAD
No Pointer-CAD source code is copied into this repository.
MIT. See LICENSE.
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.