Skip to main content
Glama

CAD MCP Server / CAD MCP 服务

文档 / Documentation: 简体中文 | English

中文和英文独立文档包含安装配置、AutoCAD 接管、使用示例、测试及故障排查。 The standalone guides cover setup, AutoCAD attachment, examples, testing, and troubleshooting.

TypeScript-based CAD server for the Model Context Protocol (MCP).
基于 TypeScript 的 Model Context Protocol (MCP) CAD 服务。

It exposes tools, resources, and prompts over stdio so an MCP client can work with CAD, lightweight GIS, and resource/environment research workflows.
它通过 stdio 暴露 tools、resources 和 prompts,使 MCP 客户端可以处理 CAD、轻量 GIS 以及资源环境研究工作流。

Status / 当前状态

This repository is still an MVP-style CAD service, but it now includes:
这个仓库仍然属于 MVP 风格的 CAD 服务,但目前已经包含:

  • broad 2D and lightweight 3D tool coverage
    较广的 2D 与轻量 3D 工具覆盖

  • PNG preview rendering through sharp, with SVG fallback
    通过 sharp 生成 PNG 预览,并提供 SVG 回退

  • OpenCascade runtime status reporting
    OpenCascade 运行时状态报告

  • a Node-compatible OpenCascade fallback loader for opencascade.js
    兼容 Node 的 opencascade.js 回退加载器

  • direct AutoCAD integration tools on Windows
    Windows 平台下的 AutoCAD 直接集成工具

  • GIS/georeference helpers for research mapping workflows
    面向研究制图工作流的 GIS / 地理参考辅助能力

  • CSV / GeoJSON / Shapefile interchange support
    CSV / GeoJSON / Shapefile 互操作支持

  • resource/environment domain tools for sampling points, monitoring wells, profile lines, and boundary polygons
    面向资源环境场景的采样点、监测井、剖面线、边界面领域工具

  • thesis/map layout helpers and drawing templates
    论文 / 地图版式辅助工具与模板

Related MCP server: AutoCAD MCP Server - Codex Edition

Features / 功能

Internal CAD Session / 内部 CAD 会话

  • 2D entities: point, line, circle, arc, rectangle, polygon, polyline
    2D 实体:点、线、圆、圆弧、矩形、多边形、折线

  • layers: create, rename, delete, visibility, lock, color
    图层:创建、重命名、删除、显隐、锁定、颜色

  • modify tools: translate, rotate, mirror, offset, trim, extend, array
    修改工具:平移、旋转、镜像、偏移、修剪、延伸、阵列

  • constraints, annotations, assemblies, drawings, and analysis helpers
    约束、标注、装配、图纸与分析辅助

  • transactions and undo/redo
    事务与撤销 / 重做

  • JSON project save/load
    JSON 项目保存 / 加载

GIS And Research Workflow / GIS 与研究工作流

  • project CRS, origin, extent, and drawing scale metadata
    项目 CRS、原点、范围与绘图比例元数据

  • CSV import for sampling points and field observations
    面向采样点和外业观测的 CSV 导入

  • GeoJSON import/export for point, line, and polygon data
    点、线、面 GeoJSON 导入 / 导出

  • Shapefile import/export for 2D GIS exchange
    用于二维 GIS 交换的 Shapefile 导入 / 导出

  • domain tools for:

    • sampling points
      采样点

    • monitoring wells
      监测井

    • profile lines
      剖面线

    • boundary polygons
      边界面

  • terrain/research helpers for:

    • polygon area statistics
      面域统计

    • profile length and section sampling
      剖面长度与断面采样

    • simplified cut/fill estimates
      简化挖填方估算

    • simplified grid surface volume estimates
      简化格网表面体积估算

File And Preview Support / 文件与预览支持

  • DXF import and export
    DXF 导入 / 导出

  • SVG, PDF-underlay, STEP-like, STL-like, OBJ-like, IGES-like, and GLTF-like workflows
    SVG、PDF-underlay、STEP-like、STL-like、OBJ-like、IGES-like 与 GLTF-like 工作流

  • preview generation as SVG or PNG
    生成 SVG 或 PNG 预览

OpenCascade Integration / OpenCascade 集成

  • reports whether the runtime backend is using mock geometry or OpenCascade
    报告当前运行时后端使用 mock geometry 还是 OpenCascade

  • includes a compatibility fallback for environments where opencascade.js package-root loading fails under modern Node ESM runtimes
    在现代 Node ESM 环境中 opencascade.js 包根加载失败时提供兼容回退

AutoCAD Integration / AutoCAD 集成

On Windows, the server can inspect and bind to a running AutoCAD application through COM, then read or submit commands to its live document:
在 Windows 平台上,服务可以通过 COM 检查并绑定正在运行的 AutoCAD 窗口,然后读取真实文档或向文档提交命令:

  • autocad_status

  • autocad_list_documents

  • autocad_attach

  • autocad_detach

  • autocad_activate_document

  • autocad_get_variables

  • autocad_list_layers

  • autocad_list_modelspace_entities

  • autocad_send_command

Start with autocad_list_documents to obtain the COM-reachable application window handles and open document names/paths, then call autocad_attach with the target decimal windowHandle and document. activate defaults to true, activating the selected document; false establishes the binding without activating it. autocad_status reports the live target and binding. Subsequent commands reject if the bound document is no longer active; use autocad_activate_document to switch deliberately. autocad_detach clears the binding without closing AutoCAD or its documents.
先调用 autocad_list_documents 获取 COM 可访问的窗口句柄与已打开文档,再用 autocad_attach 的十进制 windowHandle 和 document 绑定目标。activate 默认 true,会激活选中文档;设为 false 时只建立绑定,不激活文档。autocad_status 返回实时目标与绑定状态。若用户切换了活动文档,后续命令会拒绝发送;需要切换时调用 autocad_activate_document。autocad_detach 只解除绑定,不关闭 AutoCAD 或文档。

