About Dwg MCP
Dwg MCP is an MCP server published by bimwright in the Science category: mCP gateway for AutoCAD 2022-2027 - text reading, spatial clustering, translation rewriting, and code execution. Conduid read 81 tools from its source: activate, apply_unicode_style, collapse_and_rewrite, dwg_accept_bake_suggestion, dwg_apply_unicode_style, dwg_attach_image and 75 more. No package is published for it, so it installs from a source checkout.
The repository has 40 stars and 13 forks, is licensed Apache-2.0, and its last commit was on 1 Dec 2026. The latest release is v2.0.1 (29 Sep 2026): dwg-mcp v2.0.1 MCP gateway for Autodesk AutoCAD 2022–2027. The release before it was v1.0.0 (28 Aug 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass Dependencies pinned. Its topics include aec, autocad, autocad-api, autodesk, cad and cad-automation.
Install
git clone https://github.com/bimwright/dwg-mcpTools (81)
activatedefault `true`, makes it active. `false` requires an existing active drawing and restores it after opening; this is a UI document, not a viewless background database.apply_unicode_style~4collapse_and_rewrite~11dwg_accept_bake_suggestionValidate, smoke-test, and accept a suggestiondwg_apply_unicode_styleEnsure `Bimwright_Unicode` style exists and apply to targetsdwg_attach_imageAttach a linked raster image (PNG/JPG/TIFF/BMP) at an exact position and sizedwg_batch_executeRun a logical batch or opt in to rollback with `atomic=true` for supported drawing commandsdwg_capture_view_imageCapture drawing graphics inside AutoCAD; return inline image, path, actual size, hash, document/viewport/camera metadata (default-on; path policy applies). Generated captures are kept 30 days, then the oldest go beyond 200 MB; files you name are never deleteddwg_change_colorChange entity color by AutoCAD color indexdwg_change_layerMove entities identified by hex handles to another layerdwg_collapse_and_rewriteLow-level rewrite primitive with explicit geometric controldwg_copy_entitiesCopy entities identified by hex handles and return copied handlesdwg_count_entitiesCount by type/layer/color, with optional WCS extents and named-space filters plus explicit unknown-match coveragedwg_create_aligned_dimensionCreate an aligned dimension between two pointsdwg_create_arcCreate one arc and return its hex handledwg_create_bake_issue_draftGenerate a GitHub issue draft for a suggestion without submitting itdwg_create_circleCreate one circle in the current drawing spacedwg_create_diameter_dimensionCreate a diametric dimension for a circle or arcdwg_create_ellipseCreate one ellipse and return its hex handledwg_create_layerEnsure a layer exists without overwriting an existing layer's propertiesdwg_create_leaderCreate a multileader (MLeader) with optional leader textdwg_create_lineCreate one line in the current drawing spacedwg_create_linear_dimensionCreate a rotated linear dimension with rotation degreesdwg_create_mtextCreate multi-line text (MText) with formatting and widthdwg_create_pointCreate one point and return its hex handledwg_create_polylineCreate a lightweight polyline from vertices and return its hex handledwg_create_radial_dimensionCreate a radial dimension for a circle or arcdwg_create_rectangleCreate a rectangle polyline and return its hex handledwg_create_tableCreate an AutoCAD table with specified row/column text contentsdwg_create_textCreate single-line text (DBText) with target height, rotation, and propertiesdwg_dismiss_bake_suggestionDismiss or suppress a suggestiondwg_erase_entitiesErase entities identified by hex handlesdwg_explode_blockExplode a block reference and return the handles of generated partsdwg_export_dxfExport the drawing to a DXF file (guarded by output path policy)dwg_get_block_attributesRead attributes of a block reference by handle (read-only safe)dwg_get_current_targetShow binding state, generation, PID and confirmed drawingdwg_get_drawing_infoRead current drawing name, current layer, current space/layout, and unit scalarsdwg_get_drawing_profileRead-only top-level counts for all spaces (default), model only or one named layout, with scoped snapshot checks and a final-response byte capdwg_get_entity_propertiesRead properties for entities identified by AutoCAD hex handlesdwg_get_selected_textsLegacy pickfirst clusters for writeback, or explicit handle/bbox sources for bounded read-only cluster pagesdwg_get_variablesRead current values of drawing system variablesdwg_healthRead-only host/runtime identity probe; optional stable-release check, offline by defaultdwg_insert_blockInsert a block reference, optionally importing from an external DWGdwg_inspect_lispStatic safety scan of a `.lsp` file or inline AutoLISP — flags process exec (`startapp`/`shell`), dangerous COM (`WScript.Shell`/`XMLHTTP`), persistence (`acaddoc.lsp`, registry writes), file deletion, staged `(load …)`, obfuscation (`eval`/`read`). Returns `verdict` clean/caution/dangerous + findings. Pure local analysis; no execution, no AutoCAD needed; available even under `--read-only`. `clean` does not certify safety. Reports include `execution_authorized=false` and `safety_assured=false`.dwg_inspect_view_regionChoose a normalized rectangle on a capture; zoom, regenerate and return a fresh inline image with parent linkagedwg_list_available_targetsList AutoCAD instances with PID, target ID and process startdwg_list_bake_suggestionsList detected repeated-workflow suggestionsdwg_list_baked_toolsList accepted baked tools from the server-owned SQLite registrydwg_list_blocksList block definitions in the current drawing (read-only safe)dwg_list_layersList layers in the current drawing with color and state flagsdwg_list_recent_drawingsList up to 50 recent DWGs for the connected AutoCAD, with optional filename filter; works with no drawing opendwg_move_entitiesMove entities identified by hex handles by a displacement vectordwg_offset_entitiesOffset curve entities and return generated handlesdwg_open_drawingOpen an absolute DWG path, optionally read-only; reuse an open drawing, never save or close drawings; default wait 600sdwg_purge_drawingPurge unused named objects (blocks, layers, styles) (supports dry_run=true, actual purge requires confirm=true)dwg_query_entitiesLegacy model-space query, or opt-in spatial/projected pages with signed continuation and a final-response byte capdwg_report_task_resultSave a task report (outcome, summary, Markdown body with `dwg:<handle>` entity links) as a local file for the AutoCAD user; never changes a drawingdwg_restore_viewReturn to an earlier capture's camera and obtain a fresh inline imagedwg_rotate_entitiesRotate entities identified by hex handles around a base pointdwg_run_baked_toolRun an accepted baked tool by namedwg_run_lispCompatibility endpoint only: all `file`/`code`/`command` inputs are refused with `lisp_execution_blocked`. No file read, plugin dispatch or execution from this tool. Use `dwg_inspect_lisp` for analysis only.dwg_save_drawingSave the current drawing to a file (requires confirm=true)dwg_scale_entitiesScale entities identified by hex handles around a base pointdwg_select_by_layerReturn model-space entity handle lists for one layer without changing pickfirst selectiondwg_select_by_typeReturn model-space entity handle lists for one entity type without changing pickfirst selectiondwg_send_codeExecute a C# snippet against the AutoCAD .NET API (globals `doc`/`db`/`ed`, `return` value + captured stdout, cooperative 30s cancellation; `MCPDISABLECODE`/`MCPENABLECODE` toggle per session)dwg_set_block_attributesSet attributes of a block reference by handledwg_set_system_variableSet the value of a drawing system variabledwg_switch_targetBind and verify an instance; changing instances requires `pid:`/`id:`, plus `rebind=true` when leaving a live confirmed target. Excluded from read-only modedwg_translate_and_rewritePreferred. Write translated text back: anchor, delete, MText, font, heightdwg_update_textsWrite new text by handle in one transactiondwg_zoom_extentsZoom to the extents of the drawing viewportdwg_zoom_to_entityZoom viewport to the extents of a specific drawing entity identified by handledwg_zoom_windowZoom viewport to a window defined by two corner pointsget_selected_texts~100pathrequired absolute drive or ordinary UNC path on the AutoCAD machine, not the MCP client. Relative/device paths, URLs, DXF and templates are refused. Existence/access are checked by the host process.read_onlydefault `false`, requests writable file access; `true` requests read-only access. An already-open drawing is reused, but an access-mode mismatch is refused without changing or closing it.send_code~28timeout_secondsinteger 1–900, default 600. Changes only this command's gateway response wait; connections and other commands retain their 30-second budgets. Set the client's tool deadline above this budget plus transport grace.translate_and_rewrite~77update_texts~10Security checks
- ✓README presentThe repository's README runs to about 4.6K words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- !Dependencies pinnedNo lockfile. Installs can pull different code over time.
- ✓No dynamic code executionScanned 203 source files and found no eval, dynamic Function or shell execution.
1 check has not been run yet.
Releases
README
The repository's README runs to about 4.6K words, fetched a month ago. The original in the repository is authoritative.
Read full README