Enables natural language control of AutoCAD LT through AutoLISP code generation and execution for creating engineering d...
Created byApr 22, 2025
AutoCAD LT AutoLISP MCP Server
This MCP server enables natural language control of AutoCAD LT 2024/2025 through AutoLISP code generation and execution. It bridges Claude or other LLM clients with AutoCAD LT for creating engineering drawings through conversational prompts.
Features
Generates and executes AutoLISP code in AutoCAD LT
Supports connecting blocks with lines between named connection points
Arranges multiple blocks in sequence with custom spacing
Provides robust layer creation and management
Creates hatches and dimensions for technical drawings
Allows entity rotation and manipulation
Supports direct custom AutoLISP code execution
Enables text-to-CAD functionality through natural language
Prerequisites
AutoCAD LT 2024 or newer (with AutoLISP support)
Python 3.10 or higher
Claude Desktop or other MCP client application
Setup Instructions
Install Dependencies:
Configure Claude Desktop:
Start AutoCAD LT:
Start the Server:
Test the Connection:
Available Tools
get_autocad_status: Check connection to AutoCAD
create_line: Draw a line between two points
create_circle: Create a circle with defined center and radius
create_text: Add text labels at specified coordinates
insert_block: Insert a block with optional ID attribute, scale, and rotation
connect_blocks: Connect two blocks with a line between named connection points
label_block: Add a text label to a block
arrange_blocks: Arrange multiple blocks in a sequence with custom spacing
create_polyline: Create a polyline from a series of points
rotate_entity_by_id: Rotate an entity around a base point
create_linear_dimension: Add a linear dimension between two points
create_hatch: Add hatching to a closed polyline area
set_layer_properties: Create or modify layers with color, linetype, lineweight, etc.
execute_custom_autolisp: Run custom AutoLISP code directly
LISP Library Structure
The server loads multiple LISP files for functionality:
error_handling.lsp: Base error handling and validation functions
basic_shapes.lsp: Core functions for creating lines, circles, and text
drafting_helpers.lsp: Functions for block manipulation, layer management, and connecting elements
block_id_helpers.lsp: Functions for finding and manipulating blocks by ID attribute
selection_and_file.lsp: Selection set management and file operations
advanced_geometry.lsp: Extended geometry creation and manipulation
annotation_helpers.lsp: Text and dimension creation tools
layout_management.lsp: Functions for managing layouts and viewports
Usage Examples
Basic Drawing Operations:
Block Operations:
Multi-Block Operations:
Advanced Operations:
Custom AutoLISP:
Limitations
Requires AutoCAD LT 2024 or newer with AutoLISP support
Relies on window focus and keyboard simulation for command execution
User should not interact with AutoCAD while commands are being sent
Limited to 2D drawing operations
Connection points for blocks use predefined connection point names (CONN_DEFAULT1, CONN_DEFAULT2)
Layer colors must be specified as strings (e.g., "red", "yellow", "120")
Troubleshooting
See the TROUBLESHOOTING.md file for common issues and solutions. Common issues include:
LISP files failing to load
Window focus issues with AutoCAD
Function cancelled errors
Communication problems between the server and AutoCAD
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
AutoCAD LT AutoLISP MCP Server
This MCP server enables natural language control of AutoCAD LT 2024/2025 through AutoLISP code generation and execution. It bridges Claude or other LLM clients with AutoCAD LT for creating engineering drawings through conversational prompts.
Features
Generates and executes AutoLISP code in AutoCAD LT