AutoCAD MCP Server - Codex Edition
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AUTOCAD_MCP_BACKEND | No | Backend selection: auto, file_ipc, ezdxf | auto |
| AUTOCAD_MCP_IPC_DIR | No | Directory for IPC command/result JSON files (must match on both Python and LISP sides) | C:/temp |
| AUTOCAD_MCP_ACAD_EXE | No | Full path to acad.exe used by automatic startup | |
| AUTOCAD_MCP_AUTOSTART | No | Start AutoCAD automatically when File IPC is requested and no AutoCAD window exists | false |
| AUTOCAD_MCP_LISP_PATH | No | Dispatcher path loaded for the current AutoCAD session only | |
| AUTOCAD_MCP_ONLY_TEXT | No | Disable screenshot capture (text feedback only) | false |
| AUTOCAD_MCP_ACAD_SCRIPT | No | Optional AutoCAD .scr file passed with /b during startup | |
| AUTOCAD_MCP_IPC_TIMEOUT | No | IPC command timeout in seconds (1-300) | 10.0 |
| AUTOCAD_MCP_ACAD_STARTUP_TIMEOUT | No | Seconds to wait for the AutoCAD main window, clamped to 5-180 | 75 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| drawingA | Drawing file management. Operations: activate - Activate a known document without changing window focus. data: {doc_id, expected_revision, lease_token?, worker_generation?} create — Create a new empty drawing. data: {name?} open — Open an existing drawing. data: {path} info — Get drawing extents, entity count, layers, blocks. save — Save current drawing. data: {path?} (saves to path if given, else QSAVE) save_as_dxf — Export as DXF. data: {path} plot_pdf — Plot to PDF. data: {path} render_preview — Native deterministic preview. data: {path, paper?, orientation?, plot_style?} Optional visual_style: Conceptual, Realistic, Shaded, or ShadedWithEdges. The style is applied only for the render and restored by default. workspace — Show the managed output workspace and folder layout. deliver — Build a validated DWG/DXF/PDF job with audits and SHA-256 checksums. audit — Structured drawing audit. data: {limit?, include_entities?, changed_only?, layer?, space?} audit_dxf — Parse an existing DXF into normalized JSON. data: {path, limit?, include_entities?} setup_mechanical — Create the seven monochrome GB/T mechanical-drafting layers. purge — Purge unused objects. get_variables — Get system variables. data: {names: [...]} set_variables — Safely set whitelisted system variables. data: {values: {...}} audit_geometry — Run line/polyline geometry DRC and return structured findings. undo — Undo last operation. redo — Redo last undone operation. |
| entityA | Entity creation, querying, and modification. Create operations: create_line — x1, y1, x2, y2, layer? create_circle — data: {cx, cy, radius}, layer? create_polyline — points: [[x,y],...], data: {closed?}, layer? create_rectangle — x1, y1, x2, y2, layer? create_arc — data: {cx, cy, radius, start_angle, end_angle}, layer? create_ellipse — data: {cx, cy, major_x, major_y, ratio}, layer? create_mtext — data: {x, y, width, text, height?}, layer? create_hatch — entity_id, data: {pattern?, angle?, scale?, layer?} create_batch — data: {entities: [{type, ...}], continue_on_error?} Read operations: list — layer? → list entities count — layer? → count entities get — entity_id → entity details Modify operations: copy — entity_id, data: {dx, dy} move — entity_id, data: {dx, dy} rotate — entity_id, data: {cx, cy, angle} scale — entity_id, data: {cx, cy, factor} mirror — entity_id, x1, y1, x2, y2 offset — entity_id, data: {distance} array — entity_id, data: {rows, cols, row_dist, col_dist} fillet — data: {id1, id2, radius} chamfer — data: {id1, id2, dist1, dist2} erase — entity_id |
| layerA | Layer creation and management. Operations: list — List all layers with properties. create — data: {name, color?, linetype?, lineweight?} set_current — data: {name} set_properties — data: {name, color?, linetype?, lineweight?} freeze — data: {name} thaw — data: {name} lock — data: {name} unlock — data: {name} |
| blockA | Block definition, insertion, and attribute management. Operations: list — List all block definitions. insert — data: {name, x, y, scale?, rotation?, block_id?} insert_with_attributes — data: {name, x, y, scale?, rotation?, attributes: {tag: value}} get_attributes — data: {entity_id} update_attribute — data: {entity_id, tag, value} define — data: {name, entities: [{type, ...}]} |
| annotationA | Annotation: text, dimensions, and leaders. Operations: create_text — data: {x, y, text, height?, rotation?, layer?} create_dimension_linear — data: {x1, y1, x2, y2, dim_x, dim_y} create_dimension_aligned — data: {x1, y1, x2, y2, offset} create_dimension_angular — data: {cx, cy, x1, y1, x2, y2} create_dimension_radius — data: {cx, cy, radius, angle} create_leader — data: {points: [[x,y],...], text} |
| solidA | Create and combine native AutoCAD 3D solids through the safe COM API. Operations: create_box - {center: [x,y,z], length, width, height, layer?} create_cylinder - {base_center: [x,y,z], radius, height, layer?} extrude - {profile_id, height, taper_angle?, erase_profile?, layer?} revolve - {profile_id, axis_point, axis_direction, angle?, erase_profile?, layer?} sweep - {profile_id, path_id, erase_profile?, layer?} boolean - {primary_id, tool_id, operation: union|intersection|subtract} fillet_edges - returns capability error until stable semantic edge selection exists chamfer_edges - returns capability error until stable semantic edge selection exists General native edge edits never accept volatile edge indices. Use product.rounded_box for analytic radius geometry or a future stable native feature plugin. |
| productA | Parametric consumer-product features, motion screening, views, and reviews. Operations: capabilities - honest verified/unsupported capability matrix create_feature - data: {kind, feature_id, component_id, ...} list_features / get_feature query_edges_by_semantic_role measure_fillet_radius / measure_chamfer_distance fillet_edges / chamfer_edges - structured capability error without stable selection set_motion - axis, angle, limits, clearance interference_sample - static broad-phase AABB screening clearance_sweep - sampled rotated-AABB motion screening render_view - front/right/top/bottom/iso/rotated_iso/section/exploded; data.visual_style requests an allow-listed AutoCAD display style; material rendering is reported only when independently verified by the backend set_review / review_summary Product review verdicts are independent from geometry and STEP validity. USB cutouts require supplier-controlled or physically measured authority; concept dimensions must use module_reservation instead. |
| pidB | P&ID drawing with CTO symbol library. Operations: setup_layers — Create standard P&ID layers. insert_symbol — data: {category, symbol, x, y, scale?, rotation?} list_symbols — data: {category} draw_process_line — data: {x1, y1, x2, y2} connect_equipment — data: {x1, y1, x2, y2} add_flow_arrow — data: {x, y, rotation?} add_equipment_tag — data: {x, y, tag, description?} add_line_number — data: {x, y, line_num, spec} insert_valve — data: {x, y, valve_type, rotation?, attributes?} insert_instrument — data: {x, y, instrument_type, rotation?, tag_id?, range_value?} insert_pump — data: {x, y, pump_type, rotation?, attributes?} insert_tank — data: {x, y, tank_type, scale?, attributes?} |
| transactionA | Document identity and atomic native AutoCAD transactions. Operations: context - Read canonical native document/session/revision identity. create - Create a document. data: {name?}; requires idempotency_key. execute - Atomically apply data.operations through the native worker. Requires doc_id, expected_revision, and idempotency_key. begin/commit/rollback - Compatibility undo transaction operations. |
| viewA | Viewport control and diagnostic window capture. Operations: zoom_extents — Zoom to show all entities. fit_drawing — Center and fit all drawing geometry in the viewport. zoom_window — Zoom to window: x1, y1, x2, y2 set_visual_style — Apply a built-in visual style and optional entity colors. data: {visual_style|style, colors?, doc_id, expected_revision, lease_token?, worker_generation?} show_window — Restore and activate the AutoCAD window. get_screenshot — Diagnostic-only window capture. Prefer drawing.render_preview. |
| jobA | Inspect idempotent operations or clean managed test artifacts. Operations: journal_status - data: {idempotency_key} cleanup_test_artifacts - data: {job_id, confirm: true} |
| systemB | Server status and management. Operations: status — Backend info, capabilities, health check. preflight — Check Python/pywin32, acad.exe processes, and Activity Insights without starting AutoCAD. ensure_ready — Discover/start AutoCAD, open a document, load/version-check dispatcher, ping IPC. health — Quick health check (ping backend). get_backend — Return current backend name and capabilities. runtime — Return process/runtime details for spawn diagnostics. supervisor_status — Read the external desktop supervisor heartbeat without starting AutoCAD. init — Re-initialize the backend. execute_lisp — Execute arbitrary AutoLISP code (File IPC only). data: {code} recover — Cancel a stuck AutoCAD command and clear stale IPC state. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/beiming183-cloud/AutoCAD-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server