enjicad-mcp
Can drive AutoCAD through COM or legacy transport to create and edit drawings, manage layers, blocks, and annotations, and export outputs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
enjicad-mcp
MCP server cho enjiCAD — để Claude (hoặc bất kỳ MCP client nào) vẽ và chỉnh bản vẽ trực tiếp trong enjiCAD đang mở trên Windows.
Dự án cộng đồng, không chính thức. Không liên kết với và không được CIC Technology and Consultancy JSC bảo trợ. "enjiCAD" là nhãn hiệu của chủ sở hữu tương ứng. Fork từ puran-water/autocad-mcp (MIT).
English summary at the bottom.
Cách hoạt động
Claude / MCP client ──stdio──► enjicad-mcp (Python)
│ ghi yêu cầu JSON vào C:\temp
│ gửi (mcp-dispatch-v3 "<id>") qua COM: Gcad.Application → SendCommand
▼
enjiCAD ── mcp_dispatch.lsp (tự nạp) thực thi, ghi kết quả JSONKết nối qua COM (
Gcad.Application) của enjiCAD — không giả lập bàn phím, không chiếm chuột.File LISP
mcp_dispatch.lspđược tự nạp vào từng bản vẽ ở lần gọi đầu tiên.Không có enjiCAD đang chạy → server tự chuyển sang chế độ headless (ezdxf), chỉ làm việc với file DXF.
Related MCP server: multiCAD-mcp
Yêu cầu
Windows 10/11, enjiCAD 2027 (đã thử với enjiCAD 2027 Professional). Các bản GstarCAD dùng
GStarCAD.Applicationnhiều khả năng cũng chạy nhưng chưa được kiểm tra.Python 3.10+ chạy trên Windows (không dùng Python của WSL) và uv.
enjiCAD đang mở một bản vẽ, không có hộp thoại nào đang mở, không có lệnh nào đang chạy.
Cài đặt
Claude Code — plugin (khuyên dùng: server + skill vẽ)
/plugin install enjicad-mcp --marketplace baclv609/enjicad-mcp(Claude Code cũ hơn 2.1.275: /plugin marketplace add baclv609/enjicad-mcp rồi /plugin install enjicad-mcp@enjicad-mcp.)
Plugin gồm MCP server và skill enjicad-drafting hướng dẫn Claude vẽ đúng cách: mở tab mới thay vì xóa bản vẽ, tạo layer trước, đo lại hình sau khi vẽ, undo an toàn, xử lý khi CAD đang bận. Chi tiết: plugin/README.md.
Claude Code — chỉ MCP server
claude mcp add enjicad-mcp --scope user -- uvx --from git+https://github.com/baclv609/enjicad-mcp enjicad-mcpClaude Desktop — %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"enjicad-mcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/baclv609/enjicad-mcp", "enjicad-mcp"]
}
}
}Từ mã nguồn (để phát triển)
git clone https://github.com/baclv609/enjicad-mcp.git
cd enjicad-mcp
uv sync
claude mcp add enjicad-mcp --scope user -- "$PWD\.venv\Scripts\python.exe" -m enjicad_mcpKhởi động lại Claude, mở enjiCAD với một bản vẽ, rồi thử: "Vẽ một hình chữ nhật 6000×4000 và ghi kích thước hai cạnh".
Các tool
Tool | Thao tác |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Ký hiệu P&ID — cần thư viện CTO riêng tại |
Cấu hình (biến môi trường, đều không bắt buộc)
Biến | Mặc định | Ý nghĩa |
|
|
|
|
|
|
|
| ProgID COM thử lần lượt |
|
| Từ khóa nhận diện cửa sổ CAD |
|
| Thư mục trao đổi file với LISP |
|
| Giây chờ mỗi lệnh (plot/LISP dài: |
| — | Chọn tiến trình khi mở nhiều enjiCAD cùng lúc |
Tên AUTOCAD_MCP_* của bản gốc vẫn dùng được.
Lưu ý an toàn
drawing.createmở tab mới, không đụng bản vẽ hiện tại.drawing.clearxóa toàn bộ đối tượng của bản vẽ đang mở — chỉ dùng khi thật sự muốn.Nếu enjiCAD đang chạy một lệnh hoặc có hộp thoại mở, server từ chối gửi lệnh (
AUTOCAD_COMMAND_ACTIVE/AUTOCAD_MODAL_DIALOG_OPEN) thay vì treo. Bấm Esc / đóng hộp thoại rồi thử lại.Lệnh bị hủy hoặc hết giờ để lại dấu vết trong
C:\temp\pcad-pending.json; xem bằngsystemdesktop, rồi xác nhận bằngsystemacknowledgevớirequest_id— server không tự chạy lại lệnh.drawing.undohoàn tác lần thay đổi gần nhất mà server thực hiện trong bản vẽ đang mở (bỏ qua các lệnh chỉ đọc).redochỉ dùng được ngay sauundo.execute_lispchạy AutoLISP tùy ý trong enjiCAD — chỉ nên cho phép khi bạn tin tưởng yêu cầu.
Kiểm thử
uv run pytest -q # unit test, không cần CAD
.venv\Scripts\python.exe tests\e2e\run_e2e.py # e2e: cần enjiCAD đang mởE2E khởi động server qua stdio như một MCP client thật, mở tab bản vẽ mới và chạy ~160 bước: mọi tool, đo lại hình học sau mỗi lệnh (move/rotate/fillet/chamfer/kích thước…), tiếng Việt trong text/layer/thuộc tính, lỗi đầu vào, 100 lệnh liên tiếp, gọi song song, CAD đang bận, undo/redo, xuất DWG/DXF/PDF/PNG rồi đọc lại DXF bằng ezdxf, khởi động lại server, chế độ headless — và kiểm tra bản vẽ của người dùng không bị đụng tới. Kết quả ở e2e-output\<thời gian>\e2e-report.json.
Giới hạn đã biết
Mới kiểm tra trên enjiCAD 2027 Professional (bản Trial). Khi in, enjiCAD Trial có thể hỏi thêm "Do you continue to print?";
plot_pdfdùng API in nên không bị ảnh hưởng.Các chế độ nâng cao của bản gốc —
systemjob(tự mở AutoCAD LT),worker,revision— được viết cho AutoCAD LT và chưa được chuyển sang enjiCAD. Xem docs/UPSTREAM-README.md.pidcần thư viện ký hiệu CTO bên ngoài.
Đóng góp
Issue và pull request đều được chào đón. Trước khi gửi PR: uv run pytest -q, uv run ruff check src, và chạy e2e nếu bạn có enjiCAD.
English summary
enjicad-mcp is an unofficial MCP server that lets Claude and other MCP clients drive a running enjiCAD (GstarCAD-based CAD) on Windows. Commands are delivered through enjiCAD's COM API (Gcad.Application → Document.SendCommand) and executed by an auto-loaded AutoLISP dispatcher that exchanges JSON files with the server; without a running CAD it falls back to headless ezdxf. Install as a Claude Code plugin (/plugin install enjicad-mcp --marketplace baclv609/enjicad-mcp, which adds the server and an enjicad-drafting skill) or as a plain MCP server with uvx --from git+https://github.com/baclv609/enjicad-mcp enjicad-mcp. Fork of puran-water/autocad-mcp, MIT licensed. Not affiliated with CIC Technology and Consultancy JSC.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
- AutoMEPDeprecatedapp.automep
Edit AutoCAD and Revit MEP drawings from Claude or ChatGPT in plain English.
Headless CAD engine & MCP server for 2D/3D drafting, solids, DXF/SVG export, and automation.
Read, query, edit and render DWG drawings with AI. No AutoCAD required.
Global CAD/BIM, industrial engineering (FEM, CFD) and property tools via one MCP endpoint.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude Web to control a local AutoCAD instance via MCP, exposing 149 tools for CAD operations with dual COM/ezdxf backend support.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants like Claude for Desktop or Cursor to control supported CAD applications through MCP, supporting drawing, layer and entity management, block operations, data export, and file/session control via natural language or unified tool calls.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants like Claude for Desktop or Cursor to control Windows CAD applications (AutoCAD, ZWCAD, GstarCAD, BricsCAD) through natural-language instructions, exposing unified MCP tools for drawing, layers, blocks, entities, properties, data export, and file management.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants such as Claude for Desktop or Cursor to drive Windows CAD applications (AutoCAD, ZWCAD, GstarCAD, BricsCAD) through natural-language or direct tool calls. It supports drawing shapes, managing layers, blocks and entities, extracting or exporting data, and saving drawings via a set of unified MCP tools.-