Enables natural language control of AutoCAD LT through AutoLISP code generation and execution for creating engineering drawings, supporting shapes, blocks, layers, hatches, dimensions, and entity manipulation.
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, P&ID diagrams, and technical documentation through conversational prompts.
🚀 Key Features
Core Drawing Operations
- Generates and executes AutoLISP code in AutoCAD LT 2024+
- Creates basic shapes (lines, circles, polylines, text)
- Handles block insertion with comprehensive attribute management
- Supports advanced geometry (arcs, ellipses, rectangles)
- Provides robust layer creation and management
- Creates hatches and dimensions for technical drawings
P&ID and Process Engineering (NEW)
- CTO Library Integration: Complete access to CAD Tools Online P&ID Symbol Library (600+ ISA 5.1-2009 standard symbols)
- Intelligent Attribute Handling: Proper block attributes for equipment schedules and valve lists
- Process Equipment: Pumps, valves, tanks, instruments, and process equipment
- Standard Annotations: Equipment tags, descriptions, and line numbers
- Layer Management: Industry-standard P&ID layer organization
Performance Optimizations
- Fast Mode: Optimized execution with minimal delays (80% speed improvement)
- Batch Operations: Create multiple objects in single operations
- Clipboard Integration: Efficient large script execution
- Smart Loading: Essential LISP files only for faster startup
📋 Prerequisites
- AutoCAD LT 2024 or newer (with AutoLISP support)
- Python 3.10 or higher
- Claude Desktop or other MCP client application
- Optional: CAD Tools Online P&ID Symbol Library (for full P&ID functionality)
🛠️ Setup Instructions
1. Install Dependencies
2. Configure Claude Desktop
For users WITH CTO Library:
For users WITHOUT CTO Library:
3. CTO Library Setup (Optional but Recommended)
If you have the CAD Tools Online P&ID Library:
- Install the CTO library to
C:\PIDv4-CTO\
- Verify the following directories exist:
C:\PIDv4-CTO\VALVES\
C:\PIDv4-CTO\EQUIPMENT\
C:\PIDv4-CTO\PUMPS-BLOWERS\
C:\PIDv4-CTO\TANKS\
- (and other standard categories)
If you DON'T have the CTO Library:
- Use
server_lisp.py
instead ofserver_lisp_fast.py
- P&ID tools will not work, but all basic drawing operations remain available
- You can still create custom blocks and use standard AutoCAD functionality
4. Start AutoCAD and Server
- Launch AutoCAD LT
- Create or open a drawing
- Ensure command line is visible
- Start the Server
- Test the Connection
🔧 Available Tools
Basic Drawing Tools
create_line
: Draw lines between pointscreate_circle
: Create circles with center and radiuscreate_text
: Add text labels with rotation supportcreate_polyline
: Create polylines from point seriescreate_rectangle
: Create rectangles from corner pointsbatch_create_lines
: Create multiple lines efficientlybatch_create_circles
: Create multiple circles efficientlybatch_create_texts
: Create multiple text entities efficiently
Block and Layer Management
insert_block
: Insert blocks with attributes and positioningset_layer_properties
: Create/modify layers with full propertiesmove_last_entity
: Move recently created entitiesupdate_block_attribute
: Modify block attributes after insertion
P&ID and Process Tools (CTO Library Required)
setup_pid_layers
: Create standard P&ID drawing layersinsert_pid_symbol
: Insert any symbol from CTO libraryinsert_pid_equipment_with_attribs
: Insert equipment with proper attributesinsert_valve_with_attributes
: Insert valves with CTO attributesinsert_equipment_tag
: Add equipment identification tagsinsert_equipment_description
: Add equipment description blocksinsert_line_number_tag
: Add process line identificationdraw_process_line
: Draw process piping between pointsconnect_equipment
: Connect equipment with orthogonal routingadd_flow_arrow
: Add directional flow indicators
Advanced Operations
create_arc
: Create arcs with center, radius, and anglescreate_ellipse
: Create ellipses with major axis and ratiocreate_mtext
: Add multiline formatted textcreate_linear_dimension
: Add linear dimensionscreate_hatch
: Add hatching to closed areaslist_pid_symbols
: List available symbols by category
📖 Usage Examples
Basic Drawing
P&ID Creation (with CTO Library)
Process Flow Creation
Batch Operations
🚧 Configuration for Users Without CTO Library
If you don't have the CAD Tools Online library, you can still use this MCP server effectively:
1. Use the Standard Server
Replace the server command with:
2. Modify P&ID Tool Calls
The following tools will not work without CTO library:
insert_pid_symbol
insert_pid_equipment_with_attribs
insert_valve_with_attributes
list_pid_symbols
3. Alternative Approaches
Instead of CTO symbols, you can:
- Use standard AutoCAD blocks
- Create simple geometric representations
- Use text labels for equipment identification
- Import your own symbol library
4. Example Alternative Usage
📁 LISP Library Structure
The server loads these LISP files for functionality:
File | Purpose | Dependencies |
---|---|---|
error_handling.lsp | Base error handling and validation | None (load first) |
basic_shapes.lsp | Core drawing functions | error_handling.lsp |
batch_operations.lsp | Batch creation tools | basic_shapes.lsp |
drafting_helpers.lsp | Block and layer management | basic_shapes.lsp |
pid_tools.lsp | P&ID specific operations | drafting_helpers.lsp |
attribute_tools.lsp | Block attribute handling | pid_tools.lsp |
advanced_geometry.lsp | Extended geometry creation | basic_shapes.lsp |
advanced_entities.lsp | Complex entity creation | advanced_geometry.lsp |
annotation_helpers.lsp | Text and dimension tools | basic_shapes.lsp |
entity_modification.lsp | Entity manipulation | drafting_helpers.lsp |
⚡ Performance Optimization
Fast Mode Benefits
- 80% faster drawing operations using batch tools
- 90% faster server initialization with essential files only
- Clipboard-based script execution for complex operations
Batch Operation Examples
Performance Settings
Adjust performance based on your system:
🔍 Troubleshooting
Common issues and solutions:
LISP Loading Issues
- Problem: "LOAD failed" errors
- Solution: Add LISP directory to AutoCAD trusted paths
- See: TROUBLESHOOTING.md
CTO Library Issues
- Problem: "File not found" for P&ID symbols
- Solution: Verify CTO installation path or use standard server
- Alternative: Use
server_lisp.py
without P&ID functionality
Window Focus Problems
- Problem: Commands not reaching AutoCAD
- Solution: Ensure AutoCAD is active, run as Administrator
- See: TROUBLESHOOTING.md
📊 What's New in This Version
Version 2.0 Features
- ✅ Complete CTO Library Integration (600+ P&ID symbols)
- ✅ Intelligent Block Attributes for equipment schedules
- ✅ Fast Mode Server with 80% performance improvement
- ✅ Batch Operations for multiple object creation
- ✅ Process Engineering Tools for P&ID creation
- ✅ Industry Standard Layers for professional drawings
- ✅ Enhanced Error Handling and troubleshooting guides
Migration from v1.0
Users of the original version should:
- Update to
server_lisp_fast.py
for better performance - Add CTO library path if available
- Review new P&ID tools for process drawings
- Update Claude Desktop configuration
📄 License
MIT License - See LICENSE file for details
🤝 Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Test with both CTO and non-CTO configurations
- Submit a pull request with clear documentation
📞 Support
- Issues: GitHub Issues
- Documentation: TROUBLESHOOTING.md
- Performance: PERFORMANCE_OPTIMIZATION.md
For detailed troubleshooting and advanced configuration, see the additional documentation files in this repository.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables natural language control of AutoCAD LT through AutoLISP code generation and execution, allowing users to create engineering drawings with conversational prompts.
Related MCP Servers
- AsecurityFlicenseAqualityAn integration that allows Cursor AI to generate images through the Draw Things API using natural language prompts.Last updated -1563JavaScript
- -securityFlicense-qualityA server that enables natural language interaction with AutoCAD through large language models like Claude, allowing users to create and modify drawings using conversational commands.Last updated -19Python
- -securityFlicense-qualityEnables Cursor AI to interact with Figma designs, allowing users to read design information and programmatically modify elements through natural language commands.Last updated -TypeScript
- -securityAlicense-qualityEnables controlling CAD software (AutoCAD, GstarCAD, ZWCAD) through natural language instructions, allowing users to create and modify drawings without manually operating the CAD interface.Last updated -53PythonMIT License