autocad_send_command submits a command once. Its default waitForIdle: false reports submitted; waitForIdle: true can report idle_observed after observing AutoCAD idle, or timeout when that observation deadline expires. A timeout result is an MCP error that preserves the command observations. These states do not prove the intended effect. timeoutMs (1000–30000 ms) bounds idle polling after the COM SendCommand call returns; a separate 45-second bridge timeout bounds blocking COM calls. Verify geometry or system variables afterward. After an error or timeout, do not resend before inspecting the drawing and command state. Busy documents reject command submission.
autocad_send_command 只提交一次命令。默认 waitForIdle: false 返回 submitted;设为 true 后,观察到空闲时返回 idle_observed,轮询到期仍未观察到空闲则返回 timeout。timeout 会标记为 MCP 错误并保留命令状态数据。这些状态都不代表绘图结果正确。timeoutMs(1000–30000 毫秒)只限制 COM SendCommand 返回后的空闲轮询;阻塞中的 COM 调用由独立的 45 秒桥接超时限制。应继续查询实体或系统变量核验。发生错误或超时后,必须先检查图纸与命令状态,再决定是否重发。文档忙碌时会拒绝提交命令。

COM discovery cannot guarantee access to every process when several instances of the same AutoCAD version are running. A requested window that is unreachable fails explicitly instead of silently using another window. This is document automation, not general mouse/keyboard or screenshot control of every CAD product.
同时运行同版本的多个 AutoCAD 进程时,COM 不保证能访问所有窗口。指定窗口不可达时会明确失败,不会自动改用其他窗口。这是 AutoCAD 文档自动化,不是对所有 CAD 软件的通用鼠标、键盘或截图接管。

This workflow is separate from the internal in-memory CAD session.
这套工作流与内部内存中的 CAD 会话相互独立。

Drawing And Thesis Layout / 出图与论文版式

  • map layout creation
    地图版式创建

  • north arrow, scale bar, legend, coordinate grid
    指北针、比例尺、图例、坐标格网

  • thesis templates such as A3 map and A4 figure layouts
    论文模板,例如 A3 地图版式和 A4 图版式

  • batch SVG/PDF generation for drawings
    图纸批量生成 SVG / PDF

Requirements / 环境要求

  • Node.js 18+

  • npm

  • Windows for AutoCAD COM integration
    AutoCAD COM 集成需要 Windows

  • AutoCAD running locally if you want to use the autocad_* tools
    如果要使用 autocad_* 工具,需要本地运行中的 AutoCAD

Node 20+ is recommended.
推荐使用 Node 20+。

Install / 安装

npm install

Build / 构建

npm run build

Windows PowerShell note: if npm.ps1 is blocked by execution policy, use npm.cmd run build.

Test / 测试

npm test

Windows PowerShell note: if npm.ps1 is blocked by execution policy, use npm.cmd test.

Run / 运行

The MCP host should launch this server over stdio.
MCP Host 应通过 stdio 启动此服务。

npm start

Equivalent / 等价命令:

node dist/index.js

MCP Configuration / MCP 配置

Example configuration / 配置示例:

{
  "mcpServers": {
    "cad-mcp-server": {
      "command": "node",
      "args": ["${workspaceFolder}/dist/index.js"],
      "cwd": "${workspaceFolder}"
    }
  }
}

After rebuilding the server, restart or reload your MCP host so new tools are picked up.
重新构建服务后,请重启或重新加载 MCP Host,以便识别新增工具。

Use mcp.config.example.json as the portable template. For a new checkout, copy it to mcp.config.json before running the repository's verification scripts:
mcp.config.example.json 是可移植模板。在新 checkout 中运行仓库验证脚本前,先复制为本机配置 mcp.config.json:

Copy-Item -LiteralPath mcp.config.example.json -Destination mcp.config.json

Replace both literal ${workspaceFolder} placeholders in the copied file with the absolute checkout directory containing package.json. Use forward slashes in JSON paths, or escape backslashes. The verification scripts read this JSON directly and do not expand ${workspaceFolder}. args must point to this checkout's built dist/index.js, and cwd must point to the checkout directory.
将复制文件中的两处字面量 ${workspaceFolder} 替换为包含 package.json 的 checkout 绝对目录。JSON 路径可使用正斜杠,或对反斜杠进行转义。验证脚本直接读取 JSON,不会展开 ${workspaceFolder}。args 应指向当前 checkout 构建后的 dist/index.js,cwd 应指向该 checkout 目录。

The local mcp.config.json, generated verification output under tmp/, and workstation task notes in BUILD_GOAL.md are ignored by Git. Keep the portable example in source control.
本机 mcp.config.json、tmp/ 下的验证产物和 BUILD_GOAL.md 中的工作站任务说明均由 Git 忽略;源码中保留可移植配置示例。

Codex Skill / Codex Skill

This repository includes a repo-local Codex skill at skills/cad-mcp/SKILL.md. 本仓库包含一个项目内 Codex skill:skills/cad-mcp/SKILL.md。

The skill summarizes safe operating patterns for this MCP server, including startup checks, internal CAD session workflows, AutoCAD COM caveats, DWG/DXF handling, GIS/research mapping workflows, and grouped tool references under skills/cad-mcp/references/. 该 skill 汇总了本 MCP 服务的安全使用方式,包括启动检查、内部 CAD 会话流程、AutoCAD COM 注意事项、DWG/DXF 处理、GIS/研究制图流程,以及 skills/cad-mcp/references/ 下的工具分组参考。

Main Tool Groups / 主要工具分组

  • geometry creation and editing / 几何创建与编辑

  • layer management / 图层管理

  • query and measurement tools / 查询与测量工具

  • assembly and drawing tools / 装配与图纸工具

  • topology and boolean tools / 拓扑与布尔工具

  • project file tools / 项目文件工具

  • GIS and georeference tools / GIS 与地理参考工具

  • field survey / resource-environment tools / 外业调查与资源环境领域工具

  • terrain / section / cut-fill analysis tools / 地形、断面与挖填方分析工具

  • AutoCAD bridge tools / AutoCAD 桥接工具

Project File Format / 项目文件格式

Saved project files use / 保存的项目文件包含:

  • format: cad-mcp-project

  • formatVersion: 1

  • savedAt: ISO 8601 string

  • snapshot: serialized session snapshot

  • scene.crs: project CRS metadata

  • scene.origin: local/world origin metadata

  • scene.extent: working extent metadata

  • scene.drawingScale: drawing-to-world scale metadata

