Skip to main content
MCP server CX Codex

DWG MCP Server — Claude Code MCP server: features and setup

Connects DWG and DXF CAD files to LLMs without local CAD suites. Lets agents inspect layers, search entities, and render layout views.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env DWG_MCP_ALLOWED_ROOTS=<DWG_MCP_ALLOWED_ROOTS> --transport stdio dwg-mcp-server -- npx -y @dmytro-prototypes/dwg-mcp-server
Open on GitHub

What DWG MCP Server does

The server exposes DWG and DXF drawings to MCP clients using LibreDWG under the hood. Opening a file spawns a dedicated Rust worker process. The worker indexes layers, entities, and blocks directly in memory. This one-time indexing step avoids rescanning the drawing for subsequent queries.

Source drawing files stay untouched on disk. Any property edits apply solely to the memory state and disappear when the session terminates. Models can filter elements by handle, inspect geometry, and export model views or paper layouts to SVG or PNG.

Client access requires explicit directory permissions. When an AI client fails to supply MCP root paths, drawings remain inaccessible until declared in DWG_MCP_ALLOWED_ROOTS.

What it helps with

  • inspect layer hierarchies and block structures in DWG files
  • export drawing views or paper layouts into SVG and PNG formats
  • query specific CAD entities using handles and property filters
  • review drawing geometry without launching heavy CAD software

Example prompts for the agent

  • Open building_plan.dwg and list all entity types present in the file
  • Render the primary paper-space layout from elevation.dxf as an SVG
  • Find all block references located on the DOORS layer

How to install DWG MCP Server

Platform CLI

claude mcp add --env DWG_MCP_ALLOWED_ROOTS=<DWG_MCP_ALLOWED_ROOTS> --transport stdio dwg-mcp-server -- npx -y @dmytro-prototypes/dwg-mcp-server

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about DWG MCP Server

How to install DWG MCP Server in Claude Code?

Run claude mcp add dwg-mcp-server -- npx -y @dmytro-prototypes/dwg-mcp-server. If your environment requires manual folder paths, pass the environment variable: claude mcp add --env DWG_MCP_ALLOWED_ROOTS=<DWG_MCP_ALLOWED_ROOTS> --transport stdio dwg-mcp-server -- npx -y @dmytro-prototypes/dwg-mcp-server.

Does the server overwrite or modify local DWG files?

No. Source files remain strictly read-only on your storage drive. Property edits stay in system memory and vanish as soon as the session closes.

Why configure the DWG_MCP_ALLOWED_ROOTS variable?

Certain MCP tools, such as Codex, do not provide folder roots over stdio. Setting DWG_MCP_ALLOWED_ROOTS tells the server which drawing folders it can safely access.

Similar MCP servers

All MCP servers for Design →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor