ShimmyCAD MCP
# ShimmyCAD MCP
Drive a running AutoCAD from Claude, in plain words: draw, edit, annotate, manage blocks and xrefs, set up sheets and plot PDFs.
**[How-to page](index.html)** · [Releases](Releases.md) · [User guide](docs/USER_GUIDE.md) · [Public skills](skills/Skills.md) · [Security](SECURITY.md) · [MIT license](LICENSE)
**Status:** version 0.2.1, experimental. 99 tools; 283 unit tests pass without AutoCAD. Many tools have run in live AutoCAD and some have not: check the [tool guide](docs/TOOLS.md) before relying on one. Windows only, imperial units.
## Contents
1. [Purpose](#1-purpose)
2. [Quick start](#2-quick-start)
3. [How it works](#3-how-it-works)
4. [Running the MCP Guide](#4-running-the-mcp-guide)
5. [Troubleshooting](#5-troubleshooting)
6. [Tools](#6-tools)
7. [Safety and limits](#7-safety-and-limits)
8. [Schematic](#8-schematic)
9. [Version](#9-version)
## 1. Purpose
ShimmyCAD MCP is a **companion for drafters, not a replacement**. It explores how a drafter can hand the harder and more annoying CAD tasks to an AI model, while the drafter keeps control of the drawing and makes the design decisions.
Every capability should answer two questions: *what annoying task does this remove*, and *how does the drafter check the result* (dimensions, layers, sheet output)?
Walls, doors and windows are out of scope.
## 2. Quick start
<!-- release:start -->
**Only want to use it?** [Download version 0.2.1](downloads/ShimmyCAD-MCP-0.2.1.zip) (experimental), then follow the [user guide](docs/USER_GUIDE.md). See [Releases](Releases.md). The steps below install from source.
<!-- release:end -->
For a Windows PC.
**Install these first:**
- AutoCAD 2027 or 2026 (the full product; AutoCAD LT is not supported)
- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0): `winget install Microsoft.DotNet.SDK.10`
- [Python](https://www.python.org/downloads/windows/) 3.10 or newer, **64-bit**
- [Claude Code](https://code.claude.com/docs/en/overview) or [Claude Desktop](https://claude.ai/download)
**Then:**
1. Download or clone this repository into the folder where it will stay.
2. Double-click **`quick_start.bat`**. For AutoCAD 2026, run `quick_start.bat 2026` from a terminal.
| The script | When |
|---|---|
| Creates `.venv` and installs the server | First run, or if `.venv` points at another folder |
| Builds `ShimmyBridge.dll` | If it is not built yet |
| Registers the server with Claude Code | If not registered. It asks before changing an existing registration. |
| Opens AutoCAD, loads the DLL (`NETLOAD`) and runs `SHIMMYSTART` | Every run, if AutoCAD is closed |
3. If AutoCAD asks about loading the DLL, allow it. Wait for the bridge port message.
4. Open a **test drawing**, or ask Claude for a new one.
5. In Claude, ask: *"Run acad_ping and acad_status."* You should see your AutoCAD version and the active drawing.
6. Try: *"On a new layer called TEST, draw a 10 ft by 8 ft rectangle and dimension one side."*
To see what the script would do without changing anything, run `quick_start.bat check`.
> The first-run path has been tested only in `check` mode on the development PC. It has not yet been run on a clean machine.
### Link with Claude
**Claude Code** (the script does this). By hand, from the project folder in PowerShell:
```powershell
claude mcp add --scope user shimmy-acad2027 -- "$PWD\.venv\Scripts\python.exe" -m shimmy_acad
claude mcp list
```
**Claude Desktop** (by hand). Open **Settings > Developer > Edit Config**, add the following, replace `C:\\path\\to\\ShimmyCAD-MCP` with your folder, then fully quit and reopen Claude Desktop:
```json
{
"mcpServers": {
"shimmy-acad2027": {
"command": "C:\\path\\to\\ShimmyCAD-MCP\\.venv\\Scripts\\python.exe",
"args": ["-m", "shimmy_acad"]
}
}
}
```
The server keeps the name `shimmy-acad2027` for both AutoCAD years.
### Every session after that
1. Open AutoCAD.
2. Type `NETLOAD` and pick `plugin\ShimmyBridge\bin\Release\net10.0-windows\ShimmyBridge.dll` (`Release-2026` for AutoCAD 2026). Once per AutoCAD session.
3. Type **`SHIMMYSTART`**.
(`quick_start.bat` also does this when AutoCAD is closed.)
### After changing the plugin code
Save your drawings, then run `tools\reload_cad_2027.bat` or `tools\reload_cad_2026.bat`. The script closes that year's AutoCAD, builds for that year, and reopens it with the bridge started. Add `buildonly` to build without touching AutoCAD.
## 3. How it works
```
Claude Code / Claude Desktop
| MCP over stdio
v
Python server (server/shimmy_acad) input and path checks
| JSON over 127.0.0.1, random port and token
v
ShimmyBridge.dll, inside AutoCAD AutoCAD .NET API
|
v
Your active drawing
```
1. **Claude** reads your request and picks tools. [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) is the standard that lets it call them. See [MCP in Claude Code](https://code.claude.com/docs/en/mcp) or [local servers in Claude Desktop](https://modelcontextprotocol.io/docs/develop/connect-local-servers).
2. **The Python server** is built on the [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk). It checks input before anything reaches AutoCAD.
3. **The bridge** starts only when `SHIMMYSTART` runs. It writes its port and token to `%LOCALAPPDATA%\ShimmyACAD2027\bridge.json`.
4. **The plugin** is written in C# with the [AutoCAD .NET API](https://help.autodesk.com/view/OARX/2026/ENU/). It queues each request and runs it on AutoCAD's main thread when AutoCAD is idle, so an open dialog or a running command can hold it up.
### AutoCAD commands
| Command | What it does |
|---|---|
| [`NETLOAD`](https://help.autodesk.com/view/ACD/2027/ENU/) | AutoCAD's own command to load a .NET DLL. Search "NETLOAD" in AutoCAD Help. |
| `SHIMMYSTART` | Start the bridge |
| `SHIMMYSTATUS` | Show whether the bridge is running, and its port |
| `SHIMMYSTOP` | Stop the bridge |
### Requirements
| Item | Requirement | Notes |
|---|---|---|
| Operating system | Windows | |
| AutoCAD | 2026 or 2027 | One source, one build per year. The current guide work was live-tested on 2026; the v0.1 live suite ran on 2027. |
| .NET | 10 SDK | To build the plugin |
| Python | 3.10+, 64-bit | |
| Python packages | `mcp` 2.x; `pymupdf` for the guide (included in the download setup). Optional: `pytest`; `matplotlib` for review sheets | See [pyproject.toml](pyproject.toml). PyMuPDF has [its own licence](https://pymupdf.readthedocs.io/en/latest/about.html#license-and-copyright). |
| Claude | Claude Code or Claude Desktop | A Claude account is required |
### Allowed folders
The project folder is always allowed. To allow more folders without a confirmation, set `SHIMMY_ALLOWED_ROOTS` (separate several with `;`).
- **Claude Desktop:** add `"env": { "SHIMMY_ALLOWED_ROOTS": "C:\\CAD\\Test Drawings" }` to the server entry.
- **Claude Code:** remove the server, then add it again with `-e`:
```powershell
claude mcp remove shimmy-acad2027 -s user
claude mcp add --scope user shimmy-acad2027 -e "SHIMMY_ALLOWED_ROOTS=C:\CAD\Test Drawings" -- "$PWD\.venv\Scripts\python.exe" -m shimmy_acad
```
### Manual build and tests
```powershell
py -3 -m venv .venv
.venv\Scripts\python.exe -m pip install -e ".[test,guide]"
dotnet build plugin\ShimmyBridge\ShimmyBridge.csproj -c Release # AutoCAD 2027
dotnet build plugin\ShimmyBridge\ShimmyBridge.csproj -c Release -p:AcadYear=2026 # AutoCAD 2026
.venv\Scripts\python.exe -m pytest -q # no AutoCAD needed
```
These need AutoCAD with the bridge running. **They draw in the active drawing**, so open a scratch drawing first:
- `tests\probe.py methods` lists bridge methods; `tests\probe.py call <method> "{json}"` sends one.
- `tests\live_suite_2027.py` runs the older live suite.
### Logs
`%LOCALAPPDATA%\ShimmyACAD2027\logs\` holds `server.log` and `bridge.log`. Server logging is verbose by default; set `SHIMMY_LOG_LEVEL=INFO` to reduce it. `acad_diagnostics` reports all file locations.
## 4. Running the MCP Guide
The **SHIMMYCAD MCP GUIDE** is a set of AutoCAD sheets (42 x 30 in) that the MCP draws about itself: tool samples, status labels and version notes. It is also a broad end-to-end exercise of the tools. Guide development has ended; the builder remains available.
**The easy way:** ask Claude to *Run mcp-guide*. It asks first, builds in the background (a few minutes), and names the PDF. This works with the download too. See the [user guide](docs/USER_GUIDE.md).
The rest of this section runs the same builder by hand from the source.
**Before you run it**
- Install the `guide` extra (the quick start does this).
- Start AutoCAD with the bridge running.
- Save your work, and do not click in AutoCAD or switch drawings during the build. The builder makes its own drawing.
**Run it** from the project folder:
```powershell
.venv\Scripts\python.exe tools\make_guide_dwg_v4.py # next unused label
.venv\Scripts\python.exe tools\make_guide_dwg_v4.py V3.10 # a specific unused label
```
Or double-click `tools\generate_guide_v4.bat`.
**What you get**
| Output | Location |
|---|---|
| Guide drawing and PDF | `Test\YYMMDD\SHIMMYCAD_MCP_GUIDE_<label>.dwg` and `.pdf` |
| Checkpoint drawings | `Test\YYMMDD\scratch\` |
| Run note (stages, warnings, errors) | `%LOCALAPPDATA%\ShimmyACAD2027\runs\` |
The builder never reuses a label. Cell 045 is filled in on each build: time, AutoCAD version, plugin and server versions, tool count and output file name. To record the AI model or conversation there, set `SHIMMY_AI_MODEL` or `SHIMMY_AI_CONVERSATION` first. Never put personal details in them, because the guide is published.
The published copy is `Template/MCP Guide - Latest.pdf`. After you replace it, run `.venv\Scripts\python.exe tools\make_previews.py` to refresh the web page images, and check the PDF for personal details.
After a build, check the PDF by eye. The status words on the sheets come from `tools/guide_cells.py` and `tools/guide_review.json`; they are set by review and are not measured by the build. Edit the sheet text in `guide_cells.py`. See the [tools schematic](tools/tools_schematic.md).
The builder has not been tried on a fresh clone, where the `Test` folder does not exist yet.
There is also a [public guide-building skill](skills/Skills.md).
## 5. Troubleshooting
Quick checks: `quick_start.bat check`, then `SHIMMYSTATUS` in AutoCAD, then `/mcp` in Claude Code.
| IF | THEN |
|---|---|
| "AutoCAD bridge is not running" | Load the plugin and type `SHIMMYSTART` |
| "AutoCAD did not respond in time" | Close any open dialog; check the drawing before retrying |
| Claude shows no `acad_*` tools | Check `claude mcp list`, then restart Claude |
| You moved the project folder | Run `quick_start.bat` and let it repoint the setup |
Full guide: **[docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)**
## 6. Tools
| Group | Covers |
|---|---|
| Connection and files | Status, diagnostics, new, open, save, close, switch drawings |
| Layers and properties | Layers, linetypes, no-plot, match properties, transparency |
| Draw | Lines, polylines, circles, arcs, splines, hatch, revision cloud |
| Edit | Move, copy, rotate, scale, mirror, erase, offset, array, trim, extend, break, fillet, chamfer |
| Annotate | Text, MText, find and replace, dimensions, leaders, tables |
| Query and select | Geometry readback, counts, extents, property selection |
| Blocks | Create, insert, redefine, attributes, library import |
| Xrefs and underlays | Attach, reload, detach, bind, images, PDF |
| Sheets and output | Layouts, viewports, paper-space text, page setups, PDF plot |
| Raw command | `acad_send_command`, off by default |
Every tool, its live-test status and the to-dos: **[docs/TOOLS.md](docs/TOOLS.md)**
## 7. Safety and limits
**This software changes real drawings. Work on copies, keep backups, and check every result.** There is no undo tool.
### Protections in the code
- **Local only.** The bridge listens on `127.0.0.1`, on a random port, and requires a new random token each run. It runs only after `SHIMMYSTART`.
- **Input checks.** Many values, such as names, points, colours, lineweights and sizes, are checked before they reach AutoCAD.
- **Folder rules.** Opening, saving to a new path, reading another drawing's blocks, PDF output and attaching files need `confirm_outside_root` outside the allowed folders. Xref, image and PDF attach allow only the project folder without it.
- **Confirm flags.** Required to erase an object, close without saving, erase originals when making a block or revision cloud, redefine a block, bind or detach an xref, start the guide build, and send a raw command.
### What is not protected
- **Claude sets the confirm flags itself.** The tools tell it to ask you first, but the code cannot know that it did. Your real control is Claude's tool permission prompt: **do not auto-approve destructive tools.**
- **Many edits need no confirm flag:** trim, extend, break, fillet, chamfer, move, find and replace (across all layouts by default), layer changes, block attributes and page setups.
- **Saving has no folder check.** `acad_save`, and `acad_close` with `save=true`, overwrite the drawing's current file wherever it is.
- **One review-sheet input is unchecked:** the optional `results_json` file read by `acad_export_sheet_pdf` can be anywhere.
- **"Ask once per file"** is a working rule in [CLAUDE.md](CLAUDE.md) for development in this folder. It is not enforced by the server.
- **The token file** can be read by programs running under your Windows account.
- **Drawing content goes to Claude.** Anything the tools read is sent to the AI service. Check client confidentiality terms first. Treat text inside drawings you did not make as untrusted.
- **Logs** record tool inputs, which can include drawing text and file paths.
### SendCommand (off by default)
`acad_send_command` sends one line to the AutoCAD command line. It is **built but turned off, and has not been live-tested.**
It works only if **you** set `SHIMMY_ALLOW_SENDCOMMAND=1` in the server's environment, in the same way as [allowed folders](#allowed-folders) (include every setting you want to keep). Each call also needs `confirm=true`, a single line of up to 200 characters.
> A raw command **bypasses every folder rule and confirm check above.** It is queued, so the tool does not report whether AutoCAD completed it. Leave it off unless you need it.
### Paper space
Paper space is supported and has been used live: layouts, viewports, view scale, paper-space text and MText, title blocks, page setups and PDF plots.
Limits:
- Most drawing tools add to **model space** only.
- Listing, counting, property selection and extents work on model space. `acad_get_geometry` can also read a layout.
- There are no tools to rename or delete layouts. Plot style editing is not included.
### Other limits
- Windows only; AutoCAD LT is not supported.
- Imperial drawing units are assumed; nothing is converted.
- PDF underlays show the first page only. Images cannot be clipped.
- Associative hatch does not reliably follow a moved boundary.
- Sheet sets, dynamic block parameters, 3D solids, gradient hatch and xref unload are not supported.
- The plugin is not set to load automatically: `NETLOAD` it once in each AutoCAD session.
## 8. Schematic
Scope, design decisions, the repository layout and a breakdown of the files: **[schematic.md](schematic.md)**
## 9. Version
Current package version: **0.2.1**. History: **[CHANGELOG.md](CHANGELOG.md)** · Open work: [todo.md](todo.md)
## License
[MIT](LICENSE). Dependencies keep their own licenses; note that PyMuPDF (used by the guide build; the download fetches it on first run) is offered under AGPL or a commercial license.
---
*AutoCAD is a trademark of Autodesk, Inc. Claude is a trademark of Anthropic. This project is not affiliated with or endorsed by either company.*
TDQS
Scored across 99 tools
Most tools target a distinct resource+action (add_line, create_layer, trim_arc, fillet_arc_arc), but several clusters overlap heavily: three guide-building tools (acad_build_mcp_guide, acad_build_capability_demo, acad_make_guide) all claim to produce the MCP Guide, and acad_plot_pdf vs acad_export_sheet_pdf vs acad_build_sheet blur the plotting/sheet boundary. Hatch tools (add_hatch vs add_associative_hatch) and the trim/fillet family are only separated by careful reading of descriptions.
Nearly all names use a consistent acad_ prefix with verb_noun structure (acad_add_line, acad_create_layer, acad_set_layer, acad_list_blocks, acad_trim_arc). Minor deviations exist, such as noun-first names (acad_entity_extents vs acad_get_extents, acad_layout_info) and bare verbs (acad_ping, acad_regen, acad_offset), but they remain readable.
99 tools is far beyond a navigable surface and well past the 25-tool 'heavy' threshold. While CAD automation is genuinely broad, the count is inflated by redundant clusters (three guide builders, multiple sheet/plot variants, overlapping selection tools) that could be consolidated.
Coverage is remarkably deep: geometry creation, layers/linetypes, blocks and attributes, xrefs, images, hatches, dimensions, layouts and viewports, page setups, plotting to PDF, selection and property queries, text editing, and diagnostics. Gaps are minor but real: no undo/redo, no layer deletion/purge, and no direct per-entity property setter beyond acad_match_properties.