luiccian-autocad-mcp

v2.5.0
luiccian-autocad-mcp Checked 1 day ago Published 8 days ago

Model 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.

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
station *number
alignment_name
offsetnumber

get_station_coordinate

Alias for get_point_at_station: Calculate world (X, Y) coordinate given station and offset.

ParameterTypeDescription
station *number
alignment_name
offsetnumber

sample_longitudinal_profile

Sample terrain longitudinal profile along a Civil 3D alignment every 'interval' meters.

ParameterTypeDescription
alignment_name
intervalnumber
surface_name

get_longitudinal_profile

Alias for sample_longitudinal_profile: Sample terrain longitudinal profile along an alignment.

ParameterTypeDescription
alignment_name
intervalnumber
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.

ParameterTypeDescription
name *string
points *string
layer
radiusnumber

create_civil3d_surface

Create a TIN surface in Civil 3D from survey points 'x1,y1,z1;x2,y2,z2;...' (minimum 3 points).

ParameterTypeDescription
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).

ParameterTypeDescription
surface_name

sample_civil3d_cross_section

Sample terrain cross-section elevations perpendicular to a Civil 3D alignment at a station.

ParameterTypeDescription
station *number
alignment_name
left_widthnumber
right_widthnumber
stepnumber
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.

ParameterTypeDescription
inlineboolean

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.

ParameterTypeDescription
inlineboolean

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.

ParameterTypeDescription
allowboolean
document

new_drawing

Create a new AutoCAD drawing (optionally from a validated .dwt template) and authorize edits on it.

ParameterTypeDescription
template

open_drawing

Open an existing local .dwg drawing in AutoCAD without automatically bypassing Edit Guard.

ParameterTypeDescription
file_path *string
read_onlyboolean

activate_document

Switch AutoCAD's active MDI drawing by full path, unique filename, or session ID.

ParameterTypeDescription
document *string

close_document

Close an open drawing with explicit save=True, save_as=.dwg path, or discard_changes=True confirmation.

ParameterTypeDescription
discard_changesboolean
document
saveboolean
save_as

get_system_variable

Read an AutoCAD system variable safely (blocks TRUSTEDPATHS, SECURELOAD, SAFEMODE, etc.).

ParameterTypeDescription
name *string

set_system_variable

Set a non-security AutoCAD system variable on the active drawing under Edit Guard protection.

ParameterTypeDescription
name *string
value *
document

create_dimension

Create a native dimension (aligned, rotated, radial, diametric, angular) inside one atomic transaction.

ParameterTypeDescription
type *string
anglenumber
arrow_size
center_x
center_y
dim_line_x
dim_line_y
dim_scale
dim_style
document
expected_revision
layerstring
leader_lengthnumber
text_height
text_override
x1number
x2number
y1number
y2number

create_mleader

Create a native MLeader callout annotation from arrow point to landing text point.

ParameterTypeDescription
arrow_x *number
arrow_y *number
landing_x *number
landing_y *number
text *string
arrow_size
document
expected_revision
layerstring
text_heightnumber

create_hatch

Create a native solid or patterned Hatch inside closed boundary handles or 'x1,y1;x2,y2;...' vertices.

ParameterTypeDescription
anglenumber
associative
document
expected_revision
handles
layerstring
patternstring
points
scalenumber

create_table

Create a native AutoCAD Table entity at (x, y) populated with headers and a 2D JSON cells matrix.

ParameterTypeDescription
cells_json *
cols *integer
rows *integer
x *number
y *number
col_widthnumber
document
expected_revision
headers_json
layerstring
row_heightnumber
text_heightnumber
title

define_block

Define a reusable Block definition from existing handles or a JSON array of inline geometry operations.

ParameterTypeDescription
name *string
attributes_json
base_xnumber
base_ynumber
base_znumber
document
expected_revision
handles
operations_json
overwriteboolean

get_block_definition

Inspect geometry summary, origin, Xref status, and attribute definitions of a named block.

ParameterTypeDescription
name *string
document

get_block_attributes

Read all AttributeReference tag values on a BlockReference identified by hexadecimal handle.

ParameterTypeDescription
handle *string
document

set_block_attributes

Update AttributeReference tag values on a BlockReference handle from a JSON object of {tag: value}.

ParameterTypeDescription
attributes_json *
handle *string
document
expected_revision

list_xrefs

List external references (Xrefs) with name, file path, resolution status, and unloaded state.

ParameterTypeDescription
document

explode_entities

Explode one or more compound entities by handle inside a single atomic transaction.

ParameterTypeDescription
handles *
document
erase_sourceboolean
expected_revision

draw_batch_geometry

PREFERRED TOOL FOR DRAWING MULTIPLE ENTITIES IN A SINGLE CALL inside one atomic ObjectARX transaction.

ParameterTypeDescription
elements *
default_layerstring

draw_line

Draw a 2D/3D line segment between (x1, y1, z1) and (x2, y2, z2) in meters.

ParameterTypeDescription
x1 *number
x2 *number
y1 *number
y2 *number
layerstring
z1number
z2number

draw_polyline

Draw a 2D polyline from 'x1,y1;x2,y2;...' coordinates in meters.