Available Research-Focused Capabilities / 面向资源环境研究的现有能力

The current implementation already supports a usable lightweight workflow for resource/environment graduate students:
当前实现已经支持一条可用的轻量级资源环境研究工作流:

  1. import sampling points from CSV
    从 CSV 导入采样点

  2. import boundaries / profile lines / regions from GeoJSON or Shapefile
    从 GeoJSON 或 Shapefile 导入边界、剖面线和分区

  3. assign georeference metadata
    设置地理参考元数据

  4. create map layouts and thesis-style figures
    创建地图版式和论文风格图件

  5. compute area / profile / cut-fill style simplified analyses
    进行面积、剖面、简化挖填方等分析

  6. export figures and GIS data
    导出图件和 GIS 数据

Repository Additions / 仓库新增内容

  • src/core/OpenCascadeAdapter.ts: OpenCascade runtime loader and compatibility fallback
    OpenCascade 运行时加载器与兼容回退

  • src/integrations/AutoCadComBridge.ts: Windows COM bridge for live AutoCAD access
    Windows COM AutoCAD 实时桥接

  • src/tools/autocadTools.ts: MCP tool registration for AutoCAD operations
    AutoCAD MCP 工具注册

  • src/tools/gisTools.ts: project georeference tools
    项目地理参考工具

  • src/tools/gisIoTools.ts: CSV / GeoJSON / Shapefile IO tools
    CSV / GeoJSON / Shapefile IO 工具

  • src/tools/fieldSurveyTools.ts: domain tools for resource/environment workflows
    资源环境工作流领域工具

  • src/tools/terrainAnalysisTools.ts: terrain / profile / cut-fill style analysis tools
    地形 / 剖面 / 挖填方分析工具

  • src/tools/mapDrawingTools.ts: map/thesis layout and batch export tools
    地图 / 论文版式与批量导出工具

  • src/resources/templates.ts: drawing template resource loader
    图纸模板资源加载器

  • src/parsers/CsvParser.ts: CSV point import parser
    CSV 点导入解析器

  • src/parsers/GeoJsonParser.ts: GeoJSON parser / exporter
    GeoJSON 解析与导出器

  • src/parsers/ShapefileParser.ts: Shapefile parser / exporter bridge
    Shapefile 解析与导出桥接

  • assets/templates/thesis-a3-map.json: thesis map layout template
    论文地图版式模板

  • assets/templates/thesis-a4-figure.json: thesis figure layout template
    论文图模板

Limitations / 当前限制

  • DWG import is fully wired through LibreDWG's dwg2dxf (verified end-to-end on real R14 fixtures: LINE / CIRCLE / LWPOLYLINE / ARC are imported into the session)
    DWG 导入已经通过 LibreDWG 的 dwg2dxf 完整接通,已用真实 R14 文件端到端验证(LINE / CIRCLE / LWPOLYLINE / ARC 可以导入到会话)

  • DWG export wires dxf2dwg and writes a DWG to disk, but the internal minimal DXF emitter is currently rejected by LibreDWG's strict DXF parser; the binary path is in place and dwg_tools_status reports availability, but a full R14-compliant DXF skeleton (HEADER + 9 tables + BLOCKS + OBJECTS) is still required for round-trip-safe export. Until then, prefer export_dxf and convert externally
    DWG 导出已接 dxf2dwg 并落盘 DWG,但当前内置 DXF 输出过于精简,会被 LibreDWG 严格解析器拒收;二进制链路已就位且 dwg_tools_status 可用,但要真正可 round-trip,还需要一个完整 R14 DXF 骨架(HEADER + 9 张表 + BLOCKS + OBJECTS)。在此之前建议使用 export_dxf 并在外部转换

  • direct AutoCAD integration currently targets running local AutoCAD through COM on Windows
    直接 AutoCAD 集成当前仍然面向 Windows 本地 COM

  • AutoCAD COM automation can be sensitive to Windows privilege/integrity level. Run the MCP host at the same privilege level as the AutoCAD process, and call autocad_status before list or command tools
    AutoCAD COM 自动化可能受 Windows 权限/完整性级别影响。请让 MCP Host 与 AutoCAD 进程使用相同权限级别,并在列表或命令工具前先调用 autocad_status

  • some DXF entity types and advanced polyline bulge cases still have limited support
    某些 DXF 实体类型和高级 polyline bulge 场景支持仍有限

  • the internal CAD session and the live AutoCAD bridge are related but distinct workflows
    内部 CAD 会话与实时 AutoCAD 桥接是相关但独立的两套工作流

  • georeference now includes a real proj4-backed reprojection engine (reproject_point, reproject_points); the legacy transform_coords flow remains metadata-driven for local/world conversion only
    地理参考现在包含基于 proj4 的真实投影引擎(reproject_point / reproject_points),旧的 transform_coords 仍仅用于元数据驱动的局部/世界坐标转换

  • raster (GeoTIFF) support is currently single-image basemap oriented; large mosaic / tile workflows are not yet bundled
    栅格 / GeoTIFF 支持当前面向单幅底图,尚未内置大范围镶嵌或瓦片工作流

  • terrain and cut/fill calculations are simplified research helpers rather than survey-grade engineering calculations
    当前地形和挖填方计算属于简化研究辅助能力,不是测量级工程计算

License / 许可证

ISC

Available Tools

225 tools
add_aligned_dimensionD

Add an aligned dimension annotation.

Inputs: p1 (required), p2 (required), offset (required).

add_angular_dimensionC

Add an angular dimension annotation.

Inputs: p1 (required), p2 (required), vertex (required).

add_auxiliary_viewD

Add a add_auxiliary_view to a drawing.

Inputs: drawing_id (required), scale, center, cut_line, +5 more.

add_baseline_dimensionD

Add baseline dimensions.

Inputs: points (required), baseline (required).

add_center_lineD

Add symbol annotation add_center_line.

Inputs: datum, symbol, options, entities, +4 more.

add_center_markD

Add symbol annotation add_center_mark.

Inputs: datum, symbol, options, entities, +4 more.

add_componentC

Add a component reference to an assembly.

