cadCOMPANION
Connects to a live AutoCAD session over COM to drive drafting operations programmatically: drawing architectural symbols and annotations (level datums, aligned/chain dimensions, grid balloons, section and elevation marks, detail callouts), scanning drawing whitespace with a grid-density algorithm to place tables and notes without clutter, enforcing pre-flight geometry and scale checks, suppressing interactive dialogs, and capturing rendered viewport images for visual QA/QC.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
cadCOMPANION
High-performance, popup-free AutoCAD Model Context Protocol (MCP) Server and AI Drafting Companion designed for Google Antigravity, Claude Desktop, and Gemini Enterprise.
🚀 Key Features
1. Robust Win32 & COM Architecture
Zero Ghost Processes (
CAD_LAUNCH=never): Connects safely to the active AutoCAD session viaGetActiveObjectwithout spawning zombie background processes.Auto-ESC & Lock Recovery: Traps
CMDACTIVE > 0and unblocks frozen command prompts via asynchronous Win32VK_ESCAPEmessage queue posting (win32gui.PostMessage).Interactive Popup Suppression: Automatically enforces
FILEDIA=0,CMDDIA=0,ATTDIA=0,ATTREQ=0, andBLOCKEDITOR=0across all operations.Cross-Desktop Compatibility: Built-in support for switching to the interactive
Defaultdesktop (win32service.OpenDesktop) from sandboxed terminals.
2. Architectural Drafting & Construction Symbols
draw_level_datum: Standard architectural level markers (▽ with half-shaded contrast, shelf, and dashed witness line, e.g.,FFL ±0.00 m.).draw_aligned_dim&draw_dim_chain: Multi-tiered architectural dimension strings (10×S, +8×S margin stacking) with 45° ArchTicks.draw_grid_balloon: CENTER-linetype grid axes with circular numbered balloons outside dimension lines.draw_section_mark&draw_interior_elevation_mark: 4-way interior room markers and section cut arrows with sheet callout bubbles.draw_enlarged_detail_callout: Chamfered boundary callouts with shouldered leader landing lines.
3. Spatial Intelligence & Anti-Clutter
find_free_zones: 24×16 grid density scanner using 2D histogram empty-rectangle algorithms to place tables, notes, and schedules into clean whitespace ($\ge 35%$).capture_drawing_view: Native viewport image rendering via._-PNGOUTwith Pillow edge enhancement for Visual QA/QC.agent_preflight_guard: Mathematical pre-flight check enforcing closed polylines, scale math ($2.5S$, $10S$, $+8S$), and duplicate hatch prevention.context_pruner: Dynamic domain skill routing (KTV, Bar, Wet Area, RCP) cutting prompt bloat by >55%.
Related MCP server: multiCAD-mcp
📦 Quick Start
Installation with uv (Recommended)
uv run --python 3.12 autocad_mcp_server.pyAntigravity / Claude Desktop Configuration
Add the following to your mcp_config.json:
{
"mcpServers": {
"cadcompanion": {
"command": "uv",
"args": [
"run",
"--python",
"3.12",
"<PATH_TO_REPO>/autocad_mcp_server.py"
],
"env": {
"PYTHONUTF8": "1"
}
}
}
}📄 License
MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read, query, edit and render DWG drawings with AI. No AutoCAD required.
- AutoMEPDeprecatedapp.automep
Edit AutoCAD and Revit MEP drawings from Claude or ChatGPT in plain English.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables compatible AI assistants to inspect, draw, and modify drawings open in AutoCAD / AutoCAD Plant 3D through COM, including layers, entities, block attributes, and Excel attribute round-trips.507MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants like Claude for Desktop or Cursor to control supported CAD applications through natural language, including drawing, layer/entity/block management, data export, and file/session operations.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants such as Claude for Desktop or Cursor to control AutoCAD, ZWCAD, GstarCAD, and BricsCAD through text-based instructions for drawing, layers, blocks, entities, files, and automation tasks.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to control supported CAD applications through natural-language or direct tool calls for drawing, layer, block, entity, file, and data-export operations.-