ParameterTypeDescription
points *string
closedboolean
layerstring

draw_rectangle

Draw an axis-aligned rectangle as a closed polyline in meters.

ParameterTypeDescription
x1 *number
x2 *number
y1 *number
y2 *number
layerstring

draw_circle

Draw a circle centered at (center_x, center_y) with radius in meters.

ParameterTypeDescription
center_x *number
center_y *number
radius *number
layerstring

draw_arc

Draw a circular arc in meters using start and end angles in degrees.

ParameterTypeDescription
center_x *number
center_y *number
end_angle *number
radius *number
start_angle *number
layerstring

insert_text

Insert a single-line text entity at (x, y) in meters.

ParameterTypeDescription
text *string
x *number
y *number
heightnumber
layerstring
rotationnumber

insert_block

Insert a reference of an existing block definition at (x, y) in meters.

ParameterTypeDescription
block_name *string
x *number
y *number
layerstring
rotationnumber
scalenumber

query_entities

Query drawing entities using optional filters (types, layers, space, 2D bbox, text) with revision-bound cursors.

ParameterTypeDescription
cursor
document
layers
limitinteger
max_x
max_y
min_x
min_y
spacestring
text_contains
types

get_entity

Inspect detailed geometry, layer, attributes, and revision metadata of a single entity by hexadecimal handle.

ParameterTypeDescription
handle *string
document

modify_entity

Modify properties or individual coordinates of an entity by handle without overwriting omitted axes.

ParameterTypeDescription
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).

ParameterTypeDescription
handles *
operation *string
angle
base_x
base_y
base_z
document
dxnumber
dynumber
dznumber
erase_sourceboolean
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.

ParameterTypeDescription
handles *
document
expected_revision

execute_native_batch

Execute up to 500 native ObjectARX operations inside a single atomic transaction (one Ctrl+Z undo step).

ParameterTypeDescription
operations *
default_layerstring
document
expected_revision
rollback_on_errorboolean

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.

ParameterTypeDescription
commands *

execute_command

Enqueue native non-modal AutoCAD commands, AutoLISP macros, or YQArch commands to AutoCAD.

ParameterTypeDescription
command *string

evaluate_lisp

Evaluate AutoLISP expressions synchronously inside the active AutoCAD document and return the converted result.

ParameterTypeDescription
code *string
timeout_msinteger

execute_lisp

Alias for evaluate_lisp: Evaluate AutoLISP expressions synchronously inside AutoCAD.

ParameterTypeDescription
code *string
timeout_msinteger

load_lisp_file

Load and execute an external AutoLISP script file (.lsp) from disk into AutoCAD via synchronous LISP evaluation.

ParameterTypeDescription
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.

ParameterTypeDescription
name *string
color_aciinteger
descriptionstring
linetypestring

set_current_layer

Set an existing layer as the current active drawing layer (CLAYER).

ParameterTypeDescription
name *string

set_layer_state

Modify layer state ('on', 'off', 'freeze', 'thaw', 'lock', 'unlock').

ParameterTypeDescription
action *string
name *string

delete_layer

Delete an unused AutoCAD layer (refuses protected layers '0'/'Defpoints', active layer, or referenced layers).

ParameterTypeDescription
name *string
document

measure_distance

Calculate 2D horizontal distance, 3D distance, coordinate deltas, azimuth, and slope % between two points (without CAD).

ParameterTypeDescription
x1 *number
x2 *number
y1 *number
y2 *number
z1number
z2number

calculate_polygon_area

Calculate area in m2, hectares, perimeter, centroid, and orientation of a closed polygon (minimum 3 vertices, without CAD).

ParameterTypeDescription
points *string

purge_and_audit_drawing

Purge unused symbol table definitions safely and audit database errors.

ParameterTypeDescription
auditboolean
targetstring

clean_and_purge_drawing

Alias for purge_and_audit_drawing: Purge unused definitions safely and audit errors.

ParameterTypeDescription
auditboolean
targetstring

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.

ParameterTypeDescription
layout_name *string

configure_layout_page

Configure standardized sheet size (A0 to A4) of a Layout for 1:1 metric PDF plotting.

ParameterTypeDescription
layout_name *string
paper_sizestring
plot_stylestring

configure_layout_sheet

Alias for configure_layout_page: Configure standardized sheet size (A0 to A4) of a Layout.

ParameterTypeDescription
layout_name *string
paper_sizestring
plot_stylestring

create_viewport

Create a native PaperSpace Viewport entity with metric scale (1000/scale) inside one atomic transaction.

ParameterTypeDescription
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.

ParameterTypeDescription
corner_x *number
corner_y *number
authorstring
date
drawing_namestring
project_titlestring
scale_textstring
sheet_codestring

insert_parametric_titleblock

Alias for insert_title_block: Insert and draw a parametric engineering title block in PaperSpace.

ParameterTypeDescription
corner_x *number
corner_y *number
authorstring
date
drawing_namestring
project_titlestring
scale_textstring
sheet_codestring

export_pdf

Plot and export a PaperSpace layout synchronously to PDF forcing and restoring BACKGROUNDPLOT=0.

ParameterTypeDescription
layout_name *string
pdf_path *string
document
expected_revision
plot_stylestring