Inputs: position (required), assembly_id (required), file_path_or_id (required), rotation.

add_constraint_coincidentD

Add a coincident constraint.

Inputs: point_a (required), point_b (required), entity_a (required), entity_b (required).

add_constraint_concentricD

Add a concentric constraint.

Inputs: circle_a (required), circle_b (required).

add_constraint_equalD

Add a equal constraint.

Inputs: entity_a (required), entity_b (required).

add_constraint_fixedC

Add a fixed constraint.

Inputs: entity_id (required).

add_constraint_horizontalC

Add a horizontal constraint.

Inputs: line_id (required).

add_constraint_midpointD

Add a midpoint constraint.

Inputs: line_id (required), point_id (required).

add_constraint_parallelD

Add a parallel constraint.

Inputs: line_a (required), line_b (required).

add_constraint_perpendicularD

Add a perpendicular constraint.

Inputs: line_a (required), line_b (required).

add_constraint_symmetricD

Add a symmetric constraint.

Inputs: axis (required), entity_a (required), entity_b (required).

add_constraint_tangentD

Add a tangent constraint.

Inputs: entity_a (required), entity_b (required).

add_constraint_verticalC

Add a vertical constraint.

Inputs: line_id (required).

add_continued_dimensionD

Add continued dimensions.

Inputs: points (required).

add_coordinate_gridC

Add a coordinate grid using the provided extent and spacing.

Inputs: spacing (required), drawing_id (required), layer, extent.

add_detail_viewD

Add a add_detail_view to a drawing.

Inputs: drawing_id (required), scale, center, cut_line, +5 more.

add_diameter_dimensionC

Add a diameter dimension.

Inputs: circle_id (required), leader_point (required).

add_dimension_angularD

Add a dimension_angular constraint.

Inputs: value (required), line_a (required), line_b (required).

add_dimension_diameterD

Add a dimension_diameter constraint.

Inputs: value (required), circle_id (required).

add_dimension_linearD

Add a dimension_linear constraint.

Inputs: value (required), point_a (required), point_b (required), label.

add_dimension_radialD

Add a dimension_radial constraint.

Inputs: value (required), circle_id (required).

add_explode_stepC

Add an explode step to an exploded view.

Inputs: view_id (required), distance (required), direction (required), assembly_id (required), +1 more.

add_gdt_frameD

Add symbol annotation add_gdt_frame.

Inputs: datum, symbol, options, entities, +4 more.

add_leaderC

Add a leader annotation.

Inputs: points (required), style, content, annotation.

add_legendC

Add a simple map legend annotation listing domain layers or categories.

Inputs: items (required), position (required), drawing_id (required), layer, +1 more.

add_linear_dimensionC

Add a linear dimension annotation.

Inputs: p1 (required), p2 (required), offset (required), style.

add_mtextC

Add a multi-line text annotation.

Inputs: width (required), height (required), content (required), position (required), +1 more.

add_multileaderC

Add a multileader annotation.

Inputs: points (required), style, content, annotation.

add_north_arrowC

Add a north arrow symbol annotation for a map drawing.

Inputs: position (required), drawing_id (required), size, layer.

add_ordinate_dimensionC

Add an ordinate dimension.

Inputs: axis (required), point (required), datum_point (required).

add_radius_dimensionD

Add a radius dimension.

Inputs: arc_id (required), leader_point (required).

add_scale_barC

Add a simple scale bar annotation to a map drawing.

Inputs: position (required), drawing_id (required), segment_length (required), label, +2 more.

add_section_viewD

Add a add_section_view to a drawing.

Inputs: drawing_id (required), scale, center, cut_line, +5 more.

add_surface_finish_symbolD

Add symbol annotation add_surface_finish_symbol.

Inputs: datum, symbol, options, entities, +4 more.

add_textC

Add a single-line text annotation.

Inputs: height (required), content (required), position (required), style, +1 more.

add_viewD

Add a add_view to a drawing.

Inputs: drawing_id (required), scale, center, cut_line, +5 more.

add_weld_symbolD

Add symbol annotation add_weld_symbol.

Inputs: datum, symbol, options, entities, +4 more.

animate_explodeC

Return a simple explode animation plan.

Inputs: view_id (required), assembly_id (required), fps.

apply_thesis_templateC

Apply a stored thesis/map template to an existing drawing and persist layout/export metadata.

Inputs: drawing_id (required), template_name (required), title, figure_no.

array_polarC

Create polar array copies around a center. Angle is in radians and includes the source entity.

Inputs: count (required), center (required), entity_ids (required), unit, +1 more.

array_rectangularC

Create rectangular array copies using row and column spacing in the current units.

Inputs: dx (required), dy (required), cols (required), rows (required), +2 more.

attach_raster_layerB

Attach a GeoTIFF on disk to the session as a raster basemap layer. Returns the assigned layer id and parsed metadata. Use list_raster_layers / render_raster_layer_png afterwards.

Inputs: path (required), id, name, visible.

autocad_activate_documentA

Activate an already-open AutoCAD document by its exact name or full path and update the binding to that document. Does not open files. Use autocad_list_documents to identify the target.

Inputs: document (required).

autocad_attachA

Bind this MCP server to a COM-reachable AutoCAD application window/process and document. Use a decimal windowHandle and document name/full path returned by status/list calls; omit them to select the current target. activate defaults to true and activates the selected document; false only establishes the binding without activating it. Later commands reject if the bound document is no longer active. COM may not expose every same-version AutoCAD process.

Inputs: activate, document, windowHandle.

autocad_detachA

Clear this MCP server's AutoCAD binding. Does not close AutoCAD, close a document, or discard drawing changes.

Inputs: no named parameters.

autocad_get_variablesA

Read 1–50 AutoCAD system variables from the live document, for example CMDACTIVE, CMDNAMES, CLAYER or INSUNITS. Use readback to verify command effects; an idle state alone does not prove command success.

Inputs: names (required).

autocad_list_documentsA

List COM-reachable AutoCAD applications and their open documents. Returns data.applications and data.documents with window/process identity for target selection. COM may not expose every same-version AutoCAD process.

Inputs: no named parameters.

autocad_list_layersB

