Skip to main content
Glama
geongyeelee

autocad-mcp

by geongyeelee

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_connection_statusA

Check AutoCAD 2027 GUI process, live TCP bridge (127.0.0.1:9877), and AcCoreConsole status.

Args: auto_bootstrap: If True and the live bridge is not yet connected, automatically open a workspace drawing in AutoCAD 2027 to load the native bridge.

eval_autolispA

Evaluate arbitrary AutoLISP code in AutoCAD 2027 and return the serialized result.

Args: code: AutoLISP expression(s) to evaluate, e.g. '(getvar "ACADVER")' or '(mcp:make-line ...)'. prefer_live: Use the live AutoCAD 2027 GUI window if available; falls back to headless AcCoreConsole if False or if input_dwg is provided. timeout_ms: Execution timeout in milliseconds. input_dwg: Optional path to an existing .dwg file to process in headless AcCoreConsole mode. save_as_dwg: Optional path to save the resulting .dwg file when running in headless mode.

send_commandC

Send a raw command string directly to the active AutoCAD 2027 command line.

Args: command: Raw AutoCAD command sequence (e.g. '_.ZOOM E' or '.REGEN').

get_drawing_infoA

Get metadata, system variables, bounds, and entity count of the active drawing (or a file via input_dwg).

draw_lineB

Draw a line between two 2D/3D points in AutoCAD 2027.

Args: start_point: [x, y] or [x, y, z] start coordinates. end_point: [x, y] or [x, y, z] end coordinates. layer: Optional layer name (automatically created if it does not exist). color: Optional AutoCAD Color Index (ACI 1=Red, 2=Yellow, 3=Green, 4=Cyan, 5=Blue, 6=Magenta, 7=White).

draw_polylineB

Draw a lightweight polyline (LWPOLYLINE) through a sequence of vertices.

Args: vertices: List of [x, y] vertices (at least 2 points). closed: Whether the polyline should be closed. width: Constant global width of the polyline segments. layer: Optional layer name (auto-created if missing). color: Optional ACI color (1-255).

draw_circleB

Draw a circle in AutoCAD 2027.

Args: center: [x, y] or [x, y, z] center coordinates. radius: Circle radius (> 0). layer: Optional layer name. color: Optional ACI color (1-255).

draw_arcA

Draw a circular arc counter-clockwise from start_angle_deg to end_angle_deg.

Args: center: [x, y] or [x, y, z] center coordinates. radius: Arc radius (> 0). start_angle_deg: Start angle in degrees. end_angle_deg: End angle in degrees. layer: Optional layer name. color: Optional ACI color (1-255).

draw_rectangleA

Draw an axis-aligned rectangle (as a closed LWPOLYLINE) from two opposite corners.

Args: corner1: First corner [x1, y1]. corner2: Opposite corner [x2, y2]. width: Optional line width. layer: Optional layer name. color: Optional ACI color (1-255).

draw_textA

Create single-line TEXT or multiline MTEXT in AutoCAD 2027.

Args: position: Insertion point [x, y] or [x, y, z]. text: Text string content. height: Text height. rotation_deg: Rotation angle in degrees. multiline: If True, creates MTEXT; otherwise creates TEXT. layer: Optional layer name. color: Optional ACI color (1-255).

add_dimensionA

Add a linear or aligned dimension between point1 and point2.

Args: point1: First extension line origin [x, y]. point2: Second extension line origin [x, y]. dim_line_point: Point specifying the dimension line location [x, y]. dim_type: 'aligned' or 'linear'. layer: Optional layer name for the dimension.

draw_hatchA

Create a HATCH inside a closed entity specified by its handle.

Args: boundary_handle: Hex handle of the closed boundary entity (e.g. from draw_rectangle, draw_polyline, or draw_circle). pattern: Hatch pattern name (e.g. 'SOLID', 'ANSI31', 'ANSI37', 'NET'). scale: Hatch pattern scale (ignored for SOLID). angle_deg: Hatch pattern angle in degrees. layer: Optional layer name. color: Optional ACI color (1-255).

modify_entitiesA

Modify one or more entities identified by their handles.

Args: handles: List of entity hex handles (e.g. ['2DA', '2DB']). action: One of 'move', 'copy', 'rotate', 'scale', 'mirror', 'erase', 'set_layer', 'set_color'. base_point: Base point [x, y, z] for move/copy/rotate/scale/mirror. target_point: Target point [x, y, z] for move/copy or second mirror point. rotation_deg: Rotation angle in degrees (for action='rotate'). scale_factor: Scale factor (for action='scale'). layer: Target layer name (for action='set_layer'). color: Target ACI color 1-255 (for action='set_color').

