跳到正文
FunCoding

Bimwright DWG

官方 MCP Registry 已收录

MCP gateway for AutoCAD 2022-2027: DWG text, layers, entities, views and automation.

Star
40
版本
v2.5.2
许可证
Apache-2.0
最近提交
2026年12月1日

dwg-mcp

dwg-mcp

Local Model Context Protocol (MCP) gateway for Autodesk AutoCAD 2022-2027.

build license AutoCAD 2022-2027 MCP 78 tools latest release

English | Tiếng Việt | 简体中文 | 日本語

Overview

dwg-mcp connects MCP-capable AI clients (Claude, Antigravity, Codex, Grok Build, Pi, OpenCode, Devin, Kilo, Hermes, OpenClaw, and other stdio MCP clients) directly to a local Autodesk AutoCAD 2022-2027 session through its native ObjectARX .NET API. Query entities, layers, and blocks, draft and edit DWG geometry, capture views, export DXF, update annotations, and run C# scripts locally with no cloud relay.

AspectDetails
Host applicationAutodesk AutoCAD 2022-2027 (Windows)
Architecture.NET 10 MCP stdio server + in-process per-year AutoCAD plugin
Local transportLoopback TCP (2022-2024) and Named Pipe (2025-2027), token-authenticated
Tool surface78 typed tools across 10 toolsets (54 bare default), plus C# scripting and ToolBaker
Safety controls--read-only mode (29 read-only tools), PID/document pinning, atomic batching, LISP blocked
MCP protocolMCP stdio (Tools, Prompts, explicit permission annotations, response budgets)
LicenseApache-2.0

Capabilities

AreaWhat you can do
Query and auditProfile large DWG files, partition dense regions into bands, filter and page entities by layer, type, or WCS bounding box.
Drafting and modifyCreate lines, circles, arcs, polylines, rectangles, ellipses, points, and raster images; move, rotate, scale, copy, offset, erase, or run atomic=true batches.
Blocks, annotations, dimensionsList, insert, explode, and edit block attributes; create DBText, MText, MLeaders, tables, and linear, aligned, radial, and diameter dimensions.
Drawings and exportList recent and open drawings, open or activate DWGs, read/set allowlisted system variables, save, purge with dry_run, and export DXF.
Visual inspectionZoom extents, window, or entity; capture native viewport images via CapturePreviewImage, inspect sub-regions, and restore the camera.
Text and Unicode formattingSpatially cluster technical text, normalize SHX fonts to Bimwright_Unicode, scale text heights, and batch-rewrite DBText/MText in one transaction.
C# scripting and ToolBakerRun synchronous Roslyn C# snippets with structured JSON data and compile_only diagnostics; turn repeated workflows into baked tools.
Host UI and change historyMonitor live activity toasts (MCPTOAST), inspect session history (MCPHISTORY), open reports with clickable dwg: links (MCPREPORTS), and track per-drawing SQLite history.

Showcase

Verified across all 78 tools on AutoCAD 2025 (benchmark record) and 220 production calls on construction drawings.

Example prompts you can run immediately:

  • "Profile this DWG, list the heaviest layers in model space, and report findings with clickable AutoCAD links."
  • "Survey impact on handles 7F5AD and 7F5AE, move them to layer A-NOTE, and verify the updated properties."
  • "Insert block VALVE-CHECK at (1200, 450), set tag attribute V-104, and capture a view image of that area."
  • "Add linear dimensions along the grid lines on layer A-DIM, preview unused objects with dry_run=true, and export the drawing to DXF."

Quick Start

Option 1: Agent-assisted install

Paste this prompt into an AI agent with local terminal access (Claude, Antigravity, Codex, Grok Build, Pi, OpenCode, Devin, Kilo, Hermes, OpenClaw, ...):

Check the current version of AutoCAD in this PC and install the BIMwright dwg-mcp latest release for me

Option 2: Manual install (PowerShell Setup ZIP)

  1. Download latest release: open GitHub Releases, download DwgMcp.Setup-<tag>-win-x64.zip, and extract it.
  2. Run the installer: close AutoCAD, open PowerShell in the extracted folder, preview with -WhatIf, then install:
powershell -ExecutionPolicy Bypass -File .\install.ps1 -WhatIf
powershell -ExecutionPolicy Bypass -File .\install.ps1
  1. Or install from source: clone this repository, build, and run the local install script for your AutoCAD year:
git clone https://github.com/bimwright/dwg-mcp.git
cd dwg-mcp
dotnet build src/Bimwright.Dwg.sln
powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1 -Years 2024

Verify: restart your AI client, open a DWG in AutoCAD, and ask your agent to run dwg_get_drawing_info.

Full setup details (upgrade, uninstall, NuGet, Claude Desktop MCPB, per-client wiring): docs/install.md | docs/mcp-client-wiring.md.

Architecture

AI Client (Claude / Antigravity / Codex / Grok Build / Pi / OpenCode / ...)
  |  MCP over stdio
  v
Bimwright.Dwg.Server (.NET 10 console gateway)
  |  Loopback TCP (2022-2024) or Named Pipe (2025-2027) + session token
  v
Bimwright.Dwg.Plugin (AutoCAD 2022-2027 shells)
  |  Application.Idle dispatch + Document.LockDocument()
  v
Autodesk AutoCAD .NET API (ObjectARX 2022-2027)
  • Two local processes: the server has zero AutoCAD SDK references and builds/tests without AutoCAD installed.
  • Main-thread safe: DwgApiExecutor and MainThreadExecutor serialize requests onto Application.Idle before locking the active document.
  • Full threading, discovery, Roslyn isolation, and protocol specification: ARCHITECTURE.md.

