Repository navigation
dwg-mcp v2.5.1
This release was prepared as 2.2.0 and ships as 2.5.1, the shared release number of the four bimwright gateways (rvt-mcp, dwg-mcp, nwd-mcp, ipt-mcp). The number does not mark breaking changes; the entries below list what changed since 2.1.2.
-
Update the gateway MCP SDK to 1.4.2.
-
Update the isolated AutoCAD scripting runtime to Roslyn 4.13.0.
-
Update Newtonsoft.Json to 13.0.4 and keep plugin JSON serialization compatible with older host-loaded versions.
-
Move the gateway to .NET 10 LTS. Setup includes the gateway runtime. The framework-dependent NuGet tool requires .NET 10.
-
Update the gateway SQLite provider and native engine used by ToolBaker and drawing history.
-
Add
BIMWRIGHT_KEEP_ALL_LOGS(1,true,yesoron) for the gateway and the AutoCAD plugin. When set, no log, call record, journal or report is deleted automatically: retention pruning, diagnostic and legacydebug.logcompaction and report retention are skipped, and the diagnostic log rolls to a timestamped archive instead of replacing its single backup. Rotation still happens. It never turns on a recorder or changes what is recorded. Startup writes one diagnostic line when it is on. Unset, retention is unchanged. -
Bound the generated view captures in
%LOCALAPPDATA%\Bimwright\dwg-mcp\captures\like rvt-mcp: after each capture written bydwg_capture_view_image,dwg_inspect_view_regionordwg_restore_view, generateddwg-capture-…images older than 30 days are deleted, then the oldest until the rest fits 200 MB. The capture just written, files you named, subfolders and other files are never deleted, andBIMWRIGHT_KEEP_ALL_LOGSkeeps every capture. -
Fix the Setup installer keeping plug-ins from an earlier release in the bundle. A year already in
Bimwright.Dwg.bundlebut not selected in this run is now replaced from the package, or removed with a warning when the package does not ship it, so every plug-in matches the installed server.-WhatIfpreviews the replace/remove actions andVerified:covers every year left in the bundle. -
The gateway now sends the MCP client name from
initializewith each request to the AutoCAD plugin (client_name, left out when the client sends no name). The plugin uses it only for the toast title; an older plugin ignores it.
Drawing edits and scripting
- Add opt-in
atomic=truetodwg_batch_execute. Supported drawing commands run in one outer AutoCAD transaction. A failed step, including a reported per-entity error, rolls back earlier changes and skips later steps. The gateway checksatomic_batch_versionbefore dispatch. The default remainsatomic=false. - Add
dwg_attach_image(issue #6). Link a local PNG, JPG, TIFF or BMP with an exact insertion point and width, optional height, rotation, layer and send-to-back. The image, definition, layer and draw order are written in one transaction. An existing definition is reused when its saved or resolved image path matches. Mapped network drives are refused. - Add
result_contract=task_v1todwg_send_code. Scripts returnMcpTaskResult.Pass(value)orMcpTaskResult.Fail(code, message, details). The result includes_task.status(passed,failedornot_reported). The gateway checksscript_task_contract_versionbefore dispatch. Calls withouttask_v1keep their legacy behavior. - Add optional
usage_context=project|test|unknowntodwg_send_code. The gateway records it only when call logging is enabled. Compiler diagnostics now include anexcerpt(issue #4) of up to two lines on either side of the error, a column marker and a 200-character cap per line. dwg_send_codetext results follow the family response limits, as in rvt-mcp: warning at 64 KiB, strong warning at 256 KiB, and above 1 MiB the result is saved to a localoutput_artifactwith a compact receipt. Before, they used the 80 MiB budget kept for inline images, so a script could return up to the plug-in's 10 MiB cutoff inline. Explicitly configured response thresholds still apply. Its receipt, and the plug-in's receipt for a result above 10 MiB, now carrymutation_applied: null; the gateway receipt also lists the stored result's key names inschema.dwg_send_codeleaves out a loaded DLL whose metadata Roslyn cannot read and lists it inskipped_references(rvt-mcp #38). Before, one such add-in failed every compile with CS0009.- Fix
dwg_save_drawingwithconfirm=trueand nooutput_pathfailing witheFilerErroron a drawing opened from disk. The active file is now saved in place through a temporary file, and AutoCAD keeps its.bakbackup. - Return
ACAD_BUSYorQUEUE_FULLwhen host admission rejects a request before it starts. - An older plugin is refused before anything is sent:
atomic=truereturnsATOMIC_BATCH_UNSUPPORTEDandresult_contract=task_v1returnsSCRIPT_TASK_CONTRACT_UNSUPPORTED. An atomic batch with a command outside the supported drawing reads and edits returnsATOMIC_UNSUPPORTED_COMMANDSbefore any step runs. Undertask_v1, a script that does not returnMcpTaskResult.PassorMcpTaskResult.FailgetsTASK_RESULT_REQUIRED.
Reports, workflows and localization
- Add
dwg_report_task_resultand theMCPREPORTSwindow. Entity links can activate another drawing that is already open. Reports support clickabledwg:entity links for selection and zoom. The AutoCAD toast can open the report. Successful write responses can include a_reportreminder when reporting is enabled in the tool catalog. - Expose the MCP prompts
dwg_translate_textanddwg_review_large_drawing. Translation requires review before writeback. Large-drawing review uses WCS bounds and band clustering. Read-only sessions omit writeback and image capture. - Check for stable releases in the background at most once per 24 hours and show an optional notice in AutoCAD. Settings can disable the notice. The notice links to release information.
- Add opt-in SQLite history for supported committed drawing edits.
dwg_record_changerecords the goal and reason,dwg_get_change_recordsqueries saved records, anddwg_survey_change_impactinspects supplied handles for context. Reports accept optionalcall_idsanddwg_get_report_historyreads saved provenance even with AutoCAD closed. - Add English, Vietnamese and Simplified Chinese catalogs for the plugin UI. English is the default. Language changes in Settings take effect after restarting AutoCAD.
dwg_report_task_resultsaves each report as a local file under%LOCALAPPDATA%\Bimwright\dwg-mcp\reportsand never changes a drawing. Links that do not resolve come back inlinks.unresolved. Sending the sametask_idagain from the same gateway session replaces the report. Reports older thanreportRetentionDaysinsettings.json(1 to 3650, default 30) are deleted when AutoCAD starts.- Drawing history capture is off by default. Set
BIMWRIGHT_DWG_ENABLE_CHANGE_HISTORY=trueon the gateway to turn it on;--read-onlynever captures, anddwg_record_changereturnsHISTORY_DISABLEDwhile it is off. Each drawing's history is stored in%LOCALAPPDATA%\Bimwright\dwg-mcp\history\<drawing_key>.db. - The release check is on by default and contacts
api.github.com. Turning off Check for new dwg-mcp releases in Settings (releaseNotificationsEnabledinsettings.json) stops the lookup as well as the notice.
Toast
Update the gateway and plugins together to see the agent name; an older gateway leaves it out.
- The card title names the agent of the latest call from its MCP client name:
dwg-mcp 2027 · Claude(Claude, Codex, Cline, Cursor, Windsurf, Antigravity, Gemini, Copilot, VS Code; any other client shows its own name, cleaned and capped at 20 characters). The gateway sends the name with each call (client_name); it is display text only. - The AutoCAD process ID (
· PID 12345) fades in when you point at the card and fades out when you leave, with or without branding. It no longer shows all the time. - Pause for today: a button at the foot of the expanded card, and a switch in
MCPSETTINGS→ Toast, hide every card (errors included) in every AutoCAD on this computer until local midnight. Pressed on the card, the card stays open and the button turns into Resume, so a mis-click is undone at once. The choice is saved as the local date intoastSnoozedDate. Turn the switch off, or runMCPTOAST, to show cards again now; turning toasts on fromMCPTOASTor Settings also ends the pause. While paused (or disabled),dwg_report_task_resultreturnstoast: "disabled"(otherwise"shown").
Large drawings and open documents
dwg_list_blocksreports direct and nested references and unused definitions (issue #4).dwg_get_drawing_profilecan page unused block definitions and collect opt-in DBText/MText counts, a height histogram and bounded samples. Profile pages preserve coverage and continuation under the response budget.dwg_list_layers(include_counts=true)adds opt-in entity counts (issue #4). Type filters normalizeAcDbaliases, and zero-match count and select-by-type results can suggest types present in the requested space. Usedwg_query_entitiesfor selection by WCS bounding box.- Add
dwg_list_open_documentsand standalonedwg_activate_document(issue #4). Verify the new drawing withdwg_switch_targetbefore writing. - Add read-only
dwg_cluster_bands(issue #4) for X/Y band clustering with gap, WCS bounding-box, space and type filters, optional plain-text samples and cursor pagination. Entities without usable extents are counted separately. - The catalog exposes 54 tools by default and 78 with
--toolsets all. Read-only mode exposes 23 by default and 29 with all toolsets.
Distribution
Setup includes the self-contained Windows x64 gateway and AutoCAD 2022–2027 plugins. NuGet contains the gateway only and requires .NET 10. The Claude Desktop MCPB requires the exact Setup gateway SHA-256 (29db69ac813ca67c74b7c93bb23216d814eeeb1afbea0631aec4cf0cbaac74b9), including executable overrides. All three packages have SHA-256 sidecars.
Validation
- CI run 45126043406 on
master(549a3f0):public-tree,server,toast-wpf,installer-powershell,installer-pwsh, andplugin-acad22–plugin-acad27all passed. - Live tool benchmark on AutoCAD 2025 (build
17a0532): 78/78 tools, 166/166 calls passed (docs/benchmarks/2026-11-23-autocad-2025.md). - MCPB catalog capture and validation on
2.5.1+549a3f0715b3f1b98b54bfeee00b38283fde7e77: 78 tools, schema SDK 1.27.1 PASS,mcpb validatePASS.
Source commit: 549a3f0715b3f1b98b54bfeee00b38283fde7e77.