List layers from the live AutoCAD document through COM, respecting the current application/document binding. Separate from the internal CAD session's list_layers.

Inputs: limit.

autocad_list_modelspace_entitiesA

List entities from the live AutoCAD document's ModelSpace, respecting the current binding. Optional filters: layer, objectName, limit. Separate from the internal CAD session's list_entities.

Inputs: layer, limit, objectName.

autocad_send_commandA

Submit a raw command to the live AutoCAD document. Rejects a busy document or a bound document that is no longer active. Example: _.ZOOM _E. waitForIdle defaults to false; true polls for idle for timeoutMs (1000–30000 ms) after the COM SendCommand call returns. A separate 45-second bridge timeout bounds blocking COM calls. Result state is submitted, idle_observed or timeout; none proves semantic command success. timeout is an MCP error with result data. Query intended results afterward. Submission is not retried; after an error or timeout do not resend before inspecting the drawing.

Inputs: command (required), timeoutMs, waitForIdle.

autocad_statusA

Inspect a running AutoCAD application through COM: window/process identity, current binding, active document and idle state. This does not establish a persistent binding or operate on the internal CAD session.

Inputs: no named parameters.

batch_generate_pdfC

Generate summary PDF files for one or more drawings and write them into an output directory.

Inputs: output_dir (required), drawing_ids (required).

batch_generate_svgC

Generate SVG files for one or more drawings and write them into an output directory.

Inputs: output_dir (required), drawing_ids (required).

begin_transactionA

Start a nested editing transaction; pair with commit_transaction or rollback_transaction.

Inputs: no named parameters.

boolean_intersectC

intersect two 3D solids and return a simplified composite result.

Inputs: solid_id_a (required), solid_id_b (required).

boolean_subtractC

subtract two 3D solids and return a simplified composite result.

Inputs: solid_id_a (required), solid_id_b (required).

boolean_unionC

union two 3D solids and return a simplified composite result.

Inputs: solid_id_a (required), solid_id_b (required).

chamfer_2dC

Create a simple chamfer line between two lines.

Inputs: dist1 (required), dist2 (required), line_id_a (required), line_id_b (required), +1 more.

chamfer_3dC

Create a simplified chamfered copy of a solid.

Inputs: angle, guides, radius, path_id, +9 more.

check_clearanceC

Check if minimum distance meets a clearance threshold. Accepts entity ids or assembly component ids; use assembly_id to scope component lookup.

Inputs: component_a (required), component_b (required), min_clearance (required), assembly_id.

check_interferenceC

Check component interference using transformed component bounding boxes.

Inputs: assembly_id (required), tolerance.

commit_transactionA

Commit the innermost active transaction.

Inputs: no named parameters.

compute_cut_fill_volumeC

Estimate cut/fill volume inside a polygon from enclosed elevated sample points and a base elevation.

Inputs: boundary_id (required), base_elevation (required), sample_point_ids.

compute_grid_surface_volumeC

Estimate surface volume from elevated point samples and a representative cell area.

Inputs: cell_area (required), base_elevation (required), sample_point_ids.

compute_section_areaC

Sample elevated points along a profile line and compute the section area against a baseline elevation.

Inputs: profile_line_id (required), baseline_elevation (required), max_offset, sample_point_ids.

create_arcA

Create a circular arc: centre (cx,cy), radius, startAngle and endAngle in radians (counterclockwise from +X; mathematical Y-up). Radius uses unit (default mm). Stored as coords [cx,cy,r,startAngle,endAngle] in mm.

Inputs: cx (required), cy (required), radius (required), endAngle (required), +3 more.

create_assemblyC

Create an empty assembly.

Inputs: name (required).

create_blockC

Create a block definition from entity ids.

Inputs: name (required), entities (required), base_point (required).

create_boundary_polygonC

Create a study boundary or management zone polygon with domain metadata.

Inputs: points (required), name, unit, layer, +1 more.

create_boxC

Create a box solid at origin with width, height, and depth.

Inputs: depth (required), width (required), height (required), x, +4 more.

create_circleC

Create a circle with centre (cx,cy) and radius. Lengths use unit (default mm).

Inputs: cx (required), cy (required), radius (required), unit, +1 more.

create_coneC

Create a frustum or cone solid.

Inputs: height (required), topRadius (required), bottomRadius (required), cx, +4 more.

create_cylinderC

Create a vertical cylinder solid.

Inputs: height (required), radius (required), cx, cy, +4 more.

create_drawingC

Create a drawing sheet.

Inputs: name (required), template.

create_ellipseC

Create an ellipse with radii and rotation.

Inputs: cx (required), cy (required), rx (required), ry (required), +3 more.

create_exploded_viewC

Create an exploded view definition for an assembly.

Inputs: name (required), assembly_id (required).

create_groupC

Create a named group from entity ids.

Inputs: entity_ids (required), name.

create_layerB

