Get the FREE Ultimate OpenClaw Setup Guide →

Easy -AutoCad

这个项目是一个基于Model Context Protocol (MCP)的AutoCAD集成服务器,它允许通过自然语言与AutoCAD进行交互。通过这个服务器,用户可以使用Claude等大型语言模型来创建、修改和分析AutoCAD图纸,同时还可以存储和查询CAD元素的相关数据。目前制作参考学习,仅实现端到端之间的通信,具体工具函数尚未晚上

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zh19980811-easy-mcp-autocad python server.py \
  --env PYTHONUNBUFFERED="1"

How to use

This MCP server enables natural language interaction with AutoCAD drawings via MCP (Model Context Protocol). It exposes a set of API tools that let you create and modify drawings using plain language, and to analyze and manage drawing elements. With Claude Desktop or other MCP-compatible LLMs, you can issue high-level requests like drawing lines or circles, creating layers, annotating text, and performing element analysis, then have the server translate those requests into AutoCAD commands and update a local SQLite store of CAD elements for fast querying. The available tools include drawing primitives (line, circle, rectangle, polyline), text annotations, layer management, entity transformations (move, rotate, copy), highlighting, and SQL querying of CAD data, along with a facility to scan and persist CAD elements to storage for later retrieval.

To use it, run the MCP server and connect your LLM-enabled client (e.g., Claude Desktop) to the MCP endpoint. In the client configuration, point the mcpServers entry to your local Python server script (server.py) within the project virtual environment. Then you can issue natural language commands, and the system will map them to the corresponding API tools to manipulate your AutoCAD drawings in a scripted, automated fashion.

How to install

Prerequisites:\n- Python 3.10+ (recommended)\n- AutoCAD 2018+ with COM interface support (Windows)\n- Windows OS (for the recommended configuration)\n- Optional: Git for cloning the repository\n\nInstall steps:\n1) Clone the repository:\nbash\ngit clone https://github.com/yourusername/autocad-mcp-server.git\ncd autocad-mcp-server\n\n2) Create and activate a virtual environment:\nWindows:\nbash\npython -m venv .venv\n.\.venv\Scripts\activate\n\nmacOS / Linux:\nbash\npython -m venv .venv\nsource .venv/bin/activate\n\n3) Install dependencies:\nbash\npip install -r requirements.txt\n\n4) (Optional) Build as executable for distribution:\nbash\npyinstaller --onefile server.py\n\n5) Run the server:\nbash\npython server.py\n

Additional notes

Configuration tips:\n- If integrating with Claude Desktop, ensure your Claude config references the local Python environment and the server.py path. Example configuration points to the virtual environment’s python interpreter and the server script.\n- Use Windows-style paths or forward slashes as needed when pointing to files in the config.\n- Ensure AutoCAD is installed and accessible via COM for the server to control drawing operations.\n- The embedded SQLite store is for CAD elements; keep backups and be mindful of data size for large drawings.\n- If you encounter environment issues, verify that the virtual environment is activated and that server.py is executable from the current shell.\n- For troubleshooting, check that dependencies in requirements.txt are compatible with your Python version and that AutoCAD has the required COM interface enabled.

Related MCP Servers

Sponsor this space

Reach thousands of developers