rvt-mcp
Local Model Context Protocol (MCP) gateway for Autodesk Revit 2022-2027.
English | Tiếng Việt | 简体中文 | 日本語
## Overview
`rvt-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 Revit 2022-2027 session through its native .NET API. Query BIM elements, views, and schedules, model and edit geometry, coordinate MEP and structural systems, manage sheets and exports, and run C# scripts locally with no cloud relay.
| Aspect | Details |
|---|---|
| Host application | Autodesk Revit 2022-2027 (Windows desktop; mm at tool boundary) |
| Architecture | .NET 10 MCP stdio server + in-process per-year Revit add-in |
| Local transport | Loopback TCP (2022-2024) and Named Pipe (2025-2027), token-authenticated |
| Tool surface | 257 typed tools across 24 toolsets (260 with adaptive bake, 63 bare default) |
| Safety controls | `--read-only` (105 tools), PID/document pinning, rollback-on-warning, atomic batching |
| MCP protocol | MCP stdio (Tools, Prompts, Resources, permission hints, response budgets) |
| License | Apache-2.0 |
## Capabilities
| Area | What you can do |
|---|---|
| Query and model audit | Filter BIM elements, inspect parameters and relationships, survey change impact, audit families, and check warnings or view naming. |
| Modeling and edits | Create levels, grids, rooms, walls, structural and MEP elements; move, rotate, change types, assign worksets, or run `revit_batch_execute`. |
| Views, sheets, annotations | Create and capture views, manage view templates and filters, lay out sheets and viewports, tag elements, dimension, and apply keynotes. |
| Schedules, materials, parameters | Read and build schedules with fields and formulas, manage project/shared parameters, assign materials, and compute quantity takeoffs. |
| Geometry, rooms, links | Compute bounding boxes, volumes, clashes, and raycasts; manage rooms/areas/spaces, Revit/CAD links, and shared coordinates. |
| Exports and checkpoints | Export PDF, DWG, DGN, DWF, IFC, NWC, FBX, gbXML, images, and CSV schedules; opt-in local save and checkpoints. |
| C# scripting and ToolBaker | Run synchronous Roslyn C# (`revit_send_code_to_revit`) with structured JSON `data`, reusable modules, and optional personal baked tools. |
| Host UI and reports | Follow live activity toasts, search History and Issues, open Reports with clickable `revit:` links, and switch among 15 UI languages. |
## Showcase
*Revit 2026 with Autodesk sample models: an agent tags doors through `rvt-mcp`, sends a report to the Revit Reports window, and clicking a link selects the element directly in Revit.*
See the [tool descriptor benchmark](docs/benchmarks/2026-10-18-tool-descriptors.md) and [validation record](docs/testing/2026-10-18-v1.2.0-validation.md).
Example prompts you can run immediately:
- "Inspect the active view, list all doors on Level 1 missing a Mark value, and send a clickable report."
- "Survey change impact on wall IDs `412890` and `412891`, change their type to `Generic - 200mm`, and read back the results."
- "Read the Door Schedule fields and rows, flag duplicate marks, and export the schedule to CSV."
- "Align the viewports on sheet `A101` in dry-run mode first, show the proposed move, and apply only after I confirm."
## 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, ...):
```text
Check the current version of Revit in this PC and install the BIMwright rvt-mcp latest release for me
```
### Option 2: Manual install (PowerShell Setup ZIP)
1. **Download latest release:** open [GitHub Releases](https://github.com/bimwright/rvt-mcp/releases/latest), download `RvtMcp.Setup--win-x64.zip`, and extract it.
2. **Run the installer:** close Revit, open PowerShell in the extracted folder, preview with `-WhatIf`, then install:
```powershell
powershell -ExecutionPolicy Bypass -File .\install.ps1 -WhatIf
powershell -ExecutionPolicy Bypass -File .\install.ps1
```
3. **Or install from source:** close Revit, clone this repository, and build the solution (auto-deploys per-year add-ins):
```powershell
git clone https://github.com/bimwright/rvt-mcp.git
cd rvt-mcp
dotnet build src/RvtMcp.sln -c Debug
```
**Verify:** restart your AI client, open a model in Revit, confirm **Add-Ins -> RvtMcp** is ON, and ask your agent to run `revit_get_current_view_info`.
Full setup details (upgrade, uninstall, NuGet, Claude Desktop MCPB, per-client wiring): [docs/install.md](docs/install.md) | [docs/mcp-client-wiring.md](docs/mcp-client-wiring.md).
## Architecture
```text
AI Client (Claude / Antigravity / Codex / Grok Build / Pi / OpenCode / ...)
| MCP over stdio
v
RvtMcp.Server (.NET 10 console gateway)
| Loopback TCP (2022-2024) or Named Pipe (2025-2027) + session token
v
RvtMcp.Plugin (per-year add-in shells for Revit 2022-2027)
| ExternalEvent marshalling onto Revit UI thread
v
Autodesk Revit .NET API (2022-2027)
```
- Two local processes: the server has zero Revit SDK references and builds/tests without Revit installed.
- Main-thread safe: requests marshal cleanly onto Revit's UI thread via `ExternalEvent` with controlled failure/warning handling.
- Full threading, discovery, Roslyn isolation, and wire protocol details: [ARCHITECTURE.md](ARCHITECTURE.md).
## Supported Versions
| Version | Plugin TFM | Transport | Notes |
|---|---|---|---|
| Revit 2022-2024 | `net48` | Loopback TCP | Per-year shells compiled from shared source |
| Revit 2025-2026 | `net8.0-windows7.0` | Named Pipe | Avoids Windows loopback firewall prompt |
| Revit 2027 | `net10.0-windows7.0` | Named Pipe | Native .NET 10 host target |
Full Revit desktop only (Revit Viewer is not supported). Release Setup ZIPs pack prebuilt add-ins for all 6 years (`2022-2027`).
## Tools
| Toolset | Default | Read-only | Count | Examples |
|---|---:|---:|---:|---|
| `query` | Yes | 17 | 17 | `revit_get_current_view_info`, `revit_ai_element_filter`, `revit_survey_change_impact` |
| `create` | Yes | 0 | 7 | `revit_create_level`, `revit_create_grid`, `revit_create_line_based_element` |
| `view` | Yes | 3 | 11 | `revit_create_view`, `revit_capture_view_image`, `revit_set_view_crop` |
| `meta` | Yes | 17 | 28 | `revit_health`, `revit_switch_target`, `revit_batch_execute`, `revit_send_code_to_revit` |
| `documents` | Optional | 0 | 3 | `revit_save_document`, `revit_save_checkpoint`, `revit_manage_checkpoints` |
| `modify` | Optional | 0 | 9 | `revit_move_elements`, `revit_rotate_elements`, `revit_set_element_parameter_values` |
| `delete` | Optional | 0 | 1 | `revit_delete_element` |
| `schedule` | Optional | 6 | 10 | `revit_list_schedules`, `revit_get_schedule_data`, `revit_create_schedule` |
| `families` | Optional | 4 | 10 | `revit_list_loaded_families`, `revit_load_family_from_path`, `revit_audit_families` |
| `graphics` | Optional | 3 | 12 | `revit_create_view_filter`, `revit_override_element_graphics`, `revit_list_phases` |
| `export` | Optional | 2 | 16 | `revit_export_pdf`, `revit_export_dwg`, `revit_export_ifc`, `revit_batch_export_sheets` |
| `annotation` | Optional | 3 | 14 | `revit_tag_elements`, `revit_create_dimensions`, `revit_find_untagged_elements` |
| `mep` | Optional | 7 | 16 | `revit_create_duct`, `revit_create_pipe`, `revit_connect_mep_elements`, `revit_analyze_mep_network` |
| `sheets` | Optional | 5 | 14 | `revit_create_sheet`, `revit_list_sheets`, `revit_align_viewports`, `revit_renumber_sheets` |
| `materials` | Optional | 2 | 10 | `revit_list_materials`, `revit_assign_material_to_element`, `revit_get_material_takeoff` |
| `geometry` | Optional | 12 | 13 | `revit_clash_detection`, `revit_measure_distance_between_elements`, `revit_create_mesh_shapes` |
| `rooms` | Optional | 4 | 10 | `revit_list_rooms`, `revit_get_room_boundaries`, `revit_compute_room_finishes` |
| `links` | Optional | 5 | 12 | `revit_list_linked_models`, `revit_link_revit_model`, `revit_acquire_coordinates_from_link` |
| `parameters` | Optional | 2 | 8 | `revit_list_shared_parameters`, `revit_create_shared_parameter`, `revit_bind_shared_parameter` |
| `organization` | Optional | 4 | 10 | `revit_list_view_templates`, `revit_apply_view_template`, `revit_save_selection` |
| `workflows` | Optional | 1 | 8 | `revit_workflow_clash_review`, `revit_workflow_model_audit`, `revit_workflow_sheet_set` |
| `lint` | Optional | 4 | 4 | `revit_analyze_view_naming_patterns`, `revit_detect_firm_profile`, `revit_get_model_warnings_summary` |
| `structural` | Optional | 3 | 12 | `revit_create_structural_column`, `revit_create_structural_beam`, `revit_create_rebar_set` |
| `toolbaker` | Optional | 1 | 5 | `revit_list_baked_tools`, `revit_run_baked_tool` (+3 adaptive bake tools) |
Bare startup registers **63** tools (37 read-only). `install.ps1` seeds `"toolsets": ["all"]` for **257** standard tools (105 read-only), or **260** with `--enable-adaptive-bake` (+3 suggestion tools). Complete catalog: [docs/tools.md](docs/tools.md) | Prompts and workflows: [docs/workflows.md](docs/workflows.md).
## Safety and Permissions
- Local-only loopback transport authenticated by a per-session random token.
- Explicit PID and active-document confirmation required before writes (`revit_switch_target`).
- Unapproved Revit warnings and errors roll back by default and log to the local failure ledger ([docs/controlled-failures.md](docs/controlled-failures.md)).
- `--read-only` strips all write, file-export, and code-execution tools at registration time (105 read-only tools across all toolsets).
- `revit_send_code_to_revit` runs full-trust C# inside Revit; disable with `--disable-send-code` or `--read-only` when not needed.
- Never approve broad `mcp__rvt-mcp__*` wildcards; use the test-verified 105-tool read-only allowlist in [docs/safety.md](docs/safety.md).
- Detailed security, multi-instance targeting, response budgets, and opt-in logging: [docs/safety.md](docs/safety.md) | [docs/configuration.md](docs/configuration.md).
## Documentation
| Document | Topic |
|---|---|
| [ARCHITECTURE.md](ARCHITECTURE.md) | Process model, ExternalEvent threading, discovery, wire protocol |
| [AGENTS.md](AGENTS.md) | Agent installation and operating instructions |
| [docs/install.md](docs/install.md) | Setup ZIP, upgrades, uninstall, NuGet, Claude Desktop MCPB, build from source |
| [docs/mcp-client-wiring.md](docs/mcp-client-wiring.md) | Configuration for Claude, Antigravity, Codex, Grok Build, Pi, OpenCode, Devin, Kilo, Hermes, OpenClaw |
| [docs/tools.md](docs/tools.md) | Full reference for all 260 built-in MCP tools across 24 toolsets |
| [docs/configuration.md](docs/configuration.md) | CLI flags, environment variables, JSON config, response budgets, log retention |
| [docs/safety.md](docs/safety.md) | Target/document pinning, 105-tool read-only allowlist, permissions, C# scripting, health |
| [docs/host-ui.md](docs/host-ui.md) | Ribbon controls, activity toasts, History, Issues, Reports window, 15 UI languages |
| [docs/workflows.md](docs/workflows.md) | Built-in MCP prompts, safe edit loop, domain guides, and smoke checklist |
| [docs/controlled-failures.md](docs/controlled-failures.md) | Warning policy, advisory Issues, native dialog decisions, pending-operation recovery |
| [docs/send-code.md](docs/send-code.md) | `revit_send_code_to_revit` structured inputs, helper modules, failure handling |
| [CHANGELOG.md](CHANGELOG.md) | Version history and release notes |
## The bimwright Family
| Repository | Scope | License |
|---|---|---|
| [rvt-mcp](https://github.com/bimwright/rvt-mcp) | Autodesk Revit 2022-2027 MCP gateway (this repository) | Apache-2.0 |
| [dwg-mcp](https://github.com/bimwright/dwg-mcp) | Autodesk AutoCAD 2022-2027 MCP gateway | Apache-2.0 |
| [nwd-mcp](https://github.com/bimwright/nwd-mcp) | Autodesk Navisworks Manage 2022-2027 MCP gateway | Apache-2.0 |
| [ipt-mcp](https://github.com/bimwright/ipt-mcp) | Autodesk Inventor 2022-2027 MCP gateway | Apache-2.0 |
| [bim-wiki](https://github.com/bimwright/bim-wiki) | Bilingual BIM knowledge base (ISO 19650 and Vietnam BIM regulations) | CC-BY-SA 4.0 |
## License
[Apache License 2.0](LICENSE). Autodesk and Revit are trademarks of Autodesk, Inc.; bimwright is an independent open-source project.