Revit MCP
# Revit MCP
Experimental MCP server for Autodesk Revit. A Revit add-in handles API calls on Revit's main thread using `ExternalEvent`; a Python stdio server connects to the add-in through a local named pipe. It can read active-document metadata and create and inspect straight walls. It also lists available types and creates levels and rectangular floors. Wall creation modifies the active project; the server does not save it.
## Requirements
- Windows and Autodesk Revit 2027 with an open model or family.
- .NET 10 SDK for building the add-in and Python 3.10+ for the MCP server.
- Revit API assemblies from the local Revit installation. These files are not included.
- An MCP client supporting local stdio servers.
Only Revit 2027 is targeted. Other versions have not been tested. Revit 2025 and 2026 use different .NET/API baselines; they require a separately built and tested adapter. The server is experimental and independent of Autodesk.
The add-in has been compiled and loaded in Revit 2027.4 on Windows. MCP stdio returned the Revit version, read project metadata, created a 5000 × 3000 mm wall in a new unsaved project, and read its coordinates and height back. The build produced three dependency-version warnings. On the development machine, .NET SDK 10 was installed under the user's `.dotnet-revit-sdk` directory without changing `PATH`; use its `dotnet.exe` explicitly or install a supported SDK on `PATH`.
## Build and install the add-in
From PowerShell in the project directory:
```powershell
dotnet build .\addin\RevitBridge.csproj -c Release
$addinDir = Join-Path $env:APPDATA 'Autodesk\Revit\Addins\2027'
New-Item -ItemType Directory -Force -Path $addinDir
```
Create a file named `RevitMcpBridge.addin` in that folder using the template below. Replace `C:\path\to\revit-mcp` with the absolute project path; keep the path to the DLL as shown. Use XML escaping for special characters such as `&`.
```xml
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Name>Revit MCP Bridge</Name>
<Assembly>C:\path\to\revit-mcp\addin\bin\Release\net10.0-windows\RevitBridge.dll</Assembly>
<AddInId>86B61D9C-CE59-4D49-8B29-CA6DD686BDB4</AddInId>
<FullClassName>RevitBridge.App</FullClassName>
<VendorId>RMCP</VendorId>
<VendorDescription>Revit MCP Bridge</VendorDescription>
</AddIn>
</RevitAddIns>
```
Restart Revit to load the add-in, allowing it when Revit requests trust. Save your work before restarting. The add-in is not signed; review its source before enabling it.
## Install the MCP server
```powershell
py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install .
(Resolve-Path .\.venv\Scripts\python.exe).Path
```
### Codex
Add this to `%USERPROFILE%\.codex\config.toml`, replacing the path with the one printed above:
```toml
[mcp_servers.revit]
command = 'C:\path\to\revit-mcp\.venv\Scripts\python.exe'
args = ['-m', 'revit_mcp.server']
```
### Claude Code
Add this to `.mcp.json` in the working project. Replace the path; JSON requires doubled backslashes:
```json
{"mcpServers":{"revit":{"command":"C:\\path\\to\\revit-mcp\\.venv\\Scripts\\python.exe","args":["-m","revit_mcp.server"]}}}
```
Restart the MCP client and call `revit_status`. `document: null` means no active document. Paths can contain sensitive data and are sent to the client. The named pipe is restricted to the current Windows user, but other processes under the same user can access it. Only one add-in instance is supported.
## Wall tools
1. Call `revit_status` and obtain `document.runtime_id` from the active project. This ID is valid only for the current Revit session. Confirm the document before writing.
2. Call `revit_create_wall` with `document_runtime_id`, `x1_mm`, `y1_mm`, `x2_mm`, `y2_mm` and optional `height_mm` (default 3000). Coordinates and height are millimetres. Length must be at least 100 mm, height 100–30000 mm and coordinates within ±1000000 mm. The wall uses the lowest level and the first basic wall type. It is created inside a Revit transaction in the active editable project and is not saved automatically.
3. Use `revit_get_wall` with the same document ID and returned `element_id` to read back the straight wall endpoints and height.
If the active document changes, the operation fails before writing. If a request times out after execution starts or the connection fails after sending, its outcome may be unknown. Inspect the project before retrying to avoid duplicate walls. A timeout before execution cancels the queued request. The local pipe is restricted to the current Windows user, but other processes under that account may send commands and modify the active project.
## Levels and floors
Call `revit_list_types` with the active `document_runtime_id` to find levels and floor types. `revit_create_level` takes an elevation in millimetres. `revit_create_floor` takes a level ID, floor type ID and two opposite rectangle corners in millimetres. These operations modify the active document without saving it. Level and floor creation succeeded through the bridge in Revit 2027.4; they have not yet been independently verified through MCP stdio.
## Verification and limitations
Run `.\.venv\Scripts\python.exe -m unittest discover -s tests -v`. Unit tests do not prove that the add-in loads in Revit. Revit can delay external events while dialogs or commands are active; close them and retry after a timeout. The tools cover only the operations listed above; most Revit functionality, file operations and multiple Revit instances are not implemented. macOS, other Revit versions and clients have not been tested.
Autodesk provides a separate [Revit Public MCP Server](https://help.autodesk.com/view/ADSKMCP/ENU/?guid=ADSKMCP_RevitMcp_revit_mcp_server_html). This project is not affiliated with Autodesk. Sources: [External Events](https://help.autodesk.com/cloudhelp/2026/ENU/Revit-API/files/Revit_API_Developers_Guide/Advanced_Topics/Revit_API_Revit_API_Developers_Guide_Advanced_Topics_External_Events_html.html), [add-in registration](https://help.autodesk.com/cloudhelp/2026/ENU/Revit-API/files/Revit_API_Developers_Guide/Introduction/Add_In_Integration/Revit_API_Revit_API_Developers_Guide_Introduction_Add_In_Integration_Add_in_Registration_html.html).
Bridge code is provided under the MIT License; Revit is subject to Autodesk's terms.
TDQS
Scored across 6 tools
Each tool targets a distinct resource+action pair: create wall, read wall, list types, create level, create floor, and read status. There is no overlap in purpose, and descriptions reinforce boundaries (e.g. status is read-only, create_wall modifies the document).
All tools follow a strict revit_verb_noun pattern (revit_create_wall, revit_get_wall, revit_list_types, revit_create_level, revit_status, revit_create_floor). Verb choice is predictable and the shared revit_ prefix is applied uniformly.
Six tools is well-scoped for a focused Revit automation surface covering status, type discovery, and creation of the basic building primitives. Every tool earns its place with no filler.
The surface covers status, type discovery, and creation of walls/levels/floors, which supports a basic modeling workflow. However there are notable gaps: no update/delete operations for any element, no get for floors or levels, no save tool, and list_types advertises door/window and roof types that have no corresponding creation tools.