DD

dimitrovakulenko/dwg-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 6 forks 质量 79 趋势 24GPL-3.0

通过MCP访问AI的DWG文件格式。将DWG文件连接到Claude、ChatGPT、Codex、Cursor及其他AI客户端。

概览

通过MCP访问AI的DWG和DXF文件格式。 将DWG和DXF文件连接到Claude、ChatGPT、Codex、Cursor及其他MCP客户端。DWG MCP服务器提供结构化访问DWG数据,使AI能够理解并推理图纸。源文件保持只读;支持的实体属性可在内存中更改以便检查和渲染。 使用你选择的MCP客户端的DWG MCP Server。npm包在首次使用时从GitHub Releases下载匹配的原生构建,验证其SHA-256校验和,缓存后直接运行。不需要Docker和单独的Python安装。 两个安装程序都会下载最新的原生版本,并在安装前验证其 SHA-256 校验和。 安装后,将MCP客户端指向已安装的可执行文件。在macOS上添加~/。

概述(AI 翻译)

通过MCP访问AI的DWG和DXF文件格式。

将DWG和DXF文件连接到Claude、ChatGPT、Codex、Cursor及其他MCP客户端。 DWG MCP 服务器提供结构化访问 DWG 数据,使 AI 能够理解和 关于图纸的原因。源文件保持只读;支持实体 属性可以在内存中更改以便检查和渲染。

快速启动

使用你选择的MCP客户端的DWG MCP Server。 npm 包从 GitHub Releases 下载匹配的原生构建 首次使用,验证其SHA-256校验和,缓存后直接运行。 不需要 Docker 和单独的 Python 安装。

本地安装器

macOS 苹果硅片:

Windows x64 (PowerShell):

两个安装程序都下载最新的原生版本并验证其SHA-256 安装前校验和。

安装后,将MCP客户端指向已安装的可执行文件。在macOS上 先将~/.local/bin添加到PATH,或者使用由 安装工:

如果您的MCP客户端、AI代理或测试线箱不支持MCP根,设 DWG_MCP_ALLOWED_ROOTS 到应可访问的文件夹中。

法典

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

DWG MCP Server

DWG and DXF file format access for AI via MCP.

Connect DWG and DXF files to Claude, ChatGPT, Codex, Cursor, and other MCP clients. DWG MCP Server provides structured access to DWG data so AI can understand and reason about drawings. Source files remain read-only; supported entity properties can be changed in memory for inspection and rendering.

Quick Start

Use DWG MCP Server from the MCP client of your choice. The npm package downloads the matching native build from GitHub Releases on first use, verifies its SHA-256 checksum, caches it, and runs it directly. Docker and a separate Python installation are not required.

Native installers

macOS Apple Silicon:

curl -fsSL https://raw.githubusercontent.com/dimitrovakulenko/dwg-mcp-server/main/scripts/install.sh | sh

Windows x64 (PowerShell):

irm https://raw.githubusercontent.com/dimitrovakulenko/dwg-mcp-server/main/scripts/install.ps1 | iex

Both installers download the latest native release and verify its SHA-256 checksum before installation.

After installing, point your MCP client at the installed executable. On macOS add ~/.local/bin to PATH first, or use the absolute path reported by the installer:

claude mcp add --scope user --transport stdio dwg-mcp -- dwg-mcp-server

If your MCP client, AI agent, or test harness does not support MCP roots, set DWG_MCP_ALLOWED_ROOTS to the folders that should be accessible.

Codex

codex mcp add dwg-mcp \
  --env DWG_MCP_ALLOWED_ROOTS="$HOME" \
  -- npx -y @dmytro-prototypes/dwg-mcp-server

Codex does not currently provide MCP client roots to stdio MCP servers. Configure explicit allowed roots for the folders that contain your drawings.

Claude

claude mcp add --scope user --transport stdio dwg-mcp -- npx -y @dmytro-prototypes/dwg-mcp-server

Claude Code provides MCP roots, so no extra path variable is usually needed.

Cursor

{
  "mcpServers": {
    "dwg-mcp": {
      "command": "npx",
      "args": ["-y", "@dmytro-prototypes/dwg-mcp-server"]
    }
  }
}

Exposed Tools

Tool Purpose
dwg.list_roots List folders available for DWG access.
dwg.open_file Open a DWG or DXF from an available folder and return a documentId.
dwg.close_file Close an opened document and release its worker process.
dwg.list_types List the globally supported DWG types known to the backend.
dwg.list_file_types List only the types that are present in a specific opened DWG.
dwg.describe_type Describe a supported type, including readable and writable properties and its default projection.
dwg.get_objects Fetch specific objects by handle, preserving the requested order and reporting missing handles.
dwg.query_objects Query objects with filters, scopes, relation traversal, sorting, projection, and pagination.
在 GitHub 查看完整 README

安装

npx -y @dmytro-prototypes/dwg-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "dwg-mcp": { "command": "npx", "args": ["-y", "@dmytro-prototypes/dwg-mcp-server"] } } }