luiccian-autocad-mcp
v2.5.0Model Context Protocol (MCP) server connecting Autodesk AutoCAD 2027 and Civil 3D with AI agents (Claude, Antigravity, Cursor) via AutoCAD AI Gateway.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
check_civil3d_status
Verify if Autodesk Civil 3D 2027 modules are loaded and report existing surfaces and alignments.
list_civil3d_surfaces
List TIN surfaces in Civil 3D with name, minimum/maximum elevation, and triangle count.
get_surface_elevation
Query exact ground elevation (Z coordinate) at point (x, y) on a Civil 3D TIN surface.
| Parameter | Type | Description |
|---|---|---|
x * | number | |
y * | number | |
surface_name |
list_civil3d_alignments
List horizontal alignments in Civil 3D with name, start station, end station, and length.
get_alignment_station_offset
Calculate station and lateral offset of point (x, y) relative to a Civil 3D horizontal alignment.
| Parameter | Type | Description |
|---|---|---|
x * | number | |
y * | number | |
alignment_name |
get_point_at_station
Calculate world (X, Y) coordinate from a station and lateral offset (+ right, - left) on a Civil 3D alignment.
| Parameter | Type | Description |
|---|---|---|
station * | number | |
alignment_name | ||
offset | number |
get_station_coordinate
Alias for get_point_at_station: Calculate world (X, Y) coordinate given station and offset.
| Parameter | Type | Description |
|---|---|---|
station * | number | |
alignment_name | ||
offset | number |
sample_longitudinal_profile
Sample terrain longitudinal profile along a Civil 3D alignment every 'interval' meters.
| Parameter | Type | Description |
|---|---|---|
alignment_name | ||
interval | number | |
surface_name |
get_longitudinal_profile
Alias for sample_longitudinal_profile: Sample terrain longitudinal profile along an alignment.
| Parameter | Type | Description |
|---|---|---|
alignment_name | ||
interval | number | |
surface_name |
create_civil3d_alignment
Create a horizontal alignment in Civil 3D from PI vertices 'x1,y1;x2,y2;...' with fixed radius tangent circular curves.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
points * | string | |
layer | ||
radius | number |
create_civil3d_surface
Create a TIN surface in Civil 3D from survey points 'x1,y1,z1;x2,y2,z2;...' (minimum 3 points).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
points * | string |
get_civil3d_surface_stats
Retrieve statistical properties of a Civil 3D surface (min/max/mean elevation, points, triangles, 2D/3D area).
| Parameter | Type | Description |
|---|---|---|
surface_name |
sample_civil3d_cross_section
Sample terrain cross-section elevations perpendicular to a Civil 3D alignment at a station.
| Parameter | Type | Description |
|---|---|---|
station * | number | |
alignment_name | ||
left_width | number | |
right_width | number | |
step | number | |
surface_name |
get_drawing_info
Retrieve metadata of the active AutoCAD drawing: DWG filename, read-only state, and configured units.
get_entities
Read and return a summary (counts by entity type) of all entities existing in AutoCAD ModelSpace.
get_layers
Retrieve the full list of AutoCAD drawing layers with their states (locked, frozen, off) and ACI color index.
get_texts
List all text entities (DBText and MText) in the drawing with text contents, exact (X, Y) coordinates, and layers.
get_drawing_extents
Retrieve minimum (X, Y) and maximum (X, Y) bounding coordinates of the active drawing (Extmin and Extmax).
get_selection_count
Get the number of entities currently selected by the user in AutoCAD.
list_blocks
Retrieve names of all block definitions loaded into the current drawing.
capture_screenshot
Capture a PNG screenshot of the active AutoCAD window and save it to disk. Set inline=True for base64 PNG.
| Parameter | Type | Description |
|---|---|---|
inline | boolean |
read_layers
Alias for get_layers: Retrieve the full list of AutoCAD drawing layers with their states.
read_objects
Alias for get_entities: Read a summary of entities in ModelSpace.
read_texts
Alias for get_texts: List all text entities with contents and coordinates.
read_selection
Alias for get_selection_count: Get the number of currently selected entities.
list_available_blocks
Alias for list_blocks: Retrieve block definitions available in the drawing.
capture_screen
Alias for capture_screenshot: Capture a PNG image of the active AutoCAD window.
| Parameter | Type | Description |
|---|---|---|
inline | boolean |
get_gateway_tools
Query the live AutoCAD Gateway dynamic endpoint catalog (GET /_tools) with undo semantics and Edit Guard flags.
get_gateway_guide
Retrieve operational working rules and undo/Edit Guard conventions from the Gateway (GET /_guide).
list_documents
List all open AutoCAD drawing documents with session IDs, revisions, and Edit Guard flags.
cancel_command
Send Ctrl+C cancellation to clear an unfinished AutoCAD command-line prompt.
allow_edit_document
Authorize (or revoke) edits on an open drawing when Edit Guard protection is active.
| Parameter | Type | Description |
|---|---|---|
allow | boolean | |
document |
new_drawing
Create a new AutoCAD drawing (optionally from a validated .dwt template) and authorize edits on it.
| Parameter | Type | Description |
|---|---|---|
template |
open_drawing
Open an existing local .dwg drawing in AutoCAD without automatically bypassing Edit Guard.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
read_only | boolean |
activate_document
Switch AutoCAD's active MDI drawing by full path, unique filename, or session ID.
| Parameter | Type | Description |
|---|---|---|
document * | string |
close_document
Close an open drawing with explicit save=True, save_as=.dwg path, or discard_changes=True confirmation.
| Parameter | Type | Description |
|---|---|---|
discard_changes | boolean | |
document | ||
save | boolean | |
save_as |
get_system_variable
Read an AutoCAD system variable safely (blocks TRUSTEDPATHS, SECURELOAD, SAFEMODE, etc.).
| Parameter | Type | Description |
|---|---|---|
name * | string |
set_system_variable
Set a non-security AutoCAD system variable on the active drawing under Edit Guard protection.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
value * | ||
document |
create_dimension
Create a native dimension (aligned, rotated, radial, diametric, angular) inside one atomic transaction.
| Parameter | Type | Description |
|---|---|---|
type * | string | |
angle | number | |
arrow_size | ||
center_x | ||
center_y | ||
dim_line_x | ||
dim_line_y | ||
dim_scale | ||
dim_style | ||
document | ||
expected_revision | ||
layer | string | |
leader_length | number | |
text_height | ||
text_override | ||
x1 | number | |
x2 | number | |
y1 | number | |
y2 | number |
create_mleader
Create a native MLeader callout annotation from arrow point to landing text point.
| Parameter | Type | Description |
|---|---|---|
arrow_x * | number | |
arrow_y * | number | |
landing_x * | number | |
landing_y * | number | |
text * | string | |
arrow_size | ||
document | ||
expected_revision | ||
layer | string | |
text_height | number |
create_hatch
Create a native solid or patterned Hatch inside closed boundary handles or 'x1,y1;x2,y2;...' vertices.
| Parameter | Type | Description |
|---|---|---|
angle | number | |
associative | ||
document | ||
expected_revision | ||
handles | ||
layer | string | |
pattern | string | |
points | ||
scale | number |
create_table
Create a native AutoCAD Table entity at (x, y) populated with headers and a 2D JSON cells matrix.
| Parameter | Type | Description |
|---|---|---|
cells_json * | ||
cols * | integer | |
rows * | integer | |
x * | number | |
y * | number | |
col_width | number | |
document | ||
expected_revision | ||
headers_json | ||
layer | string | |
row_height | number | |
text_height | number | |
title |
define_block
Define a reusable Block definition from existing handles or a JSON array of inline geometry operations.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
attributes_json | ||
base_x | number | |
base_y | number | |
base_z | number | |
document | ||
expected_revision | ||
handles | ||
operations_json | ||
overwrite | boolean |
get_block_definition
Inspect geometry summary, origin, Xref status, and attribute definitions of a named block.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
document |
get_block_attributes
Read all AttributeReference tag values on a BlockReference identified by hexadecimal handle.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
document |
set_block_attributes
Update AttributeReference tag values on a BlockReference handle from a JSON object of {tag: value}.
| Parameter | Type | Description |
|---|---|---|
attributes_json * | ||
handle * | string | |
document | ||
expected_revision |
list_xrefs
List external references (Xrefs) with name, file path, resolution status, and unloaded state.
| Parameter | Type | Description |
|---|---|---|
document |
explode_entities
Explode one or more compound entities by handle inside a single atomic transaction.
| Parameter | Type | Description |
|---|---|---|
handles * | ||
document | ||
erase_source | boolean | |
expected_revision |
draw_batch_geometry
PREFERRED TOOL FOR DRAWING MULTIPLE ENTITIES IN A SINGLE CALL inside one atomic ObjectARX transaction.
| Parameter | Type | Description |
|---|---|---|
elements * | ||
default_layer | string |
draw_line
Draw a 2D/3D line segment between (x1, y1, z1) and (x2, y2, z2) in meters.
| Parameter | Type | Description |
|---|---|---|
x1 * | number | |
x2 * | number | |
y1 * | number | |
y2 * | number | |
layer | string | |
z1 | number | |
z2 | number |
draw_polyline
Draw a 2D polyline from 'x1,y1;x2,y2;...' coordinates in meters.
| Parameter | Type | Description |
|---|---|---|
points * | string | |
closed | boolean | |
layer | string |
draw_rectangle
Draw an axis-aligned rectangle as a closed polyline in meters.
| Parameter | Type | Description |
|---|---|---|
x1 * | number | |
x2 * | number | |
y1 * | number | |
y2 * | number | |
layer | string |
draw_circle
Draw a circle centered at (center_x, center_y) with radius in meters.
| Parameter | Type | Description |
|---|---|---|
center_x * | number | |
center_y * | number | |
radius * | number | |
layer | string |
draw_arc
Draw a circular arc in meters using start and end angles in degrees.
| Parameter | Type | Description |
|---|---|---|
center_x * | number | |
center_y * | number | |
end_angle * | number | |
radius * | number | |
start_angle * | number | |
layer | string |
insert_text
Insert a single-line text entity at (x, y) in meters.
| Parameter | Type | Description |
|---|---|---|
text * | string | |
x * | number | |
y * | number | |
height | number | |
layer | string | |
rotation | number |
insert_block
Insert a reference of an existing block definition at (x, y) in meters.
| Parameter | Type | Description |
|---|---|---|
block_name * | string | |
x * | number | |
y * | number | |
layer | string | |
rotation | number | |
scale | number |
query_entities
Query drawing entities using optional filters (types, layers, space, 2D bbox, text) with revision-bound cursors.
| Parameter | Type | Description |
|---|---|---|
cursor | ||
document | ||
layers | ||
limit | integer | |
max_x | ||
max_y | ||
min_x | ||
min_y | ||
space | string | |
text_contains | ||
types |
get_entity
Inspect detailed geometry, layer, attributes, and revision metadata of a single entity by hexadecimal handle.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
document |
modify_entity
Modify properties or individual coordinates of an entity by handle without overwriting omitted axes.
| Parameter | Type | Description |
|---|---|---|
handle * | string | |
closed | ||
color_index | ||
document | ||
elevation | ||
end_angle | ||
end_x | ||
end_y | ||
end_z | ||
expected_revision | ||
height | ||
layer | ||
linetype | ||
radius | ||
rotation | ||
scale | ||
start_angle | ||
start_x | ||
start_y | ||
start_z | ||
text | ||
width | ||
x | ||
y | ||
z |
transform_entities
Apply move, rotate, scale, copy, or mirror transforms to one or more handles atomically. For mirror, provide explicit axis endpoints (p1_x, p1_y) and (p2_x, p2_y).
| Parameter | Type | Description |
|---|---|---|
handles * | ||
operation * | string | |
angle | ||
base_x | ||
base_y | ||
base_z | ||
document | ||
dx | number | |
dy | number | |
dz | number | |
erase_source | boolean | |
expected_revision | ||
factor | ||
p1_x | ||
p1_y | ||
p2_x | ||
p2_y |
delete_entities
Delete one or more entities identified by hexadecimal handle in one atomic transaction.
| Parameter | Type | Description |
|---|---|---|
handles * | ||
document | ||
expected_revision |
execute_native_batch
Execute up to 500 native ObjectARX operations inside a single atomic transaction (one Ctrl+Z undo step).
| Parameter | Type | Description |
|---|---|---|
operations * | ||
default_layer | string | |
document | ||
expected_revision | ||
rollback_on_error | boolean |
ping_gateway
Ping the native AutoCAD Gateway server via GET /_ping to verify connectivity and active session.
ping_autocad_gateway
Alias for ping_gateway: Ping the native AutoCAD Gateway server to verify HTTP connectivity.
execute_batch_commands
Execute a sequential list of AutoCAD command strings or macros in a single batch payload.
| Parameter | Type | Description |
|---|---|---|
commands * |
execute_command
Enqueue native non-modal AutoCAD commands, AutoLISP macros, or YQArch commands to AutoCAD.
| Parameter | Type | Description |
|---|---|---|
command * | string |
evaluate_lisp
Evaluate AutoLISP expressions synchronously inside the active AutoCAD document and return the converted result.
| Parameter | Type | Description |
|---|---|---|
code * | string | |
timeout_ms | integer |
execute_lisp
Alias for evaluate_lisp: Evaluate AutoLISP expressions synchronously inside AutoCAD.
| Parameter | Type | Description |
|---|---|---|
code * | string | |
timeout_ms | integer |
load_lisp_file
Load and execute an external AutoLISP script file (.lsp) from disk into AutoCAD via synchronous LISP evaluation.
| Parameter | Type | Description |
|---|---|---|
file_path * | string |
zoom_extents
Execute Zoom Extents ('_.ZOOM E') in AutoCAD to center and fit all drawing entities in the current viewport.
save_drawing
Save the active AutoCAD drawing file ('_.QSAVE').
configure_drawing_units
Configure AutoCAD drawing environment to METRIC METERS (INSUNITS=4, MEASUREMENT=1, LUNITS=2, LUPREC=3) and calibrate dimensions.
configure_drawing_environment
Alias for configure_drawing_units: Configure AutoCAD drawing environment to metric meters.
create_layer
Create or update a layer with ACI color (1-255) and linetype, and set it active.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
color_aci | integer | |
description | string | |
linetype | string |
set_current_layer
Set an existing layer as the current active drawing layer (CLAYER).
| Parameter | Type | Description |
|---|---|---|
name * | string |
set_layer_state
Modify layer state ('on', 'off', 'freeze', 'thaw', 'lock', 'unlock').
| Parameter | Type | Description |
|---|---|---|
action * | string | |
name * | string |
delete_layer
Delete an unused AutoCAD layer (refuses protected layers '0'/'Defpoints', active layer, or referenced layers).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
document |
measure_distance
Calculate 2D horizontal distance, 3D distance, coordinate deltas, azimuth, and slope % between two points (without CAD).
| Parameter | Type | Description |
|---|---|---|
x1 * | number | |
x2 * | number | |
y1 * | number | |
y2 * | number | |
z1 | number | |
z2 | number |
calculate_polygon_area
Calculate area in m2, hectares, perimeter, centroid, and orientation of a closed polygon (minimum 3 vertices, without CAD).
| Parameter | Type | Description |
|---|---|---|
points * | string |
purge_and_audit_drawing
Purge unused symbol table definitions safely and audit database errors.
| Parameter | Type | Description |
|---|---|---|
audit | boolean | |
target | string |
clean_and_purge_drawing
Alias for purge_and_audit_drawing: Purge unused definitions safely and audit errors.
| Parameter | Type | Description |
|---|---|---|
audit | boolean | |
target | string |
regen_all
Regenerate all open viewports and recalculate drawing display curves and text metrics (_.REGENALL).
create_layout
Create a new PaperSpace Layout tab and switch the active view to that layout.
| Parameter | Type | Description |
|---|---|---|
layout_name * | string |
configure_layout_page
Configure standardized sheet size (A0 to A4) of a Layout for 1:1 metric PDF plotting.
| Parameter | Type | Description |
|---|---|---|
layout_name * | string | |
paper_size | string | |
plot_style | string |
configure_layout_sheet
Alias for configure_layout_page: Configure standardized sheet size (A0 to A4) of a Layout.
| Parameter | Type | Description |
|---|---|---|
layout_name * | string | |
paper_size | string | |
plot_style | string |
create_viewport
Create a native PaperSpace Viewport entity with metric scale (1000/scale) inside one atomic transaction.
| Parameter | Type | Description |
|---|---|---|
center_model_x * | number | |
center_model_y * | number | |
height * | number | |
lower_x * | number | |
lower_y * | number | |
scale * | number | |
width * | number | |
document | ||
expected_revision | ||
layout_name |
insert_title_block
Insert and draw a parametric engineering title block in PaperSpace with customizable metadata.
| Parameter | Type | Description |
|---|---|---|
corner_x * | number | |
corner_y * | number | |
author | string | |
date | ||
drawing_name | string | |
project_title | string | |
scale_text | string | |
sheet_code | string |
insert_parametric_titleblock
Alias for insert_title_block: Insert and draw a parametric engineering title block in PaperSpace.
| Parameter | Type | Description |
|---|---|---|
corner_x * | number | |
corner_y * | number | |
author | string | |
date | ||
drawing_name | string | |
project_title | string | |
scale_text | string | |
sheet_code | string |
export_pdf
Plot and export a PaperSpace layout synchronously to PDF forcing and restoring BACKGROUNDPLOT=0.
| Parameter | Type | Description |
|---|---|---|
layout_name * | string | |
pdf_path * | string | |
document | ||
expected_revision | ||
plot_style | string |