manage_layerB

List, create, switch, or change properties of AutoCAD layers.

Args: action: One of 'list', 'create', 'set_current', 'on', 'off', 'freeze', 'thaw', 'lock', 'unlock'. name: Layer name (required for all actions except 'list'). color: Optional ACI color (1-255) when creating or updating a layer. linetype: Optional linetype name (e.g. 'Continuous', 'DASHED', 'CENTER').

manage_blockB

List blocks, create a new block definition from entity handles, or insert a block reference.

Args: action: One of 'list', 'create', 'insert'. block_name: Name of the block (required for 'create' and 'insert'). point: Base point (for 'create') or insertion point (for 'insert'). handles: List of entity handles to group into the block (required for 'create'). scale_x: X scale factor for 'insert'. scale_y: Y scale factor for 'insert'. scale_z: Z scale factor for 'insert'. rotation_deg: Rotation angle in degrees for 'insert'. layer: Optional layer name for 'insert'. color: Optional ACI color for 'insert'.

get_selectionA

Get all currently or previously selected entities in the active AutoCAD 2027 drawing.

query_entitiesA

Query entities in the active drawing (or a DWG file) with optional type and layer filters.

Args: entity_type: Optional DXF entity type filter (e.g. 'LINE', 'LWPOLYLINE', 'CIRCLE', 'ARC', 'TEXT', 'MTEXT', 'INSERT', 'DIMENSION', 'HATCH'). layer: Optional layer name filter. limit: Maximum number of entity records to return (default 100). input_dwg: Optional path to a .dwg file to inspect in headless mode.

export_drawingC

Save or export the active AutoCAD 2027 drawing to DWG, DXF, PDF, or PNG.

Args: output_path: Target file path (e.g. '/tmp/output.dwg', '/tmp/output.dxf', '/tmp/output.pdf', '/tmp/preview.png'). format: One of 'dwg', 'dxf', 'pdf', 'png'.

run_accoreconsole_scriptA

Run a batch AutoLISP or .scr script in AutoCAD 2027's headless AcCoreConsole.

Args: script_or_lisp: AutoLISP expressions (if is_lisp=True) or raw AutoCAD .scr script lines (if is_lisp=False). is_lisp: Whether script_or_lisp is AutoLISP code (True) or raw .scr commands (False). input_dwg: Optional input .dwg file path to open in AcCoreConsole. save_as_dwg: Optional output .dwg file path to save after execution. timeout_sec: Maximum execution time in seconds.

inspect_or_create_dxfA

High-speed offline DXF inspection or creation using ezdxf, with optional handoff to AutoCAD 2027.

Args: dxf_path: Path to the .dxf file to inspect or create. action: 'inspect' to read layers/entities summary of an existing DXF, or 'create' to generate a new DXF from entities_spec. entities_spec: For action='create', a list of dicts describing entities, e.g. [{'type': 'LINE', 'start': [0,0], 'end': [100,0], 'layer': 'WALL'}, {'type': 'CIRCLE', 'center': [50,50], 'radius': 20}]. open_in_autocad: If True, opens the DXF file in the AutoCAD 2027 GUI after completion.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 20 tools

Disambiguation4/5

Most tools have clearly distinct purposes: drawing primitives, layer/block management, querying, and export are easy to separate. The main ambiguity is among eval_autolisp, send_command, and run_accoreconsole_script, which all execute code or commands in different contexts, though the descriptions help distinguish live GUI execution from headless batch execution.

Naming Consistency4/5

The set uses consistent snake_case and mostly follows a verb_noun pattern such as draw_line, get_drawing_info, and modify_entities. Minor deviations include multiplexed manage_layer/manage_block tools and the compound inspect_or_create_dxf name.

Tool Count3/5

At 20 tools, the surface is borderline heavy, though the CAD domain legitimately requires many drawing, query, and execution operations. Some overlap among eval_autolisp, send_command, and run_accoreconsole_script, plus get_selection versus query_entities, keeps it from feeling fully tight.

Completeness4/5

The surface covers core CAD workflows: drawing primitives, dimensions, hatches, modification, layers, blocks, querying, export, and headless scripting. Minor gaps such as explicit new-drawing creation, undo/redo, and richer entity property editing can likely be handled through eval_autolisp or send_command.

Maintenance

ActivityMaintained
ResponsivenessNo issues