Supported Versions

VersionObjectARXPlugin TFMTransportNotes
AutoCAD 2022-202424.1-24.3net48Loopback TCPPer-year shells compiled from shared source
AutoCAD 2025-202625.0-25.1net8.0-windowsNamed PipeAvoids Windows loopback firewall prompt
AutoCAD 202726.0net10.0-windowsNamed PipeNative .NET 10 host target

Tools

ToolsetDefaultRead-onlyCountExamples
queryYes1212dwg_health, dwg_get_drawing_profile, dwg_query_entities, dwg_cluster_bands, dwg_inspect_lisp
modifyYes021dwg_create_layer, dwg_create_line, dwg_create_polyline, dwg_move_entities, dwg_erase_entities
meta (code)Yes815dwg_switch_target, dwg_open_drawing, dwg_survey_change_impact, dwg_batch_execute, dwg_send_code
viewYes36dwg_zoom_extents, dwg_zoom_to_entity, dwg_capture_view_image, dwg_inspect_view_region, dwg_restore_view
toolbakerOptional36dwg_list_baked_tools, dwg_run_baked_tool, dwg_list_bake_suggestions, dwg_accept_bake_suggestion
annotationOptional04dwg_create_text, dwg_create_mtext, dwg_create_leader, dwg_create_table
blockOptional25dwg_list_blocks, dwg_get_block_attributes, dwg_insert_block, dwg_set_block_attributes, dwg_explode_block
dimensionOptional04dwg_create_linear_dimension, dwg_create_aligned_dimension, dwg_create_radial_dimension, dwg_create_diameter_dimension
exportOptional01dwg_export_dxf
drawingOptional14dwg_get_variables, dwg_set_system_variable, dwg_save_drawing, dwg_purge_drawing

Bare startup enables 54 tools (23 read-only). install.ps1 seeds "toolsets": ["all"] for all 78 tools (29 read-only under --read-only). Complete tool catalog: docs/tools.md. Benchmark: docs/benchmarks/2026-11-23-autocad-2025.md.

Safety and Permissions

  • Local-only loopback transport authenticated by a per-session random GUID token.
  • Explicit PID and active-document confirmation required before writes (dwg_switch_target).
  • --read-only strips all write and code-execution tools at registration time.
  • dwg_run_lisp is always blocked; dwg_send_code is full-trust C# controlled by --disable-send-code and MCPDISABLECODE.
  • Never approve broad mcp__dwg-mcp__* wildcards; use the test-verified 29-tool read-only allowlist in docs/safety.md.
  • Detailed security, auto mode, response budgets, and opt-in logging: docs/safety.md | docs/configuration.md.

Documentation

DocumentTopic
ARCHITECTURE.mdProcess model, threading, discovery, Roslyn scripting, wire protocol
AGENTS.mdAgent installation and operating instructions
docs/install.mdSetup ZIP, upgrades, uninstall, NuGet, Claude Desktop MCPB, build from source
docs/mcp-client-wiring.mdConfiguration for Claude, Antigravity, Codex, Grok Build, Pi, OpenCode, Devin, Kilo, Hermes, OpenClaw
docs/tools.mdFull reference for all 78 MCP tools, spatial paging, and path policies
docs/configuration.mdCLI flags, environment variables, response budgets, output artifacts, call logging
docs/safety.mdTarget pinning, read-only allowlist, permissions, C# scripting, LISP policy, health
docs/host-ui.mdActivity toast, session history, Reports window, per-drawing change history
docs/workflows.mdLarge drawing audit, safe edits, Unicode text rewriting, and smoke checklist
docs/benchmarks/2026-11-23-autocad-2025.mdPublic 78-tool benchmark on AutoCAD 2025
CHANGELOG.mdVersion history and release notes

The bimwright Family

RepositoryScopeLicense
rvt-mcpAutodesk Revit 2022-2027 MCP gatewayApache-2.0
dwg-mcpAutodesk AutoCAD 2022-2027 MCP gateway (this repository)Apache-2.0
nwd-mcpAutodesk Navisworks Manage 2022-2027 MCP gatewayApache-2.0
ipt-mcpAutodesk Inventor 2022-2027 MCP gatewayApache-2.0
bim-wikiBilingual BIM knowledge base (ISO 19650 and Vietnam BIM regulations)CC-BY-SA 4.0

License

Apache License 2.0. Third-party notices: THIRD_PARTY_NOTICES.md. Autodesk, AutoCAD, and DWG are trademarks of Autodesk, Inc.; bimwright is an independent open-source project.

同类 MCP Server

精选

activepieces

开源的 Zapier 替代品,每个集成都能作为 MCP Server 使用。

ACactivepieces/activepieces26k近 7 天新增 116 个 star

精选

n8n-mcp

提供 n8n 近 3000 个节点的文档,让智能体替你搭建工作流。

CZczlonkowski/n8n-mcp23k近 7 天新增 32 个 star

mobilerun

Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.

DRdroidrun/mobilerun10k近 7 天新增 62 个 star

mcp-agent

Build effective agents using Model Context Protocol and simple workflow patterns

LAlastmile-ai/mcp-agent8.6k近 7 天新增 3 个 star

spec-workflow-mcp

A Model Context Protocol (MCP) server that provides structured spec-driven development workflow tools for AI-assisted software development, featuring a real-time web dashboard and VSCode extension for monitoring and managing your project's progress directly in your development environment.

PIPimzino/spec-workflow-mcp4.3k近 7 天新增 2 个 star

n8n-nodes-mcp

n8n custom node for MCP

NEnerding-io/n8n-nodes-mcp3k近 7 天新增 1 个 star