AutoCAD MCP Pro
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Standard Python logging level. | INFO |
| ALLOWED_PATHS | No | Comma-separated absolute paths the server may read/write. | |
| MAX_DXF_BYTES | No | Reject DXF files larger than this on drawing_open. 0 to disable. | 52428800 |
| MAX_LIST_LIMIT | No | Hard cap for entity_list and analysis_select_* responses. | 5000 |
| MAX_UNDO_STACK | No | Maximum number of in-flight transaction snapshots. | 5 |
| MCP_AUTH_TOKEN | No | Required when ALLOW_REMOTE_HTTP=true. Bearer token for HTTP clients. | |
| COM_CALL_TIMEOUT | No | Per-call timeout for COM operations in seconds. | 60 |
| ALLOW_REMOTE_HTTP | No | Permit HTTP transport on non-loopback hosts. | false |
| AUTOCAD_MCP_BACKEND | No | Backend selection (auto, com, ezdxf). | auto |
| DANGEROUS_COMMANDS_ENABLED | No | Disable command and AutoLISP sanitization. Loud warning at startup. | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| drawing_infoA | Get comprehensive metadata for the current drawing. Returns: name, path, entity_count, layer_count, block_count, extents (min/max), units, version, backend name. |
| drawing_newA | Create a new empty drawing, optionally from a template (.dwt). When |
| drawing_openA | Open an existing DXF drawing file (DWG too, on the live COM backend). T0.2: a .dwg path is refused up front when the active backend has no |
| drawing_saveC | Save the current drawing. Optionally specify a new path. |
| drawing_save_asA | Save current drawing to a new path/format (DWG, DXF, or DWT template). The on-disk format is derived from the file extension so the bytes always
match the name (N2) — e.g. 'part.dxf' writes DXF, not DWG. |
| drawing_export_dxfB | Export the current drawing as a DXF file. |
| drawing_export_pdfA | Export the current drawing (or a paper-space layout) to PDF. |
| drawing_purgeA | Purge all unused objects (layers, blocks, linetypes, styles) from the drawing. |
| drawing_auditA | Audit the drawing: repair every fixable structural problem, and report it. This mutates the drawing. |
| drawing_closeA | Close the current drawing. If save is True (default), the drawing is saved to its current path before closing. After this call, you must call drawing_new or drawing_open before any other tool. |
| drawing_undoA | Undo the last drawing operation. On the live COM backend this is AutoCAD's own undo. The headless backend has
no journal, so a step is a full DXF snapshot and history is off by
default — set Drawing something after an undo discards the redo branch, as in AutoCAD. |
| drawing_redoA | Reapply the operation you just undid. Same history as |
| entity_create_lineA | Create a line from (x1,y1) to (x2,y2). Returns entity info with handle. |
| entity_create_circleB | Create a circle at (cx, cy) with given radius. |
| entity_create_arcA | Create a circular arc. Angles are in degrees, measured counter-clockwise from the positive X axis. |
| entity_create_polylineA | Create a lightweight 2D polyline through the given points. Example: points=[[0,0],[100,0],[100,100],[0,100]], closed=true → rectangle |
| entity_create_rectangleA | Create a closed rectangular polyline between two corner points. Convenience wrapper around entity_create_polyline. |
| entity_create_textB | Create a single-line text entity (DTEXT/TEXT). |
| entity_create_mtextA | Create a multi-line text entity (MTEXT) with word-wrap at the specified width. |
| entity_create_tableB | Create a native COM table or an explicitly-labelled ezdxf composite table. |
| leader_create_mleaderB | Create a native COM MLeader or an explicitly-labelled ezdxf composite. |
| entity_create_hatchA | Create a hatch fill pattern inside a closed boundary polygon. |
| entity_create_splineA | Create a NURBS spline curve passing through the specified fit points. |
| entity_create_ellipseB | Create an ellipse. major_x/major_y define the major axis vector from the center. |
| entity_create_pointA | Create a point marker entity at (x, y). |
| entity_create_block_refB | Insert a block reference (instance of an existing block definition). |
| hatch_set_gradientA | Fill a hatch with a gradient instead of a pattern. |
| hatch_editA | Edit an existing hatch in place. Omitted parameters are left alone — a partial edit that resets the rest is
data loss. |
| hatch_add_boundaryA | Add one boundary path built from typed edges. Typed edges exist because a boundary that only accepts vertex lists silently straightens every curve it is given. Every edge is validated before any is written, so a malformed list refuses instead of leaving a half-built path. |
| entity_create_wipeoutA | Create a WIPEOUT that hides drawing content behind its outline. Refuses fewer than three points: a zero-area mask hides nothing while reporting success. |
| entity_create_revcloudA | Draw a revision cloud: a polyline whose every segment carries an arc. A |
| dimension_linearA | Create a linear dimension, optionally toleranced (ISO 129 or ISO 286 fit). |
| dimension_alignedB | Create an aligned dimension that measures the true distance between two points. |
| dimension_angularA | Create an angular dimension measuring the angle between two lines from a vertex. |
| dimension_radiusB | Create a radius dimension for a circle or arc, optionally toleranced. |
| dimension_diameterA | Create a diameter dimension for a circle, optionally toleranced (e.g. ⌀20 H7). |
| entity_moveA | Move an entity by the specified displacement vector (dx, dy, dz). |
| entity_copyA | Copy an entity and move the copy by (dx, dy, dz). Returns info of the new copy. |
| entity_rotateA | Rotate an entity around a base point by the specified angle. |
| entity_scaleA | Scale an entity uniformly from a base point. |
| entity_mirrorB | Mirror an entity across a line defined by two points. Returns the mirrored copy. |
| entity_offsetA | Create a parallel copy of a line, circle, or polyline at the given distance. |
| entity_trimA | Trim V1 supports LINE+LINE only. Cutter is treated as an infinite ray (AutoCAD's default 'implied extend' trim mode). Raises if the lines are parallel. |
| entity_extendA | Extend V1 supports LINE+LINE only. Raises if the lines are parallel. |
| entity_filletA | Round a corner with a tangent arc. Returns info on the new ARC entity (or the first source line for radius=0). V1 supports LINE+LINE only. |
| entity_chamferA | Bevel a corner with a chamfer line. Returns info on the new chamfer LINE. V1 supports LINE+LINE only. |
| entity_deleteB | Permanently delete an entity by its handle. |
| entity_array_rectangularA | Create a rectangular array of copies. Returns info of all created copies. rows x cols is unbounded, so this is a result-heavy tool despite being a create: a 40x40 grid hands back 1600 full records. fields=["handle"] is usually all a caller needs from it. |
| entity_array_polarA | Create a polar (circular) array of copies around a center point.
|
| entity_set_propertiesA | Change one or more properties of an entity (layer, color, linetype, lineweight, visibility). |
| entity_edit_textA | Edit an existing text label in place — change its content, height, or rotation. Use this to rename/relabel without deleting and recreating (which would lose the handle). Works on both TEXT and MTEXT. |
| text_set_backgroundA | Mask what is behind an MTEXT so it stays readable over hatch or geometry. MTEXT only: TEXT has no background-fill attribute, so setting one on it would report success and change nothing. |
| text_find_replaceA | Replace text in TEXT, MTEXT and block attributes (ATTRIB and ATTDEF).
|
| entity_edit_geometryA | Edit the defining geometry of an existing entity in place (no delete/recreate). CIRCLE: cx/cy/radius · LINE: x1/y1/x2/y2 · ARC: cx/cy/radius/start_angle/end_angle. Any argument left out is unchanged; the handle is preserved. |
| selection_windowA | AutoCAD's ssget window/crossing selection. Corners may be given in any order. Selection is by drawn position, so an
entity in a mirrored frame is found where |
| selection_polygonA | Window or crossing selection against a polygon rather than a rectangle. |
| selection_filterA | AutoCAD's QSELECT: filter the drawing by properties. Named parameters rather than a query string, deliberately — a mistyped
attribute name in a query language comes back as an empty result, which is
indistinguishable from "no matches". |
| entity_getA | Get all properties of a specific entity by its handle. |
| entity_listA | List entities in the drawing with optional type and layer filters. Returns handle, type, layer, color, and type-specific properties. Use handles with entity_get, entity_move, entity_delete, etc. This is the most expensive result on the server — the full record runs
~250 characters per entity, and Paging honesty: a plain list has nowhere to say that more entities followed
the page, so |
| entity_delete_manyA | Delete multiple entities in one call. Returns count of deleted entities. |
| selection_getA | Read the entities the user pre-selected in the AutoCAD viewport (COM backend only). Returns the implied "pickfirst" selection — the entities highlighted with grips before invoking the AI — so work can be scoped to exactly those entities instead of the whole drawing. Typical use:: Result keys: ok — True on the COM backend (even for an empty selection) count — number of selected entities handles — list of entity handles (hex strings) to act on entities — full per-entity info (type, layer, color, ...) pickfirst — state of the PICKFIRST sysvar (None if unknown) message — guidance when nothing is selected On the ezdxf headless backend there is no viewport, so this returns ok=False with an empty handles list.
|
| layer_listA | List all layers with their properties (color, linetype, frozen, locked, visibility). Never truncated — a drawing's whole layer table is returned — so a compact envelope here always reports truncated=false. |
| layer_createC | Create a new layer with specified properties. |
| layer_deleteA | Delete a layer. The layer must have no entities. Layer '0' cannot be deleted. |
| layer_set_currentA | Set the active/current layer for new entities. |
| layer_modifyA | Modify an existing layer's color, linetype, and/or lineweight. |
| layer_freezeA | Freeze a layer (makes it invisible and unselectable, faster regeneration). |
| layer_thawB | Thaw a frozen layer, making it visible and selectable again. |
| layer_lockA | Lock a layer (entities visible but cannot be selected or modified). |
| layer_unlockA | Unlock a layer to allow entity selection and modification. |
| layer_hideA | Turn off a layer (entities invisible but still processed in regeneration). |
| layer_showA | Turn on a layer that was previously turned off. |
| layer_isolateB | Hide all layers except the specified one (layer isolation). |
| linetype_listA | Return the names of all linetypes currently loaded in the active drawing. |
| linetype_loadA | Load a single linetype safely. Use this instead of |
| block_listA | List all block definitions in the drawing (name, origin, attribute count, entity count). Never truncated — the whole block table is returned — so a compact envelope here always reports truncated=false. |
| block_insertC | Insert a block and optionally set attribute values. |
| block_explodeA | Explode a block reference into its individual component entities. |
| block_get_attributesA | Get all attribute values from a block reference as {TAG: value} dict. |
| block_set_attributesA | Update attribute values in a block reference. |
| block_create_from_entitiesA | Create a new block definition from existing entities in the drawing. Works on both engines. The originals stay in model space — this defines a
reusable block from them rather than consuming them the way AutoCAD's BLOCK
command does; use Handles that do not resolve are listed in |
| block_find_referencesA | Find all insert references to a specific block definition. Bounded by the backend's own default entity_list page (200 INSERTs scanned),
which is a pre-existing limit, not a new one: the compact envelope's |
| boundary_traceA | AutoCAD's BOUNDARY/BPOLY: create a closed polyline around a seed point. Returns the nearest enclosing loop, so a seed inside an island gives the island rather than the outer region. Straight edges are split where they cross, so a line drawn across a shape divides it the way it looks like it should. A seed with no enclosing loop is refused, and the error names the gap when the edges nearly close. |
| boundary_from_entitiesA | Chain the given entities into one closed polyline. The handles may arrive in any order — putting them in chain order is the tool's job. A chain that does not close is refused, and the error names the coordinates of the gap. |
| analysis_list_propertiesA | AutoCAD's LIST: the full DXF attribute set for one handle.
|
| analysis_entity_statsB | Analyze the drawing and return entity counts grouped by type and by layer. Returns: total_entities, by_type (sorted by count), by_layer (sorted by count). This is unique to AutoCAD MCP Pro – no other MCP server provides this! |
| analysis_find_in_regionA | Find all entities within a rectangular region (crossing selection). Uncapped: a window over a busy drawing returns every hit. Project with
|
| analysis_measure_distanceA | Measure the Euclidean distance between two points. |
| analysis_measure_areaA | Area and perimeter of a polygon you supply the vertices for. This measures the numbers in the call, NOT the drawing. To measure something
that exists, use Straight-edged polygons are exact. Pass a third |
| analysis_measure_entityA | Measure something already in the drawing, by handle. Reads the real geometry, so polyline bulges (arc edges) are included — reading vertices back and shoelacing them yourself loses 28% of the area on a semicircular edge, silently. Measurable: LWPOLYLINE, 2D POLYLINE, CIRCLE, ELLIPSE, SPLINE, HATCH, SOLID,
TRACE, 3DFACE. REGION and 3DSOLID need the live COM backend (their area is
in ACIS data ezdxf cannot evaluate) and refuse with
The payload states its own accuracy: |
| analysis_bounding_boxA | Get the bounding box (extents) of all entities in the drawing. |
| analysis_select_by_layerA | Get all entities on a specific layer. Returns entity list with handles. Capped at MAX_LIST_LIMIT (default 5000). The plain list cannot say it was
capped — the warning goes to the log stream, which most clients never show
the model — so use |
| analysis_select_by_typeA | Get all entities of a specific type. Returns entity list with handles. Capped at MAX_LIST_LIMIT (default 5000); as with analysis_select_by_layer,
|
| analysis_layer_statsA | Return detailed statistics for each layer: entity count, types present. |
| cad_batchA | Execute an ordered list of tool calls in ONE round trip. N calls collapse into one request/response pair, and Successful steps report only their handle; pass verbose=True for the full result. Anything without a handle is returned whole. VALIDATION runs first, always: an unknown tool, a schema-invalid argument or
a reference no earlier step binds refuses the whole batch before anything
executes. ERRORS are typed, never text: each failed step carries error.kind - one of
unsupported (with the backend ATOMICITY is reported, not assumed. Read the NOT CALLABLE from a batch: the raw command/LISP escape hatches, and cad_batch itself. Call those directly. For a few hundred entities of the same kind, entity_batch_create is denser still (no per-step tool name) - and it can be one step of a cad_batch. |
| entity_batch_createA | Create multiple entities in a single call for better performance. Each entity dict must have a 'type' key and the parameters for that type. Example: [{"type": "line", "x1": 0, "y1": 0, "x2": 100, "y2": 0}, {"type": "circle", "cx": 50, "cy": 50, "radius": 25}] Denser than cad_batch for many entities of the same kind (no per-step tool name), and usable as one step of a cad_batch. Use cad_batch when the calls differ, must be ordered, or must feed each other. |
| entity_batch_modifyA | Apply multiple modifications in a single call. Example: [{"handle": "1A", "action": "move", "dx": 10, "dy": 20}, {"handle": "2B", "action": "delete"}] Covers move/rotate/scale/delete/set_properties only. For anything else, for ordering, or to feed one step's result into the next, use cad_batch. |
| template_apply_layersA | Apply a standard layer set from a predefined template. Available templates: architectural, mechanical, electrical, piping. Creates all layers defined in the template with standard colors and lineweights. |
| template_listA | List all available layer templates and their contents. |
| validation_checkA | Run quality checks on the current drawing. Available checks:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| prompt_floor_plan | Generate a prompt for creating a floor plan drawing. |
| prompt_pid_diagram | Generate a prompt for creating a P&ID (Piping and Instrumentation Diagram). |
| prompt_electrical_schematic | Generate a prompt for creating an electrical schematic diagram. |
| prompt_mechanical_drawing | Generate a prompt for creating a mechanical engineering drawing. |
| prompt_quick_drawing | Generate step-by-step instructions for creating a drawing from a description. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Current Drawing Info | Metadata for the currently open drawing |
| Layer List | All layers in the current drawing with properties |
| Block Library | All block definitions in the current drawing |
| Entity Statistics | Entity counts by type and layer |
| Server Status | AutoCAD MCP Pro server and backend status |
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