CAD MCP Server
Click on "Deploy 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., "@CAD MCP Server Summarize the CAD file drawing.dxf"
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.
CAD MCP Server
An MCP server that lets Claude (and any other
MCP client) read, analyze, and edit CAD files — both DXF and DWG —
powered by ezdxf.
It runs as a small local Python process over stdio. Your CAD files never leave your machine.
DXF — read and edit directly, no extra setup.
DWG — Autodesk's proprietary binary format.
ezdxfcannot parse it alone, so DWG is converted to DXF automatically via the free ODA File Converter (one-time install). Once installed, DWG works everywhere DXF does.
Quick start (easiest — no clone, no pip)
If you have uv installed, you don't clone
anything or manage dependencies — uvx fetches and runs the server for you.
Install uv once:
# Windows (PowerShell):
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | shThen add the server in one line:
# Claude Code:
claude mcp add cad -- uvx --from git+https://github.com/Codemod3/cad-mcp cad-mcpFor Claude Desktop, drop this into your config (see paths below) — no clone, no paths to edit:
{
"mcpServers": {
"cad": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Codemod3/cad-mcp", "cad-mcp"]
}
}
}That's it. First run downloads deps automatically; later runs are instant. Restart the client and the tools appear. (DWG still needs the free ODA File Converter; DXF works immediately.)
Prefer to clone and manage Python yourself? See Manual install.
Related MCP server: CAKE MCP
What it can do
Read / analyze (never modifies files)
Tool | What it does |
| Overview — version, units, layers, entity counts, extents |
| All layers with color, linetype, on/frozen/locked state |
| All entities on a specific layer |
| Filter by type (LINE, CIRCLE, TEXT, …), optional layer filter |
| Extract all TEXT and MTEXT annotations |
| Extract all DIMENSION annotations |
| List named block definitions |
| Inspect entities inside a block |
Edit (writes to a copy — your original is never touched)
Tool | What it does |
| Copy the original DXF/DWG to |
| Draw a line |
| Draw a circle |
| Draw an arc |
| Add a text label |
| Draw connected segments (LWPOLYLINE), optionally closed |
| Create a layer |
| Delete one entity by its handle |
| Convert the edited |
Editing model — safe by design:
Call
cad_create_editable_copyon your original → it returns the copy's path.Pass that copy path to every edit tool. Edits save in place and stack, so keep drawing on the same file.
Your original is never modified.
DWG can't be written directly, so edits always happen on the
.dxfcopy; runcad_export_dwgat the end if you need a.dwgback.
Requirements
Python 3.10+ (only for the manual install;
uvxhandles this for you)The Python packages in
requirements.txt(installed below)DWG only: the free ODA File Converter
Check your Python:
python --version # must be 3.10 or newer (try python3 on macOS/Linux)Manual install
Use this if you'd rather clone the repo and manage Python yourself.
1. Get the code
git clone https://github.com/Codemod3/cad-mcp.git
cd cad-mcp2. Install dependencies
Recommended — use a virtual environment so nothing pollutes your system Python:
python -m venv .venv
# Windows (PowerShell):
.venv\Scripts\Activate.ps1
# macOS / Linux:
source .venv/bin/activate
pip install -r requirements.txtOr install as a proper command (cad-mcp) via pip:
pip install .3. Verify it runs
python server.pyIt should print a startup line to stderr and then wait silently (it's listening
for an MCP client over stdio). Press Ctrl+C to stop. If you see no import
errors, you're ready to connect a client.
Connect to a client
Point your MCP client at server.py. Use the full absolute path to the file,
and the same Python that has the dependencies installed.
Claude Desktop
Edit the config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"cad": {
"command": "python",
"args": ["C:\\full\\path\\to\\cad-mcp\\server.py"]
}
}
}On macOS/Linux use
"python3"and a/full/path/to/cad-mcp/server.py. If you used a virtualenv, pointcommandat that venv's python, e.g.C:\\path\\to\\cad-mcp\\.venv\\Scripts\\python.exe.
Restart Claude Desktop. The CAD tools appear automatically.
Claude Code (CLI)
Easiest — no clone (needs uv):
claude mcp add cad -- uvx --from git+https://github.com/Codemod3/cad-mcp cad-mcpIf you cloned the repo instead:
claude mcp add cad -- python "C:\full\path\to\cad-mcp\server.py"Scope (where the server is available):
claude mcp add cad --scope user -- uvx --from git+https://github.com/Codemod3/cad-mcp cad-mcp # all your projects
claude mcp add cad --scope project -- uvx --from git+https://github.com/Codemod3/cad-mcp cad-mcp # writes .mcp.json for teammatesThe repo also ships a ready .mcp.json — run Claude Code inside the project
folder and the server loads automatically, no command needed.
Verify with /mcp, then just ask Claude to read or edit a CAD file. Remove with
claude mcp remove cad.
DWG support
DWG files need the free ODA File Converter installed once:
Download for your OS: https://www.opendesign.com/guestfiles/oda_file_converter
Install it. Default Windows path:
C:\Program Files\ODA\ODAFileConverter <version>\ODAFileConverter.exeEnsure it's on your
PATH, or leave it at the default location whereezdxffinds it automatically.
Then use .dwg files exactly like .dxf — conversion is automatic. If the
converter is missing, DWG tools return a clear error and DXF keeps working.
Usage examples
Once connected, just talk to Claude:
"Summarize this DXF file: C:\drawings\floor_plan.dxf"
"What layers are in site_plan.dwg?"
"Extract all the text annotations from my drawing."
"Make an editable copy of plan.dxf, then add a circle radius 5 at (10,10) on a new layer called NOTES."
"Draw the outline of a 20×10 room as a closed polyline, then export it to DWG."
Supported entity types (read)
LINE, CIRCLE, ARC, LWPOLYLINE, TEXT, MTEXT, INSERT (block refs), DIMENSION, LEADER, ELLIPSE, SPLINE — all other types are still captured with their common attributes (layer, color, handle).
Development
Run the test suite (offline, DXF only — no ODA converter needed):
pip install -r requirements.txt pytest pytest-asyncio
python -m pytestTroubleshooting
Symptom | Fix |
Tools don't appear in the client | Use the absolute path to |
| The |
DWG tools error about ODA | Install the ODA File Converter and make sure it's on |
"Cannot edit a .dwg file in place" | Expected — run |
Client shows a broken/empty connection | Something printed to stdout. This server logs only to stderr; if you added prints, remove them — stdout is the MCP protocol channel. |
License
MIT — see LICENSE.
Available Tools
17 toolscad_add_arcAdd ArcA
Draw an arc on the editable copy and save it in place.
Inputs: params (required). Returns: result
cad_add_circleAdd CircleB
Draw a circle on the editable copy and save it in place.
Inputs: params (required). Returns: result
cad_add_layerAdd LayerA
Create a new layer on the editable copy and save it in place.
Inputs: params (required). Returns: result
cad_add_lineAdd LineA
Draw a line on the editable copy and save it in place.
Inputs: params (required). Returns: result
cad_add_polylineAdd PolylineB
Draw an LWPOLYLINE (connected line segments) on the copy and save it.
Inputs: params (required). Returns: result
cad_add_textAdd TextB
Add a TEXT entity on the editable copy and save it in place.
Inputs: params (required). Returns: result
cad_create_editable_copyCreate Editable CopyA
Make an editable .dxf copy of an original DXF or DWG file.
The original is never modified. All edit tools then operate on the copy, in place — call them repeatedly to keep building on the same copy. DWG input is converted to DXF automatically (needs the ODA File Converter).
Inputs: params (required). Returns: result
cad_delete_entityDelete Entity by HandleA
Delete a single entity by its handle from the editable copy.
Get handles from any read tool (they include a "handle" field).
Inputs: params (required). Returns: result
cad_export_dwgExport Copy to DWGA
Convert an edited .dxf file to .dwg (needs the ODA File Converter).
Inputs: params (required). Returns: result
dxf_get_block_detailInspect a Block DefinitionARead-onlyIdempotent
Return all entities inside a named block definition.
Inputs: params (required). Returns: result
dxf_get_blocksList Block DefinitionsARead-onlyIdempotent
List all named block definitions in the DXF file.
Blocks are reusable symbol libraries (e.g. doors, valves, furniture). System blocks starting with * are excluded.
Inputs: params (required). Returns: result
dxf_get_dimensionsExtract Dimension AnnotationsARead-onlyIdempotent
Extract all DIMENSION entities from the drawing.
Returns each dimension's measurement text, layer, and geometry points.
Inputs: params (required). Returns: result
dxf_get_entities_by_typeGet Entities by TypeBRead-onlyIdempotent
Return all entities of a given DXF type (e.g. LINE, CIRCLE, TEXT, MTEXT).
Optionally filter by layer name.
Inputs: params (required). Returns: result
dxf_get_layer_entitiesGet Entities on a LayerBRead-onlyIdempotent
Return all entities on a specific layer.
Inputs: params (required). Returns: result
dxf_get_textExtract All Text from DXFARead-onlyIdempotent
Extract all TEXT and MTEXT entities from the drawing.
Useful for reading annotations, labels, title blocks, and notes.
Inputs: params (required). Returns: result
dxf_list_layersList DXF LayersARead-onlyIdempotent
List all layers in a DXF file with their properties.
Returns each layer's name, color, linetype, lineweight, and on/frozen state.
Inputs: params (required). Returns: result
dxf_summaryDXF File SummaryARead-onlyIdempotent
Return a high-level overview of a DXF file.
Includes DXF version, units, layer count, entity counts per type, block definitions, and drawing extents.
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
The read-only dxf_ tools and editing cad_ tools are cleanly separated, and most tools target a distinct resource (layers, blocks, text, dimensions). However, dxf_get_text and dxf_get_dimensions overlap with dxf_get_entities_by_type, and dxf_get_layer_entities partially overlaps with the layer filter available on dxf_get_entities_by_type.
Tool names consistently use a dxf_ or cad_ prefix to separate reading from editing, which is a clear pattern. Verb usage is a bit mixed—get, list, summary, create, delete, add, export—but the resource nouns are predictable and the pattern remains readable.
17 tools is slightly above the ideal 3-15 range but reasonable for a CAD server that supports both reading and editing. The count is justified by the variety of entity types and file operations, though a few read tools feel redundant.
The server covers core DXF/DWG inspection workflows—layers, blocks, entities, text, dimensions, summary—and basic editing via adding and deleting entities plus layer creation. Notable gaps include modifying existing entities, creating a drawing from scratch, and inserting blocks, but the main read-and-annotate workflow is well supported.
Maintenance
Related MCP Connectors
DXF and PDF/X-4 for AI agents: structured facts, PNG renders, an interactive in-chat viewer.
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Fast multi-format CAD previews, geometry checks and conversion; measure and share in the workspace.
Read title blocks, parts lists, revision history and notes from 2D engineering drawings.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables automated CAD operations via natural language, supporting both AutoCAD LT on Windows and headless DXF generation on any platform.8MIT
- AlicenseNot gradedqualityDmaintenanceConverts CAD drawings (DXF/DWG) into structured data, enabling Claude to read drawings and answer questions about their content.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to create, inspect, render, and export 2D engineering drawings through DXF files, including entities, dimensions, hatches, splines, blocks, layers, PNG previews, and vector PDFs without needing a CAD GUI.11MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to read, modify, and verify AutoCAD 2027 drawings using transactional, safety-checked CAD tools, with optional headless DXF/PNG/PDF drawing and preview when AutoCAD is unavailable.41MIT