multiCAD-mcp

multiCAD-mcp

Controls CAD applications (AutoCAD, ZWCAD, etc.) via AI assistants through the Model Context Protocol, enabling drawing, layer management, and automation through natural language or direct tool calls.

Category
Visit Server

README

multiCAD-mcp

Control your CAD applications with your AI assistant through the Model Context Protocol (MCP).

Documentation License Python MCP

Documentation: https://AnCode666.github.io/multiCAD-mcp/

What is multiCAD-mcp?

multiCAD-mcp is an MCP server that lets you control your CAD software using AI assistants like Claude for desktop or Cursor. Whether you're drawing shapes, managing layers, automating repetitive tasks, o doing complex ones, you can do it all through text-based instructions.

Features

  • Multiple CAD Support: Works with AutoCAD®, ZWCAD®, GstarCAD®, and BricsCAD®
  • 7 Unified MCP Tools: Clean access to 55 CAD commands for drawing, layers, entities, blocks, and files
  • Block Attributes (v0.2.0+): Read and write block attribute values
  • Block Creation: Create blocks from entities or user selection
  • Simple command execution: "Draw a red circle at 50,50 with radius 25" - no complex syntax needed
  • Complex tasks execution: "Draw the graph of y = sen(X) and label the axes"
  • Simple Integration: Works with Claude, Cursor, VS Code, and any MCP-compatible client
  • Fast & Reliable: Efficient COM-based architecture for real-time CAD control
  • Flexible: Direct tool calls or natural language - choose what works for you

System Requirements

  • Windows OS (required - uses Windows COM technology)
  • Python 3.10 or higher
  • One or more CAD applications installed in your computer

Installation

Detailed installation instructions are available in docs/01-SETUP.md.

Quick start:

# Install uv (if not installed)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# Clone
git clone https://github.com/AnCode666/multiCAD-mcp.git
cd multiCAD-mcp
uv sync --dev
uv run python -m pip install --upgrade pywin32

Setup with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "multiCAD": {
      "command": "C:\\path\\to\\multiCAD-mcp\\.venv\\Scripts\\python.exe",
      "args": ["C:\\path\\to\\multiCAD-mcp\\src\\server.py"]
    }
  }
}

Important: Use the full path to the Python interpreter in your virtual environment (.venv\Scripts\python.exe), not the system py command. This ensures Claude Desktop uses the correct Python environment with all required dependencies installed.

Replace C:\path\to\multiCAD-mcp with your actual installation path.

Usage Examples

Direct Tool Calls

multiCAD-mcp provides 7 unified MCP tools that provide access to 54 different CAD commands. This architecture is designed for high efficiency, allowing multiple operations to be dispatched in single calls, reducing API overhead by up to 70%.

  • Drawing & Shapes: Lines, circles, arcs, rectangles, polylines, and splines.
  • Block Management: Create blocks (from entities or selection), insert (batch/single), list, and audit.
  • Layer Management: Create, list, rename/delete (batch), and toggle visibility.
  • Entity Manipulation: Move, rotate, scale, copy/paste, and selection (by type/layer/color).
  • Property Management: Change color/layer (batch/single) and set color ByLayer.
  • Data & Export: Extract data (JSON), export to Excel (total or selected), and entity debug.
  • View & Navigation: Zoom extents, fit view, and undo/redo operations.
  • Files & Session: Save (DWG/DXF/PDF), new/close drawings, and multi-drawing switching.
  • Connection & Control: Connection lifecycle, diagnostics, and natural language fallback.

[!TIP] Each tool accepts multiple operations in a single call using a compact shorthand format, reducing API overhead by up to 70%.

Selected Entity Export

Export or extract data from only the entities currently selected in your CAD viewport:

# Export selected entities to Excel
export_data(scope="selected", format="excel", filename="selected_entities.xlsx")

# Extract selected entity data as JSON
export_data(scope="selected", format="json")

Complex Tasks

You can ask your AI assistant to execute complex tasks that require multiple tools, such as drawing graphs of equations, complex title blocks, or data tables.

Configuration

Edit src/config.json to customize:

{
  "logging_level": "INFO",
  "cad": {
    "autocad": {
      "startup_wait_time": 20,
      "command_delay": 0.5
    }
  },
  "dashboard": {
    "port": 8888
  },
  "output": {
    "directory": "~/Documents/multiCAD Exports"
  }
}

Key settings:

  • logging_level: Set to DEBUG, INFO, WARNING, or ERROR to control log verbosity
  • startup_wait_time: Seconds to wait for CAD application to start (increase if CAD is slow)
  • command_delay: Delay between commands in seconds
  • dashboard.port: Web dashboard port (default: 8888)
  • open_dashboard: [host, port] — open web dashboard in browser (default from config.json: 8888)
  • output.directory: Default directory for saved drawings and exports

Troubleshooting

Checking Logs

multiCAD-mcp generates detailed logs to help diagnose issues:

Log Location: logs/multicad_mcp.log (created automatically in the project's logs/ directory)

View logs:

# View latest 50 log entries
Get-Content logs/multicad_mcp.log -Tail 50

# View all logs
Get-Content logs/multicad_mcp.log

# Monitor logs in real-time (updates automatically)
Get-Content logs/multicad_mcp.log -Wait -Tail 10

Adjust log level in src/config.json:

{
  "logging_level": "DEBUG"
}

Available levels (from most to least verbose):

  • DEBUG: Detailed information for diagnosing problems
  • INFO: General informational messages (default)
  • WARNING: Warning messages for potential issues
  • ERROR: Error messages only

Note: Restart the MCP server after changing configuration.

"Connection failed"

  • Make sure your CAD application is running
  • Check that you have the correct version installed
  • Verify Windows COM is properly configured
  • Use manage_session with {"action": "status"} to diagnose the issue
  • Check logs for detailed error messages (see above)

The dashboard provides a real-time view of the CAD state. You can manually refresh the data using the "Refresh Now" button.

  • Dashboard Port: Change dashboard.port in src/config.json to your preferred port.
  • Manual Refresh: Click the refresh button to sync with current CAD state.

"Not connected"

  • The server automatically connects on first use
  • If it fails, restart the CAD application and try again
  • Use manage_session with {"action": "connect"} to re-establish connection
  • Review logs to identify connection issues

Commands not working

  • Check your CAD application's command line for messages or errors
  • Ensure coordinates are in valid format (e.g., "0,0" for 2D, "0,0,0" for 3D)
  • Verify connection status with manage_session{"action": "status"}
  • Enable DEBUG logging to see detailed command execution information

Documentation

Supported CAD Applications

Application Status Notes
AutoCAD 2018+ ✅ Full Support Primary implementation
ZWCAD 2020+ ✅ Full Support Uses AutoCAD-compatible API
GstarCAD 2020+ ✅ Full Support Uses AutoCAD-compatible API
BricsCAD 21+ ✅ Full Support Uses AutoCAD-compatible API

Project Status

Version 0.2.0 - Unified tool architecture, block attribute management, and modern packaging.

License

Apache License 2.0 - see LICENSE file for details.

Acknowledgments

This project builds upon:

Support

For issues, questions, or feature requests, please open an issue on the repository.


Need help setting up? Start with the installation steps above.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured