AutoCAD MCP Pro
Provides comprehensive tools for automating AutoCAD, including drawing management, entity creation and modification, layer management, block operations, dimensioning, analysis, view control, transactions, and headless DXF file operations via COM or ezdxf backends.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AutoCAD MCP ProCreate a new drawing with a circle at origin radius 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AutoCAD MCP Pro
Production-grade AutoCAD automation for AI agents—live through COM on Windows, or headless through ezdxf on any platform.
One typed MCP contract controls two execution engines. Build and edit drawings, query exact geometry, apply engineering standards, refine quality issues inside transactions, and deliver hashed artifacts with validation evidence.
v1.3 release snapshot: 122 tools · 6 resources · 5 prompt templates · 415 collected tests. Runtime discovery through
system_aboutis authoritative.
Start in 60 seconds
git clone https://github.com/U-C4N/Autocad-MCP.git
cd Autocad-MCP
python -m venv .venvActivate the environment and start the stdio server:
# Windows
.venv\Scripts\Activate.ps1
pip install -e .
python server.py# macOS / Linux
source .venv/bin/activate
pip install -e .
python server.pyThat starts the headless-capable server with automatic backend selection. For live AutoCAD control on Windows:
pip install -e ".[com]"
$env:AUTOCAD_MCP_BACKEND = "com"
python server.pyNo AutoCAD installation is needed for the ezdxf backend:
$env:AUTOCAD_MCP_BACKEND = "ezdxf"
python server.pyRelated MCP server: multiCAD-mcp
Evidence, not adjectives
The graphic is generated with Matplotlib from
benchmarks/source_review.json. A fixed,
public 100-point rubric covers functional CAD breadth, correctness and delivery,
backend reach, engineering production, tests, and security.
Project | Score | Evidence |
93 | A | |
84 | A | |
83 | A | |
73 | A | |
70 | A | |
68 | B |
This is a dated source review—not a claim that every project completed a shared live AutoCAD run. Evidence grade A means source plus executable local evidence was reviewed; B means source and tool surface were reviewed but the live AutoCAD path was not fully executed.
Reproduce the chart and run the ten-task reference adapter:
pip install -e ".[pdf]"
python -m benchmarks.render_chart
python -m benchmarks.run_competitors --server autocad-mcp-pro --backend ezdxf --jsonThe v1.3 ezdxf reference run records 10/10 tasks (100.0). It is a self-check, not a competitor ranking.
Cross-project runtime scores will be published only after equivalent adapters
execute the same task contract. The complete rubric, caveats, version A/B suite,
and reproduction commands live in benchmarks/.
Why this architecture holds up
One contract, two engines
The COM backend controls a live AutoCAD session on Windows through a single-threaded STA executor. The ezdxf backend creates, edits, renders, and validates DXF drawings without AutoCAD. Both return the same typed entities, layers, blocks, drawing metadata, and capability format.
Geometry agents do not have to guess
Tools such as point_from_snap, point_intersection, and point_tangent
resolve exact construction coordinates from drawing entities. Handle-preserving
edit tools and smart selection keep agents attached to real geometry instead of
reconstructing state from prose.
Quality is a loop
drawing_preflight checks whether an engineering request is ready to draw.
drawing_critique reports standards and geometry issues. drawing_refine
repairs the supported subset inside isolated transactions and rolls back rounds
that reduce quality. drawing_finalize combines structural validation,
standards critique, a scalar score, and invalidity ratio.
Delivery carries evidence
drawing_deliver creates the requested artifacts, computes SHA-256 hashes,
reopens the canonical DXF, compares entity/layer/type counts and bounds, and
writes manifest.json plus validation.json. A successful tool call is not
treated as proof that the drawing survived export.
Backend capabilities
Capability | COM backend | ezdxf backend |
Live AutoCAD document control | ✓ | — |
Headless DXF creation and editing | — | ✓ |
Cross-platform execution | — | ✓ |
Deterministic entity/query contract | ✓ | ✓ |
Transactions and rollback | ✓ | ✓ |
TABLE and MLEADER semantics | Native | Portable composite |
Screenshots | AutoCAD window | Matplotlib render |
Raw AutoCAD commands / AutoLISP | Opt-in | — |
Use system_capabilities at runtime instead of assuming backend support. The
machine-readable response distinguishes native, composite, emulated, and
unsupported behavior where the engines differ.
A production drawing workflow
The server exposes low-level CAD primitives, but the intended engineering path uses deterministic orchestration and validation:
drawing_preflight → drawing_plan → drawing_apply_iso_layers
→ deterministic create/edit tools → dimension_auto
→ drawing_critique → drawing_refine
→ drawing_finalize → drawing_deliverRepresentative capability groups include:
Area | Examples |
Drawing lifecycle | create, open, save, export, audit, purge, undo/redo |
Geometry | lines, arcs, polylines, hatches, splines, trim/extend/fillet/chamfer |
Annotation | dimensions, ISO 129 tolerances, TABLE, MLEADER, text editing |
Engineering | gears, keyed bores, title blocks, ISO 1101 GD&T and datums |
Query | entity/layer/block inspection, selection, bounds, distance and area |
Quality | preflight, critique, score, transactional refinement and finalization |
Delivery | PDF/PNG/DXF output, hashes, manifests and reopen-parity checks |
The tool surface evolves. Ask system_about for the live grouped inventory
instead of building integrations around a copied list from this README.
Installation profiles
Profile | Command | Use case |
Core |
| Headless ezdxf workflows |
COM |
| Live AutoCAD on Windows |
| PDF export and headless screenshots | |
Full |
| Both backends and all render features |
Requirements:
Python 3.11+
FastMCP 3.0+
ezdxf 1.3+
AutoCAD,
pywin32, and Pillow only for live COM controlMatplotlib only for PDF/headless rendering and benchmark visualization
Connect an MCP client
Claude Desktop
Add a server entry to claude_desktop_config.json and use the absolute path to
your checkout:
{
"mcpServers": {
"autocad": {
"command": "python",
"args": ["C:\\path\\to\\Autocad-MCP\\server.py"],
"env": {
"AUTOCAD_MCP_BACKEND": "auto",
"ALLOWED_PATHS": "C:\\Users\\you\\Documents\\AutoCAD"
}
}
}
}Cursor, Cline, Continue, Goose, and other stdio-capable MCP hosts use the same
command plus args shape. The model vendor is not part of the server
contract.
Local HTTP
fastmcp run server.py:mcp --transport http --port 8000Loopback is the default. A non-loopback bind is refused unless remote HTTP is explicitly enabled and bearer-token authentication is configured.
Configuration
Set variables in your shell, process manager, or MCP client configuration.
.env.example is a reference; the server reads process
environment variables directly.
Variable | Default | Purpose |
|
| Select |
|
| Python logging level |
| empty | Comma-separated absolute paths the server may access |
|
| Maximum retained undo snapshots |
|
| Reject larger DXF input; |
|
| Bound list and selection response sizes |
|
| Per-call live AutoCAD timeout in seconds |
|
| Allow blocked commands/LISP and report unsafe mode |
|
| Permit a non-loopback HTTP bind |
| empty | Bearer token required for remote HTTP |
Backend selection:
Value | Behavior |
| Try COM on Windows, then fall back to ezdxf |
| Require a reachable live AutoCAD instance |
| Force portable, headless DXF operation |
Architecture
flowchart LR
A[MCP host / AI agent] --> B[FastMCP server]
B --> C[Error · audit · timing · logging middleware]
C --> D[Typed tool contract]
D --> E[COM backend]
D --> F[ezdxf backend]
E --> G[Live AutoCAD]
F --> H[Headless DXF]
E --> I[Engineering quality + delivery]
F --> Iserver.pyowns the FastMCP surface, lifespan, middleware, resources, and prompt templates.backends/base.pydefines the shared contract and capability model.backends/com_backend.pyserializes COM calls through one STA thread with per-call timeouts.backends/ezdxf_backend.pywraps synchronous DXF work withasyncio.to_threadand snapshot-based transactions.engineering/contains standards-aware planning, drawing, critique, scoring, refinement, validation, and delivery.security.pycentralizes path validation and command/LISP sanitization.
Security model
The server treats tool input as untrusted:
Every file path passes through traversal and allowed-root validation.
Dangerous AutoCAD commands and AutoLISP channels are blocked by default.
Remote HTTP requires explicit opt-in and a bearer token.
DXF size, query-result size, undo history, and COM call duration are bounded.
Audit middleware records tool timing and failures.
system_statusandsystem_aboutexposeunsafe_modewhen dangerous operations are enabled.
DANGEROUS_COMMANDS_ENABLED=true is a trust decision, not an installation
shortcut. Keep it disabled for agents or clients you do not fully control.
Please avoid filing public issues for vulnerabilities. Contact the maintainer through GitHub first.
Development
pip install -e ".[full]"
pip install pytest pytest-asyncio pytest-cov ruff build
python -m pytest
python -m ruff check .
python -m ruff format --check .
python -m buildFocused benchmark checks:
python -m pytest tests/test_benchmark_chart.py tests/test_benchmark_v2.py -q
python -m benchmarks.render_chartRepository map:
server.py FastMCP surface and orchestration
config.py Environment-driven settings
security.py Path, command, and AutoLISP guards
version.py Canonical package version
backends/ COM and ezdxf implementations
engineering/ Standards, critique, refinement, delivery
benchmarks/ Reproducible data, runners, and reports
tests/ Headless, mocked-COM, contract, and security testsRoadmap
The next priorities are capability-aware tool discovery, paper-space/layout depth, ISO 286 fits, Windows CI coverage, opt-in COM 3D solids, and real cross-project runtime adapters. Features are published when their contracts and limitations are testable—not when they make a longer checklist.
Contributing
Pull requests are welcome, especially for reproducible competitor adapters, mocked/live COM coverage, engineering standards, and backend parity. For a large change, open an issue first so the tool contract and evidence plan can be agreed before implementation.
Author
Umutcan Edizsalan · Mechanical engineering work at Anka-Makine · GitHub @U-C4N
Built from production drawing work, then made model-agnostic through MCP.
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/U-C4N/Autocad-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server