ArchSmarterRevitMcpServer
No description available
Ask AI about ArchSmarterRevitMcpServer
Powered by Claude Β· Grounded in docs
I know everything about ArchSmarterRevitMcpServer. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Revit MCP Server
A Model Context Protocol (MCP) server that connects Autodesk Revit 2025+ to AI assistants like Claude. Query elements, create views, manage sheets, and modify parameters β all through natural language.
How It Works
The system has two halves that communicate over a named pipe:
Claude Desktop / VS Code
β
β stdio (JSON-RPC)
βΌ
βββββββββββββββββββ Named Pipe ββββββββββββββββββββ
β RevitMcp.Server β βββββ "revit-mcp-bridge" βββΊ β RevitMcp.Addin β
β (Console App) β length-prefixed JSON β (Revit Add-in) β
βββββββββββββββββββ ββββββββββββββββββββ
β
Revit API calls
(main thread only)
RevitMcp.Server is a standalone console app that speaks MCP over stdio. Claude Desktop launches it automatically.
RevitMcp.Addin loads inside Revit, runs a named-pipe listener on a background thread, and marshals all Revit API calls to the main thread via ExternalEvent.
RevitMcp.Core contains the shared contracts, command names, and handler implementations used by both sides.
Available Tools
Elements
| Tool | Description |
|---|---|
get_elements | Retrieve elements, optionally filtered by category (default limit: 100) |
get_element_by_id | Get detailed info for a single element including bounding box and location |
get_element_parameters | List all parameters and values for an element |
get_selected_elements | Get currently selected elements in the active view |
set_parameter | Set a parameter value on an element |
delete_elements | Delete elements with preview mode (set confirm=true to execute) |
Views
| Tool | Description |
|---|---|
open_view | Open a view by ID or name |
create_plan_view | Create a floor plan or ceiling plan for a level |
create_elevation_view | Create an elevation at a location and direction |
create_section_view | Create a section defined by origin, direction, and dimensions |
create_schedule_view | Create a schedule for a category with optional field selection |
Sheets
| Tool | Description |
|---|---|
create_sheet | Create a new sheet with a title block |
add_view_to_sheet | Place a view on a sheet as a viewport |
Model & Project
| Tool | Description |
|---|---|
get_project_info | Get project metadata (name, number, client, address, etc.) |
analyze_model_statistics | Get element counts by category, family, type, and level |
get_current_view_info | Get active view details (type, scale, detail level, etc.) |
export_room_data | Extract rooms with area, volume, perimeter, and department data |
Prerequisites
- Autodesk Revit 2025 (or newer)
- .NET 8 SDK β download here
- Claude Desktop or another MCP-compatible client
Building
Build the entire solution:
dotnet build RevitMcpServer.sln -c "Debug R25"
Build the server only:
dotnet build src/RevitMcp.Server/RevitMcp.Server.csproj
Publish the server for deployment:
dotnet publish src/RevitMcp.Server -c Release -o ./publish
The add-in's post-build step automatically copies the DLL and .addin manifest to Revit's add-in folder.
Setup
1. Install the Revit Add-in
Build the RevitMcp.Addin project with a Revit 2025 configuration (Debug R25 or Release R25). The post-build event copies the output to:
%APPDATA%\Autodesk\REVIT\Addins\2025\RevitMcp.Addin\
2. Configure Claude Desktop
Add the server to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"revit-mcp": {
"command": "dotnet",
"args": ["run", "--project", "C:\\path\\to\\src\\RevitMcp.Server\\RevitMcp.Server.csproj"]
}
}
}
Or if you've published the server:
{
"mcpServers": {
"revit-mcp": {
"command": "C:\\path\\to\\publish\\RevitMcp.Server.exe"
}
}
}
3. Launch
- Open Revit β the add-in loads automatically and starts the pipe server
- Open Claude Desktop β it spawns the MCP server process on first tool call
- The MCP Status button on the ribbon turns green when connected
Ribbon Buttons
The add-in creates a Revit MCP ribbon panel with four buttons:
| Button | Action |
|---|---|
| MCP Status | Shows connection state, uptime, tool call stats, and last error |
| Restart Connection | Restarts the pipe server (fixes dropped connections or stuck requests) |
| Kill Server | Terminates the MCP server process (Claude Desktop respawns it automatically) |
| Open Claude | Launches Claude Desktop or brings it to the foreground |
The MCP Status icon changes color based on connection state: green (connected), yellow (waiting), red (error).
Solution Structure
RevitMcpServer.sln
βββ RevitMcp.Core/ Shared library (no MCP SDK or Revit UI dependency)
β βββ Commands/ Command name constants
β βββ Handlers/ ICommandHandler implementations (one per tool)
β βββ Messages/ BridgeRequest / BridgeResponse records
β
βββ RevitMcp.Server/ MCP server (stdio transport, console app)
β βββ Bridge/ Named pipe client (RevitBridgeClient)
β βββ Tools/ [McpServerToolType] tool definitions
β
βββ RevitMcp.Addin/ Revit add-in (named pipe server, ribbon UI)
βββ Bridge/ PipeServer, RequestChannel, ExternalEventExecutor
βββ Status/ McpStatusTracker (connection state singleton)
βββ UI/ Ribbon button commands
Adding a New Tool
- Add the command name to
RevitMcp.Core/Commands/CommandNames.cs - Create an
ICommandHandlerinRevitMcp.Core/Handlers/ - Create or update a
[McpServerToolType]class inRevitMcp.Server/Tools/ - Register the handler in
RevitMcp.Addin/App.cs
Key Design Decisions
- Named pipe bridge β The MCP server and Revit run in separate processes. A named pipe (
revit-mcp-bridge) with 4-byte length-prefixed JSON framing connects them. - ExternalEvent threading β All Revit API calls must run on Revit's main thread. Requests queue through a
Channel<PendingRequest>and execute viaExternalEvent. - System.Text.Json β Used everywhere for serialization. No Newtonsoft.Json dependency.
- Preview-mode deletes β
delete_elementsdefaults to dry-run. The AI must explicitly setconfirm=trueto mutate the model.
License
All rights reserved.
