Odel
Bimwright

Bimwright

Local
@bimwright19C#Apache-2.0Updated 1w ago

MCP gateway for Autodesk Revit 2022-2027 - toolset gating + Transaction-safe batch execution.

rvt-mcp

rvt-mcp

MCP gateway for Autodesk Revit — local tools for agents, optional personal bake loop

build license Revit 2022-2027 MCP tools

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


Install

Client machines should use the setup ZIP from GitHub Releases. It bundles a self-contained MCP server and Revit 2022–2027 plugins — no .NET SDK, NuGet global tool, or source clone.

AI agents: download RvtMcp.Setup-*-win-x64.zip from the latest release and run the installer. Do not clone, build, or dotnet tool install unless the user asked for a developer setup. Protocol: AGENTS.md.

$tag = (Invoke-RestMethod https://api.github.com/repos/bimwright/rvt-mcp/releases/latest).tag_name
$zip = "$env:TEMP\RvtMcp.Setup-$tag-win-x64.zip"
$dir = "$env:TEMP\RvtMcp.Setup-$tag-win-x64"
Invoke-WebRequest "https://github.com/bimwright/rvt-mcp/releases/download/$tag/RvtMcp.Setup-$tag-win-x64.zip" -OutFile $zip
Expand-Archive $zip -DestinationPath $dir -Force

powershell -ExecutionPolicy Bypass -File "$dir\install.ps1" -WhatIf
powershell -ExecutionPolicy Bypass -File "$dir\install.ps1"

The installer detects Revit 2022–2027, installs matching plugins, copies the server under %LOCALAPPDATA%\RvtMcp\rvt\server\<version>\, and wires detected MCP clients. Override with -Client codex|opencode|claude|kilo|none.

Do not install v0.5.0 or earlier ZIPs. Do not dotnet tool install -g Bimwright.Rvt.Server (legacy 0.1–0.3). Do not use NuGet instead of this ZIP on a Revit client machine — the tool package has no add-in.

For AutoCAD, use dwg-mcp separately — different product, different install.

Check that it works

  1. Open Revit with a model.
  2. Start the MCP connection from the ribbon (BIMwright / RvtMcp panel).
  3. From the MCP client, list tools, then call revit_get_current_view_info.

You should get something like:

{ "viewName": "Level 1", "viewType": "FloorPlan", "levelName": "Level 1", "scale": 100 }

If that fails, install is not done yet — fix client config / plugin load before anything else.

Uninstall

From the setup ZIP root (or this repo’s scripts/):

# Setup ZIP layout:
powershell -ExecutionPolicy Bypass -File .\uninstall.ps1 -WhatIf
powershell -ExecutionPolicy Bypass -File .\uninstall.ps1 -Yes

# Clone layout:
powershell -ExecutionPolicy Bypass -File .\scripts\uninstall-all.ps1 -WhatIf
powershell -ExecutionPolicy Bypass -File .\scripts\uninstall-all.ps1 -Yes

Removes plugins, self-contained server, client entries, discovery files, logs, and ToolBaker cache.

Developer install

git clone https://github.com/bimwright/rvt-mcp.git
cd rvt-mcp
dotnet build src/RvtMcp.sln -c Debug
powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1 -SourceDir . -Client none

Close every Revit first — the build deploys plugin DLLs into %APPDATA%\Autodesk\Revit\Addins\<year>\RvtMcp\. install.ps1 finds Revit 2022–2027, copies the server under %LOCALAPPDATA%\RvtMcp\rvt\server\<version>\, and wires detected MCP clients (-Client codex|opencode|claude|kilo|none, -Years 2024 for one year).

Optional — NuGet server only (does not install Revit plugins). Use this if the add-in is already on the machine (ZIP or a local build) and you want the MCP server on PATH:

dotnet tool uninstall -g Bimwright.Rvt.Server   # skip if you never installed the 0.1–0.3 tool
dotnet tool install -g RvtMcp.Server --version 0.6.1

Command name: rvt-mcp. Keep using the GitHub Release ZIP for plugins. Bimwright.Rvt.Server is obsolete.

Migrating from Bimwright.Rvt.* (v0.3 and earlier)

v0.4+ renamed packages and folders to RvtMcp.* (repo name and brand stay bimwright).

  1. Close every Revit.
  2. pwsh scripts/uninstall-old.ps1 — drops old %APPDATA%\…\Bimwright\ plugins and old server root; keeps user bake/journal data and migrates it to %LOCALAPPDATA%\RvtMcp\ on first new launch.
  3. Install the current GitHub Release ZIP (Client install above). Do not install v0.5.0 or earlier packages. Uninstall the old global tool if present: dotnet tool uninstall -g Bimwright.Rvt.Server.
  4. Point MCP clients at entry name rvt-mcp (old per-year bimwright-rvt-r22… entries are removed by the installer).

What this is

rvt-mcp is a local bridge between an MCP client (Claude, Cursor, Codex, OpenCode, …) and a running Revit session.

Two processes:

PieceRole
RvtMcp.Server.NET 8 MCP server on stdio. No Revit reference — builds anywhere.
RvtMcp.PluginOne thin add-in per Revit year (2022–2027). Runs inside Revit, executes on the UI thread.

Agent → MCP → server → localhost TCP (≤2024) or Named Pipe (≥2025) → plugin → Revit API.

Everything stays on the machine. No cloud relay is required for the gateway itself.

There is no Node/TypeScript sidecar. Server, plugins, handlers, and ToolBaker are C# end to end. Shared command code lives in src/shared/; each year is a small shell project with #if where the API drifted. Details: ARCHITECTURE.md.


Why it exists

People who live in Revit already know what they want automated. The friction was always shipping that idea as software: learn enough C#/Dynamo, fight the API, package an add-in, survive version upgrades — or pay someone else, or buy a fixed tool that only half-matches the office.

Agents change the first half of that loop (describe the task, try it live). They do not remove transactions, units, selection, worksharing, or “did this just trash the model?” That is what this gateway is for: a typed tool surface for common work, plus an escape hatch when you need ad-hoc C# inside Revit, plus an optional path to turn repeated local patterns into personal tools (ToolBaker).

It is not a universal add-in for every firm. Offices differ. The bet is: start from a shared runtime, grow your tools on top.

Scope posture (honest): we do not mint a new MCP tool for every edge case. Prefer typed tools when they exist; for everything else use revit_send_code_to_revit (C# only). Family project management is covered; full Family Editor authoring suites and Revit Viewer hosts are out of scope for now — see docs/roadmap.md.


How a normal session looks

  1. Revit open with a model; plugin connected (ribbon).
  2. MCP client starts rvt-mcp / the installed server.
  3. Agent uses tools: query view/selection, create grids/rooms, sheets, MEP, export, … Lengths in mm at the tool boundary.
  4. Several writes in one undo step: revit_batch_execute.
  5. Multiple Revits running: revit_list_available_targets then revit_switch_target with a four-digit year (2024, not R24).

When no typed tool fits:

revit_send_code_to_revit   # C# body, compiled and run inside the plugin

That tool is on by default (toolset meta). Strip it with --read-only or --disable-toolbaker if you do not want agents compiling code in the model.

ToolBaker (optional)

Default surface includes revit_send_code_to_revit. revit_list_baked_tools / revit_run_baked_tool need --toolsets toolbaker (or --toolsets all).

Adaptive bake (suggest new tools from usage) is off unless you enable it. When on, repeated patterns can show up under revit_list_bake_suggestions; you accept or dismiss explicitly. Nothing ships itself into your ribbon without that step.

Useful flags (also JSON / env — see Configuration):

GoalWhat to turn on
Learn tools from repeated typed calls--enable-adaptive-bake
Also cluster send_code bodies for suggestionsplus --cache-send-code-bodies (redacted; still local)
Short-lived disk journal of send_code bodiespersistSendCodeBodies + TTL (default privacy keeps this off)

Bake compile runs inside Revit via Roslyn — end users do not need Visual Studio. Details and privacy notes: docs/bake.md.

Toast (optional)

Completion toast in Revit is off by default. Turn on with the ribbon Toast button, enableToast in config, or BIMWRIGHT_ENABLE_TOAST=1. Only finished calls are shown (no “in progress” toast). Capture success can show a thumbnail when the file sits under the path allowlist. Ribbon Status also prints toast + bake/privacy flags so you can see what is enabled without guessing.


Architecture (short)

MCP client (stdio)
    → RvtMcp.Server (.NET 8)
        → TCP (Revit 2022–2024) or Named Pipe (2025–2027)
            → Plugin shell (per year)
                → ExternalEvent → Revit API / transactions / undo

Handlers return plain DTOs — never live Revit objects on the wire.


Tools

Counts (without counting personal baked tools):

ModeToolsNotes
Default40query + create + view + meta
--toolsets all229Full catalog
all + adaptive bake232Adds 3 suggestion-lifecycle tools

Tool names are MCP-facing as revit_*. Wire names between server and plugin stay unprefixed snake_case.

Default-on toolsets: query, create, view, meta

Off unless you ask: everything else (export, geometry, mep, structural, toolbaker, modify, delete, …).
Example: --toolsets query,view,meta or --toolsets all.
--read-only drops every write-capable toolset (including create).

ToolsetWhat it coversDefault
queryView, selection, filters, stats, parameters, relationships, worksets, groups/assemblieson
createGrids, levels, rooms, line/point/surface-based elements, groupson
viewCreate views, sheets layout helpers, capture image, crop/scaleon
metaBatch execute (max 20), multi-Revit targets, project info, purge unused (MVP), message, send_codeon
lintView naming patterns, firm-profile detect, warnings summaryoff
scheduleList/create schedules, fields, formulas, dataoff
familiesLoad/unload, types, instances, audit, export .rfa (project-side)off
modifyOperate/color elements, set parameters, change type, workset assignoff
deleteDelete by idoff
annotationTags, text, dimensions, regions, keynotes, checksoff
exportPDF/DWG/IFC/NWC helpers, room data, and related export toolsoff
mepSystems, connectors, networks, place terminals/fixtures, etc.off
graphicsView filters, overrides, visibility/phaseoff
toolbakerlist/run baked tools; suggestion tools only if adaptive onoff
sheetsSheets, titleblocks, revisions, renumberoff
materialsMaterials, appearance, assignment, takeoffoff
geometryBBox, measure, clash, volume/area, …off
roomsRooms/areas/spaces, finishes, separatorsoff
linksRevit/CAD links, coordinate audit, acquire/publish coordinatesoff
parametersProject/shared parametersoff
organizationSaved selections, view templatesoff
workflowsComposite clash/audit/sheet/takeoff-style flowsoff
structuralColumns, beams, foundations, rebar, loads, …off
keiActive KEI project DB path, query/write SQLite (WAL-safe), equipment importoff

Representative tools

Not a full dump of 200+ schemas — just anchors agents and humans use often:

ToolsetToolRole
queryrevit_get_current_view_infoActive view type, level, scale
queryrevit_get_selected_elementsCurrent selection
queryrevit_ai_element_filterCategory + parameter filter (mm)
queryrevit_get_element_detailsLocation, bbox, workset, phase, …
createrevit_create_grid / revit_create_level / revit_create_roomCore layout
createrevit_create_point_based_elementDoors, furniture, … from type id
viewrevit_capture_view_imageRaster capture (path allowlist)
metarevit_batch_executeOne TransactionGroup for several commands
metarevit_list_available_targets / revit_switch_targetMulti-Revit
familiesrevit_load_family_from_pathLoad .rfa into the project
linksrevit_get_project_coordinate_system / revit_get_link_coordinate_systemHost/link origins, sites, transforms, True North
toolbakerrevit_send_code_to_revitEscape hatch (C#)
toolbakerrevit_list_baked_tools / revit_run_baked_toolPersonal accepted tools
toolbakerrevit_list_bake_suggestionsAdaptive only
lintrevit_analyze_view_naming_patternsNaming outliers

Golden snapshots in tests pin the exact surface; if counts and code disagree, trust tests/code.


Supported Revit versions

RevitPlugin TFMTransport
2022–2024.NET Framework 4.8TCP
2025–2026.NET 8 (net8.0-windows7.0)Named Pipe
2027.NET 10 (net10.0-windows7.0)Named Pipe

Compile matrix covers all six shells. Runtime depth still varies by year — bake and custom C# should be rechecked on the years you care about.

Host: full Revit desktop only. Revit Viewer is not a supported target.


Security and privacy

  • Transport is local by default (loopback TCP / local named pipe).
  • Discovery files under %LOCALAPPDATA%\RvtMcp\ include a per-session auth token.
  • Tool arguments are schema-checked before handlers run.
  • Errors returned to the model are sanitized (path leakage reduced).
  • send_code can run arbitrary C# in the Revit process — powerful and risky; disable toolbaker if that is unacceptable.
  • Adaptive bake, body cache, and TTL journals are opt-in and stay under the user profile. Defaults do not write raw send_code bodies to long-lived logs.

More: SECURITY.md, docs/bake.md.


Configuration

Precedence, high wins: CLI → env (BIMWRIGHT_*) → %LOCALAPPDATA%\RvtMcp\rvtmcp.config.json.

SettingCLIEnvJSON
Target year--target 2024BIMWRIGHT_TARGETtarget
Toolsets--toolsets query,createBIMWRIGHT_TOOLSETStoolsets
Read-only--read-onlyBIMWRIGHT_READ_ONLY=1readOnly
LAN bind (plugin)BIMWRIGHT_ALLOW_LAN_BIND=1allowLanBind
ToolBaker surface--enable-toolbaker / --disable-toolbakerBIMWRIGHT_ENABLE_TOOLBAKERenableToolbaker
Adaptive bake--enable-adaptive-bake / --disable-adaptive-bakeBIMWRIGHT_ENABLE_ADAPTIVE_BAKE=1enableAdaptiveBake
Cache send_code bodies (bake clusters)--cache-send-code-bodies / --no-…BIMWRIGHT_CACHE_SEND_CODE_BODIES=1cacheSendCodeBodies
Persist send_code journal--persist-send-code-bodies / --no-…BIMWRIGHT_PERSIST_SEND_CODE_BODIES=1persistSendCodeBodies
Journal TTL--persist-send-code-bodies-for 4hBIMWRIGHT_PERSIST_SEND_CODE_BODIES_TTLpersistSendCodeBodiesUntil
Completion toastribbon ToastBIMWRIGHT_ENABLE_TOAST=1enableToast

After changing server flags, restart the MCP connection so the client picks up the new tool list.


MCP clients

ClientWiring
Claude Codeproject .mcp.json or ~/.claude.json
Claude Desktop%APPDATA%\Claude\claude_desktop_config.json
OpenCode / Codex / Kiloinstall.ps1 -Client … (scripted)
Cursor / Cline / VS Code Copilotdocumented JSON layouts
Gemini CLI / Antigravitygemini mcp add or settings JSON

Installer auto-detect is usually enough; see AGENTS.md and docs/mcp-config-*.md when hand-editing.


Repo layout

rvt-mcp/
├── src/
│   ├── RvtMcp.sln
│   ├── server/            # MCP server
│   ├── shared/            # Handlers, transport, ToolBaker, toast, …
│   ├── plugin-r22/ … r27/ # One shell per Revit year
├── tests/                 # xUnit + golden tool lists
├── scripts/               # install / uninstall / package
├── docs/                  # roadmap, bake, testing
├── AGENTS.md
└── ARCHITECTURE.md

Development

dotnet test tests/RvtMcp.Tests/RvtMcp.Tests.csproj
dotnet build src/server/RvtMcp.Server.csproj -c Release
dotnet build src/plugin-r26/RvtMcp.Plugin.R26.csproj -c Release

Close Revit before building plugins (DLL lock). Plugin projects deploy into %APPDATA%\Autodesk\Revit\Addins\<year>\RvtMcp\ on a normal Debug/Release build.

pwsh scripts/stage-plugin-zip.ps1 -Config Release

Contribution norms and snapshot rules: CONTRIBUTING.md.

Maturity

Usable, not sacred. CI builds the six plugin shells and server tests. Runtime coverage is strongest on mid-range years; treat production models carefully and verify on your Revit build. Fresh-machine checklist: docs/testing/fresh-install-checklist.md.


More docs

DocTopic
AGENTS.mdAgent install protocol
ARCHITECTURE.mdProcesses, transport, DTO rules
docs/bake.mdAdaptive bake and body privacy
docs/roadmap.mdNear-term hardening and non-goals
docs/kei-equipment-import.mdKEI SQLite tools (--toolsets kei)
CHANGELOG.mdRelease notes

bimwright

Same house style across AEC hosts:


License

Apache-2.0 — LICENSE.

Revit and Autodesk are trademarks of Autodesk, Inc. bimwright is independent and not affiliated with Autodesk.