Repository navigation
This release was developed as 3.0.1 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 v1.2.2.
- Catalog counts:
--toolsets all257, adaptive bake 260, and bare defaults 63.
Controlled failures and Issues
Install the 2.5.1 gateway and add-ins together. TaskDialog declarations require the matching gateway and add-in protocol, and expire even if you switch away from a document and back. If the document changes before a queued command starts, Revit rejects the command before it runs.
- Advance TaskDialog answers:
revit_set_dialog_answersvalidates exact permitted pairs, scopes declarations to the next write or gateway session (a target or active-document change drops them and reports_dialogAnswersonce), requiresdialog_answers_v2, and records authorization/native outcome in Issues. User choices retain priority; denied pairs and native failure guards remain enforced. - Open an issue for the user:
revit_show_issueopens History → Issues in Revit on one recorded incident, with all states shown, its model and incident selected and an optional suggested action highlighted. It records nothing; the user still reviews, ticks the review box and clicks the action. - History → Issues opens on All states every time, so models whose only incidents are observed (user-answered dialogs) stay listed.
- When a user rule or grant answers a dialog the agent had declared,
_failure.groups[]now says so withagentDeclarationNotUsed, and thenextStepfor a rule-answered dialog no longer talks about warnings. - Windows without a Revit dialog event (an add-in's MessageBox, a file dialog): a read-only background probe in the add-in now notices a window that blocks Revit and waits for the user. During an MCP call the pending receipt says
REVIT_OPERATION_REQUIRES_USERafter about 2 seconds with_operation.dialog.kind=window(title, text and button labels), instead of waiting for the timeout;revit_get_operation_statusreports the same window while it is open, and the final_failure.groups[]lists it withansweredBy=user(a window whose model is not certain goes to_operation.windowDialogsWithoutModelinstead; past 20 per operation,omittedWindowDialogscounts the rest). A window left open outside MCP refuses new calls at once withREVIT_BUSYand_operation.window(its title only), queued calls returnREVIT_REQUEST_NOT_STARTEDat once, andrevit_healthreportswaiting_for_user. The probe never clicks or closes anything;BIMWRIGHT_RVT_WINDOW_PROBE=0turns it off. See controlled failures. - Advance dialog answers and the window probe are part of #16 (Revit dialogs that hold up MCP calls), from #39.
- Issues → Reset keeps the newest five ledger backups in
failures\backups\: after a reset, olderledger-<date>-<time>.dbbackups and their.pendingfolders are deleted. Other files in that folder are never touched, andBIMWRIGHT_KEEP_ALL_LOGS=1keeps every backup.
Capture output folders
revit_capture_view_imagecan write into folders you allow beside%TEMP%and the captures folder: list them incaptureRootsinrvtmcp.config.json(an array, or one string separated by;) or inBIMWRIGHT_CAPTURE_ROOTSin the Revit process environment. Only absolute local folders count; nothing is added by default.- The captures folder is now bounded: after a capture is saved there, captures with a generated name (
capture-<date>-<time>-<id>…) older than 30 days are deleted, then the oldest until the rest fits 200 MB. A file you named yourself, a subfolder,%TEMP%and yourcaptureRootsfolders are never cleaned.BIMWRIGHT_KEEP_ALL_LOGS=1keeps every capture. revit_capture_view_imageaccepts anoutput_pathin the user's own%TEMP%folder. Revit runs withTEMPset to a per-session subfolder, so such a path was refused although the message named%TEMP%.- A refused
output_pathreturns the allowed folders asallowed_roots(the paths in the error text are masked) and the next step: omitoutput_pathand copy the saved file, or ask the user to allow the folder.
Toast
Update the gateway and add-ins 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:
rvt-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; it is display text only. - The Revit process ID (
· PID 30476) 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 Settings → Toast, hide every card (errors included) in every Revit 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 in
toastSnoozedDate. Turn the switch off, or press the ribbon Toast button, to show cards again now; turning toasts on from the ribbon or Settings also ends the pause. While paused,revit_report_task_resultreportstoast: "disabled".
Build/deployment dependencies
- Move the standalone MCP server and its unit tests to .NET 10; require SDK 10.0.404 or a later patch in the same feature band. Revit 2022–2024 plugins retain .NET Framework 4.8.
- Update ModelContextProtocol and AspNetCore 1.1.0 → 1.4.2, Microsoft.Data.Sqlite 8.0.11 → 8.0.34, native SQLite package 2.1.13 → 2.1.14 (SQLite 3.54.0), Roslyn 4.8.0 → 4.13.0, System.Drawing.Common 8.0.0 → 8.0.34, xUnit 2.9.0 → 2.9.3, and Test.Sdk 17.10.0 → 17.14.2. Hosting and Windows principal APIs now come from the .NET 10 framework instead of redundant package references.
- Retain Newtonsoft.Json 13.0.3 and the existing Revit API references; Roslyn remains below 4.14 for the .NET 8 plugin dependency layout.
- The server-only NuGet tool package
RvtMcp.Servertargets .NET 10, sodotnet tool installneeds the .NET 10 runtime. The Setup ZIP still bundles a self-contained server.
Document lifecycle
- Add
revit_get_document_statetometaand the opt-indocumentstoolset withrevit_save_document,revit_save_checkpointandrevit_manage_checkpoints. State reads exclude loaded links and report an unavailable or busy document index without losing other document results. - Save checks mode, external file changes and format-upgrade consent. Local models and families use a per-user record of a minimum 20-backup limit; workshared local save does not sync central. Checkpoints are verified copies; pruning requires an approved dry-run hash, and restore creates a separate file. A checkpoint failure can follow a successful save. Save, checkpoint and checkpoint management take
timeout_seconds(1–900, default 600). See document lifecycle. - A
.rteopened for editing is atemplateand is never saved in place. An unsaved document or a template is saved once withrevit_save_document(save_as_path)to a new local.rvtthe user names, which starts a project from a template; an existing file is never overwritten. Path rules and the template guard come fromrevit_save_modelin #29; thanks @gbwzzy218. revit_open_model:- Expands environment variables such as
%USERPROFILE%in the Revit.iniProjectPath. - Stops when
ProjectPathis empty or is still not a full folder path, and names File > Options > File Locations > Default path for user files. - Refuses a workshared model saved in an older Revit before any local copy is created (
WORKSHARED_UPGRADE_NEEDS_USER).
- Expands environment variables such as
- The native open/save guard identifies a central by its stored central path rather than the header flag. Opening a newly created local and saving it the first time no longer need a grant; opening or saving a central still does.
FILE_CHANGED_ON_DISKcan follow Reload Latest in Revit's UI on a workshared local, which advances the save count in memory but not on disk. The document lifecycle guide says what to do: ask the user to review the local and save it in Revit (not Synchronize with Central), readrevit_get_document_stateagain, then retry. Without a known UI Reload, check for an external file replacement first; the file is never overwritten to clear the error.
Wall top constraints
revit_set_wall_topinmodify: attaches walls' top constraint to a level with an optional offset, checking every wall first so a top at or below a wall's base changes nothing. From #29; thanks @gbwzzy218.
View style, orientation and camera views
revit_set_view_style,revit_set_view_orientationandrevit_create_camera_viewinview: set display style and detail level, aim a 3D view from eye and target points, and create or re-aim perspective camera views, so an agent can frame and capture its own result withrevit_capture_view_image. From #28; thanks @gbwzzy218.- Named 3D views and cameras save the new orientation, which Revit Undo restores. The default 3D view (
{3D}, or{3D - user}when workshared) is a viewing view: only its temporary camera moves, nothing is saved, and the result reportsorientation_saved: false. A failed call leaves the camera where it was. New cameras turn off Far Clip Active and reportfar_clip_active. revit_set_view_orientationwithoutfitturns off the crop box only on the default 3D view. A named view keeps its crop box, since it may be placed on a sheet, unlessfit=true;fit=falsechanges neither crop nor zoom.- The
revit_set_view_orientationdescription tells the agent to pass the returnedview.view_idtorevit_capture_view_image, which otherwise exports the active view.
Mesh import
revit_create_mesh_shapesingeometry: builds DirectShape elements with materials from a local JSON mesh file (vertices in mm, triangle or quad faces), for freeform massing without arbitrary code. One transaction per file; closed, consistently wound meshes are built as solids, and other meshes as open shells that fall back to mesh geometry when Revit cannot make a solid. Existing materials are reused unchanged unlessupdate_materials=true; each call is capped at 64 MB and 500,000 faces, and network paths are refused. It is opt-in with thegeometrytoolset, which installed setups enable throughall. From #30 for #26; thanks @gbwzzy218.
Move and rotate
- Add typed
revit_move_elementsandrevit_rotate_elementscommands with explicit model-space units, atomic selection validation, placement checks and native Undo. Rotation has no default pivot: pass one explicit pivot for the whole selection, orpivot_mode="each_location"to turn each element in place about its insertion point or location-line midpoint. See usage and verification. From #27; thanks @kiselas. - Rooms and model groups move and rotate too. Their location point has no readable rotation, so only their position is checked and
rotation_degreesisnull.pivot_z_mmis optional and defaults to 0, since it does not change a turn about a vertical axis; withoutpivot_x_mmorpivot_y_mmthe error names both choices (one pivot, orpivot_mode="each_location"). When Revit holds back a transform, the error names the element, and all changes are rolled back.
Send code and baked tools
revit_send_code_to_revitcompile errors carry ahintcomputed from the Revit API the script was compiled against (in the error text and indiagnostics[].hint):- A missing member (
CS1061,CS0117) names where it really is: a subtype to check and cast to, a property that leads to it (x.Application.FamilyTemplatePath), the types that have it, or that no API type has it. The closest members of the type follow. - A wrong call (
CS1503,CS1501,CS7036,CS1620,CS1615,CS1729) shows the real signatures, the overload that accepts the named argument first. A type with no public constructor lists its static factories (Plane.Create…). - An unknown type or name (
CS0246,CS0103) names theusingto add: a Revit namespace, or the namespace of another referenced assembly (Regex→System.Text.RegularExpressions). - A hint is given once per compile. The first one builds a name index of the loaded Revit API (about 0.3 s, 4 MB, once per Revit session).
- A missing member (
- New read-only tool
revit_describe_api(inmeta; also with--read-onlyand--disable-send-code) lists one Revit API type as loaded in the running Revit: constructors and static factories, properties with get/set, methods with parameter types, operators, enum values, obsolete marks with their replacement text, base types and direct subtypes. Inherited members are grouped by the API type that declares them;membernarrows the list, which is capped at 200 lines. It reads no document. The add-in advertisesdescribe_api_v1; with an older add-in the gateway refuses the call withCAPABILITY_REQUIREDbefore sending it. revit_send_code_to_revitaccepts more of the script shapes agents write:- A body that declares its own
app,uidocordocat the top level keeps its own; the generated one of that name is left out instead of failing withCS0128/CS0136. - A full
McpDynamicScriptsource without anyusinggets the default imports. A source with its own usings is compiled as written. - A body that closes
Runitself and leaves its last helper type or method open is repaired before compiling: the stray}is dropped in place (line and column numbers stay yours) and the missing one is added at the end. The response says so inscript_repair. Only that exact shape is repaired; any other stray}(CS1022) is refused with a hint on the expected shape.
- A body that declares its own
- A DLL loaded in Revit whose metadata the C# compiler cannot read (for example a protected assembly from another add-in) no longer makes every
revit_send_code_to_revitand baked-tool compile fail withCS0009. The file is left out of the compile references and written to the diagnostic log. Send-code results then includeskipped_references(name,reason), and compile errors list the skipped names. Fixes #38.
Server memory
- The MCP server runs Workstation GC instead of the Server GC that
Sdk.Webturns on, matching the other bimwright gateways. Each MCP client starts its own server, and Server GC kept one heap and GC thread per core. On a 20-core machine, an idle server drops from about 160 MB to about 70 MB private memory and from about 40 to 21 threads; after a burst of largerevit_send_code_to_revitresults it keeps about 135 MB instead of about 750 MB. Call latency and CPU time are unchanged. SetDOTNET_gcServer=1to bring back Server GC. From #36; thanks @PhanCongVuDuc.
Logs
- Local logs rotate once per day instead of on every write. Daily rotation compared the log's creation time, which Windows gives back to a file re-created right after a rename, so each call left a one-line archive and every later write scanned them all; tens of thousands of archives made a large
revit_send_code_to_revitcall take about 10 s. Rotation now uses the last write time, and log maintenance reads file sizes and times in one directory pass. Archives already created are removed by the existing 30-day retention. BIMWRIGHT_KEEP_ALL_LOGS=1(alsotrue,yesoron) keeps every record. Set it in the gateway's and the Revit process's environment; each reads its own. Automatic deletion of call logs, daily journals, send-code journals, usage and bake audit records, diagnostics, agent reports, generated captures and Issues → Reset backups beyond the newest five is skipped. Files still rotate to timestamped archives, the diagnostic log rolls to a timestamped archive instead of overwriting its one backup, and nothing is trimmed. It turns no log on and changes neither what is recorded nor the send-code body TTL. Keeping the send-code journal past its 7-day purge after disabling is the one deliberate exception to that journal's time limit. Spill files, checkpoints, discovery files and explicit deletions are unchanged; unset, retention is unchanged.
Agent reports
revit_show_reportinmeta: opens the Reports window on one saved report by itsreport_id, as a click on the report toast does, so the agent can show a report the user asks for instead of describing where to click. It does not change the model and stays available with--read-only. A deleted or expired report returnsREPORT_NOT_FOUND. See agent reports.
Tags, dimensions and sheets
revit_tag_all_wallsskips walls that already have a tag, as its description said; a second call no longer tags every wall again. Wall tags and multi-category tags count, so a keynote or material tag does not hide a wall. Existing tags are read as the elements the view owns: on a large plan the view-scoped read missed about half of them, and a second call tagged 42 walls again. A tag hidden in the view still counts as a tag. It returns the new tag ids,alreadyTagged, walls without a location curve underskippedNoLocationCurve, and walls that could not be tagged by id withfailedCount. When no wall can be tagged the call fails and changes nothing. Fixes #40.- The tag tools read existing tags the same way, with room tags collected by category.
revit_find_untagged_elementsno longer reports tagged rooms as untagged, andrevit_tag_all_roomsandrevit_tag_all_areasread existing tags the same way. A scan of existing or visible elements that cannot finish is now an error, instead of answering as if the view had no tags or the element were hidden; a tag's hosts are used only after a complete read. Fixes #41. revit_tag_elements,revit_tag_all_by_category,revit_tag_all_walls,revit_find_untagged_elementsandrevit_tag_structural_framingrefuse a sheet and name the views placed on it that can hold tags (not renderings, legends or drafting views) with their ids;revit_tag_all_walls, which works on the active view, says to activate one of them withrevit_activate_view. Text notes on sheets are unchanged. Fixes #42.revit_create_dimensionsdescribes its references (mode,element_id, andstable_referenceforexplicit_reference_stable) with an example. When no dimension is created (fewer than two references resolve, no line can be inferred, or Revit refuses the line) it fails withcreated: falseandfailed_referencesin the data, instead of returning success. Parameter validation checks each reference's required fields andmode, and its hint lists the allowed values instead of pointing to an Example section. Fixes #43.revit_create_dimensionswithmode: wall_centerlineworks: the reference now comes from the wall's location line in its geometry (the line set by the wall's Location Line, which may be a face), and only a referenced line within 1 mm of the location line is used; otherwise that reference fails. Before, it failed for every wall. Withoutline, parallel references in a plan view are dimensioned across, perpendicular to them; the old inference from bounding-box centres was refused by Revit for walls of different heights, so in a plan view it now keeps the line at one elevation, while sections and elevations keep a vertical dimension. Curved walls are refused per reference.revit_batch_executerolls back when a tag or dimension step partly fails:revit_tag_elements,revit_tag_all_by_category,revit_tag_all_rooms,revit_tag_all_areasandrevit_create_dimensionsnow reportfailedCount. A failed step keeps its data in the batch result, for examplefailed_references. Fixes #45.revit_create_line_based_elementrefuses atypeIdthat is not a wall type, instead of creating the wall with the default type; wall is its onlyelementType.revit_get_available_family_typesno longer suggests system categories such as Walls or Pipes, and tool descriptions that pointed to other tools now use theirrevit_names.revit_list_family_types_in_familytakes thesystem:<typeId>idrevit_list_loaded_familiesreturns and lists the id of every type in that system family, including wall types with no instance. Fixes #44.revit_ai_element_filterwithout a parameter filter reads onlylimitelements and counts the category natively. With a filter it still tests every element sototalFoundstays exact; the description says so. Fixes #46.revit_place_view_on_sheettakes optionalxMm/yMm(both or neither) in sheet paper millimetres, likerevit_place_schedule_on_sheet. Without them the viewport stays at the fixed default point (304.8, 228.6) mm as before;revit_align_viewportswithcenter_on_sheetcentres it on the title block afterwards. The response returns the placedcenter{u,v} in mm andplacement(requestedordefault_point). Fixes #47.- Parameter validation in every tool also checks objects inside an array parameter, one level deep: required fields, property types and allowed values. The hint describes what the schema allows for the failing field instead of pointing to the description's Example section, and the gateway now passes the add-in's
Suggestion:andHint:lines on in the error text; before, only the error line reached the agent. - The tool summaries in Settings now match the changed descriptions of the nine tools these fixes touched (for example
revit_create_dimensions, which Settings still showed as an array of element-reference objects), in every UI language.
Rooms and areas
revit_list_areasreports each area'sarea_schemeand filters byarea_scheme_nameagain. Areas are model elements with no owner view, so the scheme read from the owner view was null for every area and the scheme filter matched nothing; the scheme now comes from the area itself, with the owner view as a fallback. Fixes #55; from #56, thanks @tal-sm.
Distribution
Setup includes the self-contained Windows x64 gateway and Revit 2022–2027 plugins. NuGet (RvtMcp.Server) contains the gateway only and requires .NET 10. The Claude Desktop MCPB requires the exact Setup gateway SHA-256 (90494b912d5795f1a4bc32d4f5b71b7ecd8b377e699209819a3e0079ad7d6123), including executable overrides. All three packages have SHA-256 sidecars.
Validation
- CI run 45137108582 on
master(aedb764):public-tree,tests-xunit,installer-powershell,installer-pwsh,plugin-r22–plugin-r27,server-nuget,client-setup-zipall passed. - MCPB catalog capture and validation on
2.5.1+aedb764b287c5a12ace05d410bcf35689914c5d1: 260 tools (--toolsets all+ adaptive bake), schema SDK 1.27.1 PASS,mcpb validatePASS.
Source commit: aedb764b287c5a12ace05d410bcf35689914c5d1.