Create a named layer with optional color (e.g. #ff0000). Layers are keyed by name; default geometry layer is "0".

Inputs: name (required), color.

create_lineC

Create a line from (x1,y1) to (x2,y2). Lengths use unit (default mm).

Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +2 more.

create_map_layoutC

Create a map-oriented drawing layout using current project extent and drawing scale metadata.

Inputs: name (required), margin, template, sheet_size.

create_monitoring_wellC

Create a monitoring well point with optional depth and screened interval metadata.

Inputs: x (required), y (required), unit, depth, +5 more.

create_pointB

Create a point at (x, y). Coordinates are converted from unit (default mm) to internal mm. Optional layer is a layer name (created if missing).

Inputs: x (required), y (required), unit, layer.

create_polygonC

Create a polygon path from vertices. closed selects closed vs open stroke in preview (stored on entity properties). Points use unit (default mm).

Inputs: closed (required), points (required), unit, layer.

create_polylineB

Create a polyline. If closed is true, stroke is closed in SVG preview. Points use unit (default mm).

Inputs: closed (required), points (required), unit, layer.

create_prismC

Create a prism from a 2D profile entity and height.

Inputs: height (required), profile_id (required), unit, layer.

create_profile_lineC

Create a profile line used for section sampling and resource/environment transects.

Inputs: points (required), name, unit, layer, +1 more.

create_rectangleB

Axis-aligned rectangle: corner (x,y), width, height, optional cornerRadius. Lengths use unit (default mm). Y increases upward; (x,y) is the lower-left corner. Stored as coords [x,y,width,height] in mm; cornerRadius in properties.

Inputs: x (required), y (required), width (required), height (required), +3 more.

create_revolutionC

Create a simplified revolved solid from a 2D profile around an axis.

Inputs: axis (required), profile_id (required), unit, angle, +1 more.

create_sampling_pointC

Create a resource/environment sampling point with optional label, elevation, and attribute metadata.

Inputs: x (required), y (required), unit, label, +3 more.

create_sphereC

Create a sphere solid.

Inputs: radius (required), cx, cy, cz, +3 more.

create_splineC

Create a control-point spline entity.

Inputs: controlPoints (required), unit, layer, degree.

create_tableC

Create a table annotation.

Inputs: cols (required), rows (required), position (required), style.

create_torusC

Create a torus solid.

Inputs: majorRadius (required), minorRadius (required), cx, cy, +3 more.

create_viewportC

Create a viewport entity.

Inputs: name (required), view_type (required).

define_attributeC

Define an attribute on a block definition.

Inputs: tag (required), prompt (required), block_name (required), default_value (required).

delete_entityC

Remove an entity by id.

Inputs: entity_id (required).

delete_layerA

Delete a layer by name. Entities on that layer are reassigned to the default layer 0.

Inputs: name (required).

draft_angleC

Create a simplified drafted copy of a solid.

Inputs: angle, guides, radius, path_id, +9 more.

dwg_tools_statusA

Report whether LibreDWG's dwg2dxf / dxf2dwg binaries are available on PATH so import_dwg / export_dwg can actually convert. Returns the resolved binary paths when present.

Inputs: no named parameters.

edit_blockC

Return a block definition for editing.

Inputs: block_name (required).

explode_blockB

Explode an inserted block group back into loose entities.

Inputs: instance_id (required).

export_3mfC

Export entities to 3MF-like text.

Inputs: path, entity_ids.

export_dwgA

Export the current 2D scene to DWG by writing a DXF and converting via LibreDWG's dxf2dwg. Returns base64 DWG bytes; pass path to also write to disk. Run dwg_tools_status to confirm dxf2dwg is installed.

Inputs: path, entity_ids.

export_dxfB

Export 2D entities to DXF (internal mm). Optional entity_ids limits which entities are written.

Inputs: entity_ids.

export_geojsonB

Export 2D entities to a GeoJSON FeatureCollection while preserving layer and properties metadata.

Inputs: path, entity_ids.

export_gltfC

Export entities to GLTF-like text.

Inputs: path, entity_ids.

export_igesC

Export entities to IGES-like text.

Inputs: path, entity_ids.

export_objC

Export entities to OBJ-like text.

Inputs: path, entity_ids.

export_shapefileB

Export 2D entities as a zipped ESRI Shapefile package and optionally write it to disk.

Inputs: path, entity_ids.

export_stepC

Export entities to STEP-like text.

Inputs: path, entity_ids.

export_stlC

Export entities to STL-like text.

Inputs: path, entity_ids.

export_svgD

Export entities to SVG-like text.

Inputs: path, entity_ids.

extendC

Extend a line-like entity by 20 percent.

Inputs: entity_id (required), boundary_entities.

fillet_2dC

Create a simple arc fillet between two lines using their intersection midpoint.

Inputs: radius (required), line_id_a (required), line_id_b (required), unit.

fillet_3dC

Create a simplified filleted copy of a solid.

Inputs: angle, guides, radius, path_id, +9 more.

find_entities_by_layerC

Return entities assigned to a specific layer name.

Inputs: layer_name (required).

find_entities_by_propertyC

Find entities by direct field or property-bag value using exact matching.

Inputs: property (required), value.

find_entities_in_regionC

Find entities whose bounding boxes intersect the given region.

Inputs: x1 (required), x2 (required), y1 (required), y2 (required).

generate_pdfC

Generate a minimal PDF summary for a drawing.

Inputs: drawing_id (required), paper_size (required), path, scale.

generate_svgC

Generate SVG for selected entities or the full scene.

Inputs: viewport, entity_ids.

geometry_backend_statusA

Report the current 3D geometry backend. Returns one of: { backend: "occt", available: true, version? } when OpenCascade.js is loaded, { backend: "occt-error", available: false, reason } when load failed, or { backend: "mock", available: false, reason } when running with the lightweight fallback. Use this to verify whether STEP/STL/IGES/GLTF tools are running on real OCCT or on stubbed geometry.

Inputs: no named parameters.

get_bounding_boxC

Compute a bounding box for all entities or a selected subset.

Inputs: entity_ids.

get_curve_lengthC

Measure length or perimeter for a 2D entity in internal millimetres.

Inputs: entity_id (required).

get_edge_listC

Return simplified edge ids for a solid.

Inputs: solid_id (required).

get_entity_propertiesC

Return one entity record by id.

Inputs: entity_id (required).

get_entity_typeC

Get the entity type string for a specific entity id.

Inputs: entity_id (required).

get_face_listC

Return simplified face ids for a solid.

Inputs: solid_id (required).

get_face_normalC

Return a simplified face normal for an axis-aligned face id.

Inputs: face_id (required), solid_id (required).

get_layer_listC

Alias for listing all layers.

Inputs: no named parameters.

get_mass_propertiesC

Return mass properties based on simplified volume and material density.

Inputs: solid_id (required).

get_parameterC

Get a parameter by name.

Inputs: name (required).

get_project_crsB

Return current project georeferencing metadata.

Inputs: no named parameters.

get_project_infoB

Return current project metadata and scene counts.

Inputs: no named parameters.

get_raster_layerB

Return one raster layer record by id.

Inputs: id (required).

get_topologyC

Return simplified brep-like topology for a solid.

Inputs: solid_id (required).

get_vertex_listC

Return solid bbox corner vertices.

Inputs: solid_id (required).

import_csv_pointsC

Import CSV rows into point entities for sampling points or monitoring wells while preserving tabular attributes.

Inputs: kind, path, unit, layer, +6 more.

import_dwgA

Import DWG by piping through LibreDWG's dwg2dxf. Provide either path (DWG on disk) or base64 content. Falls back with an error if dwg2dxf is not installed (run dwg_tools_status to check).

Inputs: path, content, encoding.

import_dxfA

Import DXF content (UTF-8 text or base64) into the scene: ensures layers exist and adds LINE, CIRCLE, ARC, POINT, LWPOLYLINE, and 2D POLYLINE entities (mm; arcs as radians internally).

Inputs: content (required), encoding.

import_geojsonC

Import GeoJSON FeatureCollection data into point, line, polyline, and polygon entities.

Inputs: path, unit, layer, content, +1 more.

import_geotiff_metadataA

Read a GeoTIFF file and return width / height / sample format / bbox / origin / resolution / CRS without attaching it to the session. Use attach_raster_layer to keep it as a session basemap.

Inputs: path (required).

import_igesC

Import IGES content.

Inputs: path, content, encoding.

import_objD

Import OBJ content.

Inputs: path, content, encoding.

import_pdf_as_underlayD

Import PDF_AS_UNDERLAY content.

Inputs: path, content, encoding.

import_shapefileC

Import ESRI Shapefile geometry and DBF attributes into point, line, polyline, and polygon entities.

Inputs: shp_path (required), unit, layer, dbf_path.

import_stepC

Import STEP content.

Inputs: path, content, encoding.

import_stlD

Import STL content.

Inputs: path, content, encoding.

import_svgD

Import SVG content.

Inputs: path, content, encoding.

insert_blockC

Insert a block definition by cloning its member entities.

Inputs: position (required), block_name (required), scale, rotation.

list_blocksC

List block definitions.

Inputs: no named parameters.

list_entitiesC

List entities. Optional filter: { kind or type?, layer?, ids? } — kind/type is an EntityType string or array (point, line, circle, arc, rectangle, polygon, polyline).

Inputs: filter.

list_entities_by_domain_kindB

List entities tagged with a domain kind such as sampling_point, monitoring_well, or profile_line.

Inputs: kind (required).

list_known_crsA

List CRS codes currently registered with proj4 in this session (pre-registered defaults plus any added via register_crs_definition).

Inputs: no named parameters.

list_layersB

List all layers (name, color, visible, locked).

Inputs: no named parameters.

list_parametersC

List all named parameters.

Inputs: no named parameters.

list_raster_layersB

List all raster (basemap) layers attached to the session.

Inputs: no named parameters.

load_projectB

Load a project JSON file from disk and replace the current scene (undo/redo cleared).

Inputs: path (required).

loftC

Create a simplified lofted solid from one or more profiles.

Inputs: angle, guides, radius, path_id, +9 more.

mate_angleC

Create a angle mate between two references.

Inputs: assembly_id (required), a, b, angle, +4 more.

mate_coincidentC

Create a coincident mate between two references.

Inputs: assembly_id (required), a, b, value, +4 more.

mate_concentricC

Create a concentric mate between two references.

Inputs: assembly_id (required), a, b, value, +4 more.

mate_distanceC

Create a distance mate between two references.

Inputs: assembly_id (required), a, b, axis_a, +4 more.

mate_parallelC

Create a parallel mate between two references.

Inputs: assembly_id (required), a, b, value, +4 more.

measure_angleC

Measure angle between two lines.

Inputs: line_a (required), line_b (required).

measure_areaC

Measure planar area from an entity.

Inputs: points, entity_id.

measure_bounding_boxC

Measure the combined bounding box of entities.

Inputs: entity_ids (required).

measure_centroidC

Measure solid centroid.

Inputs: solid_id (required), axis.

measure_distanceC

Measure distance between two points.

Inputs: point_a (required), point_b (required).

measure_minimum_distanceB

Approximate minimum distance between two solids via bounding boxes.

Inputs: solid_a (required), solid_b (required).

measure_moment_of_inertiaC

Measure simplified moment of inertia from bbox.

Inputs: solid_id (required), axis.

measure_perimeterC

Measure perimeter or curve length for an entity.

Inputs: entity_id (required).

measure_polygon_area_statsC

Summarize polygonal area by entity, optionally grouped by a property field for study zones.

Inputs: entity_ids (required), group_by.

measure_profile_lengthC

Measure the length of a profile line or transect.

Inputs: profile_line_id (required).

measure_surface_areaC

Measure solid surface area.

Inputs: solid_id (required), axis.

measure_volumeC

Measure solid volume.

Inputs: solid_id (required), axis.

mirror_2dC

Create mirrored copies of one or more entities across an axis line.

Inputs: axis_end (required), axis_start (required), entity_ids (required), unit.

new_projectA

Start a new empty CAD project (default layer 0, no entities). Optional project name.

Inputs: name.

offsetB

Create an offset copy of a supported 2D entity. Use left/right for open curves and inside/outside or inward/outward for closed curves.

Inputs: side (required), distance (required), entity_id (required), unit.

open_projectA

Alias for load_project: load a project JSON file from disk and replace the current scene.

Inputs: path (required).

push_undo_checkpointA

Record the current scene state on the undo stack (clears redo). Call before a batch of edits you want to revert in one step.

Inputs: no named parameters.

redoB

Re-apply the last undone scene state.

Inputs: no named parameters.

register_crs_definitionA

Register an EPSG-style CRS definition with proj4 so future reprojection tools can use it. code should be like 'EPSG:4548' and definition is a proj4 string.

Inputs: code (required), definition (required).

remove_componentC

Remove a component instance from an assembly.

Inputs: assembly_id (required), instance_id (required).

remove_raster_layerB

Remove a raster layer by id.

Inputs: id (required).

rename_layerB

Rename an existing layer. Any entities on the old layer are updated to the new layer name.

Inputs: new_name (required), old_name (required).

rename_raster_layerC

Rename a raster layer for human reference.

Inputs: id (required), name (required).

render_previewC

Render current scene or selected entities to a base64 image payload.

Inputs: view, width, height, entity_ids.

render_preview_svgC

Wireframe SVG preview of entities (mm). Optional entity_ids limits which shapes are drawn.

Inputs: entity_ids.

render_raster_layer_pngA

Decode an attached raster layer (or a GeoTIFF on disk) into a PNG preview. Single-band rasters are auto-stretched to grayscale; multi-band rasters use the first three bands. Returns base64 PNG bytes; pass output_path to also write to disk.

Inputs: id, path, max_width, max_height, +1 more.

reproject_pointA

Reproject a single point between two CRSes using proj4. from/to accept EPSG codes (e.g. 'EPSG:4326', '4326') or full proj4 strings. Common CN CRSes (EPSG:4326/3857/4490/4513-4533) are pre-registered.

Inputs: to (required), from (required), point (required).

reproject_pointsC

Reproject many points between two CRSes in one call. Same from/to semantics as reproject_point.

Inputs: to (required), from (required), points (required).

rollback_transactionA

Discard changes since the matching begin_transaction and restore scene state.

Inputs: no named parameters.

save_projectB

Save the current scene to a project JSON file on disk (cad-mcp-project v1).

Inputs: path (required).

select_groupC

Return entities in a group.

Inputs: group_id (required).

set_component_flexibleC

Mark a component as flexible or rigid.

Inputs: flexible (required), assembly_id (required), instance_id (required).

set_drawing_scaleC

Set a drawing scale factor between local drawing units and world coordinates.

Inputs: scale (required).

set_entity_colorC

Set entity color display metadata on one or more entities.

Inputs: color (required), entity_ids (required).

set_entity_layerC

Assign entities to a layer by name.

Inputs: entity_ids (required), layer_name (required).

set_entity_linetypeC

Set entity linetype display metadata on one or more entities.

Inputs: linetype (required), entity_ids (required).

set_entity_lineweightC

Set entity lineweight display metadata on one or more entities.

Inputs: entity_ids (required), lineweight (required).

set_entity_propertyB

Set a mutable entity field (layer, coords, closed, properties) or a custom property-bag value. Reserved fields id and type cannot be changed.

Inputs: property (required), entity_id (required), value.

set_layer_colorA

Set or clear a layer display color. Pass an empty string to clear the stored color.

Inputs: name (required), color (required).

set_layer_lockedC

Set whether a layer is locked against editing.

Inputs: name (required), locked (required).

set_layer_visibleC

Set whether a layer is visible in previews and listings.

Inputs: name (required), visible (required).

set_map_extentC

Set the current map extent used for paper layout, grids, and exports.

Inputs: maxX (required), maxY (required), minX (required), minY (required).

set_materialC

Attach material metadata to a solid.

Inputs: solid_id (required), material_name (required).

set_parameterC

Create or replace a named parameter.

Inputs: name (required), value (required), unit.

set_project_crsC

Set project CRS and optional origin metadata for resource/environment mapping workflows.

Inputs: wkt, code, name, units, +1 more.

set_raster_layer_visibleC

Toggle a raster layer's visibility flag.

Inputs: id (required), visible (required).

set_table_cellC

Set a table cell value.

Inputs: col (required), row (required), content (required), table_id (required).

set_view_standardC

Store active drawing standard in parameter state.

Inputs: view_name (required).

set_visual_styleC

Store active visual style in parameter state.

Inputs: style (required).

shellC

Create a simplified shelled copy of a solid.

Inputs: angle, guides, radius, path_id, +9 more.

sweepC

Create a simplified swept solid from a profile and path.

Inputs: angle, guides, radius, path_id, +9 more.

transform_coordsB

Transform coordinates between local drawing space and world space using project origin and drawing scale.

Inputs: point (required), direction (required).

trimC

Trim a line-like entity by shortening it toward its midpoint.

Inputs: entity_id (required), cutting_entities.

undoB

Restore the scene to the previous undo checkpoint.

Inputs: no named parameters.

ungroupC

Remove a group by id.

Inputs: group_id (required).

update_drawing_viewsC

Return current drawing state after a logical refresh.

Inputs: drawing_id (required).

update_parameterC

Update an existing parameter value.

Inputs: name (required), new_value (required), unit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.2/5.0

    Scored across 225 tools

    Disambiguation2/5

    Many tools overlap heavily: dimension annotations vs dimension constraints (add_dimension_linear vs add_linear_dimension, add_dimension_angular vs add_angular_dimension), multiple measurement/bounding-box tools, aliases like open_project and get_layer_list, and parallel internal-CAD vs AutoCAD COM operations. With 225 tools, an agent faces frequent ambiguity and near-duplicate selection risks.

    Naming Consistency3/5

    Names are overwhelmingly snake_case, but verb conventions are inconsistent (create/add/set/get/list/measure/compute/import/export/generate/render/apply), with direct aliases and a few single-word or noun-first tools (offset, shell, loft, draft_angle). Still generally readable, but not a predictable verb_noun pattern throughout.

    Tool Count1/5

    225 tools is an extreme mismatch for an MCP server, far beyond the 3-15 well-scoped range. The set is massively overgrown and likely overwhelming for agents to navigate.

    Completeness3/5

    The surface is broad across 2D/3D creation, annotation, dimensions, layers, blocks, constraints, assemblies, measurement, import/export, and geospatial workflows. However, core CAD editing gaps remain (e.g., no obvious move/rotate/scale for existing 2D entities), and many tools are explicitly simplified or stub-like.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables programmatic control of AutoCAD through COM automation, allowing natural language commands to create structures, manage layers, and manipulate entities via MCP clients like Claude.
      70
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for full AutoCAD automation, AutoCAD LT automation, and headless DXF generation. It provides 8 consolidated tools for drawing, entity, layer, block, annotation, P&ID, view, and system operations via MCP stdio transport.
      12
      45
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI/natural-language-driven 2D drafting automation on a running Windows AutoCAD, exposing drawing, dimensioning, layer/block management, and mechanical drawing tools such as title blocks, BOM, and balloons to any MCP client.
      300 PyPI
      4
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables MCP-based interaction with AutoCAD and DXF/DWG drawings, supporting document lifecycle, entities, layers, blocks, layouts, viewports, zoom, screenshot capture, and PDF export via ezdxf or live Windows AutoCAD COM backends.
      87
      MIT