| name | mcp-servers-for-revit-integration |
| description | Connect AI assistants to Autodesk Revit via Model Context Protocol to read, create, modify, and delete Revit elements programmatically. |
| triggers | ["help me interact with Revit using MCP","set up mcp-servers-for-revit integration","create Revit elements through AI","query Revit model data","configure Revit MCP server","build custom Revit command set","connect Claude to Revit","automate Revit tasks with MCP"] |
mcp-servers-for-revit Integration
Skill by ara.so — MCP Skills collection
Overview
mcp-servers-for-revit is a Model Context Protocol (MCP) implementation that enables AI assistants to interact with Autodesk Revit. It consists of three components:
- MCP Server (TypeScript) - Exposes tools to AI clients via stdio
- Revit Plugin (C#) - WebSocket bridge running inside Revit
- Command Set (C#) - Executes actual Revit API operations
The system supports Revit 2020-2026 and provides 20+ tools for reading model data, creating elements, modifying properties, and exporting information.
Installation
Prerequisites
- Node.js 18+
- Autodesk Revit 2020-2026
- .NET Framework 4.8 (Revit 2020-2024) or .NET 8 (Revit 2025-2026)
Quick Install (Release)
-
Download the ZIP for your Revit version from Releases:
mcp-servers-for-revit-v1.0.0-Revit2025.zip
-
Extract to Revit addins folder:
%AppData%\Autodesk\Revit\Addins\2025\
-
Configure MCP server in Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"mcp-server-for-revit": {
"command": "cmd",
"args": ["/c", "npx", "-y", "mcp-server-for-revit"]
}
}
}
-
For Claude Code (run in terminal):
claude mcp add mcp-server-for-revit -- cmd /c npx -y mcp-server-for-revit
-
Start Revit and click Always Load when prompted
-
In Revit ribbon, click Settings on mcp-servers-for-revit tab, enable desired commands, and save
Development Install
Clone and build from source:
git clone https://github.com/mcp-servers-for-revit/mcp-servers-for-revit.git
cd mcp-servers-for-revit
cd server
npm install
npm run build
Available Tools
Data Extraction
get_current_view_info
{
"name": "get_current_view_info",
"arguments": {}
}
get_current_view_elements
{
"name": "get_current_view_elements",
"arguments": {
"category": "Walls"
}
}
get_selected_elements
{
"name": "get_selected_elements",
"arguments": {}
}
get_available_family_types
{
"name": "get_available_family_types",
"arguments": {
"category": "Doors"
}
}
get_material_quantities
{
"name": "get_material_quantities",
"arguments": {
"elementIds": [123456, 789012]
}
}
analyze_model_statistics
{
"name": "analyze_model_statistics",
"arguments": {}
}
ai_element_filter
{
"name": "ai_element_filter",
"arguments": {
"query": "all structural columns on level 2"
}
}
Element Creation
create_point_based_element
{
"name": "create_point_based_element",
"arguments": {
"familyTypeId": 654321,
"location": {
"x": 10.0,
"y": 20.0,
"z": 0.0
},
"facingOrientation": {
"x": 1.0,
"y": 0.0,
"z": 0.0
}
}
}
create_line_based_element
{
"name": "create_line_based_element",
"arguments": {
"familyTypeId": 456789,
"startPoint": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"endPoint": {
"x": 20.0,
"y": 0.0,
"z": 0.0
},
"levelId": 123456
}
}
create_surface_based_element
{
"name": "create_surface_based_element",
"arguments": {
"familyTypeId": 987654,
"boundary": [
{"x": 0.0, "y": 0.0},
{"x": 20.0, "y": 0.0},
{"x": 20.0, "y": 15.0},
{"x": 0.0, "y": 15.0}
],
"levelId": 123456
}
}
create_grid
{
"name": "create_grid",
"arguments": {
"direction": "vertical",
"count": 5,
"spacing": 20.0,
"startPoint": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"length": 50.0
}
}
create_level
{
"name": "create_level",
"arguments": {
"elevation": 14.0,
"name": "Level 2"
}
}
create_room
{
"name": "create_room",
"arguments": {
"levelId": 123456,
"location": {
"x": 10.0,
"y": 10.0
},
"name": "Conference Room",
"number": "201"
}
}
create_dimensions
{
"name": "create_dimensions",
"arguments": {
"elementIds": [123456, 789012],
"viewId": 345678
}
}
create_structural_framing_system
{
"name": "create_structural_framing_system",
"arguments": {
"beamTypeId": 456789,
"boundary": [
{"x": 0.0, "y": 0.0},
{"x": 40.0, "y": 0.0},
{"x": 40.0, "y": 30.0},
{"x": 0.0, "y": 30.0}
],
"spacing": 10.0,
"levelId": 123456
}
}
Element Modification
delete_element
{
"name": "delete_element",
"arguments": {
"elementIds": [123456, 789012]
}
}
operate_element
{
"name": "operate_element",
"arguments": {
"operation": "setColor",
"elementIds": [123456],
"color": {
"red": 255,
"green": 0,
"blue": 0
}
}
}
color_elements
{
"name": "color_elements",
"arguments": {
"parameterName": "Fire Rating",
"colorScheme": {
"1 Hour": {"red": 255, "green": 255, "blue": 0},
"2 Hour": {"red": 255, "green": 0, "blue": 0}
}
}
}
Annotation
tag_all_walls
{
"name": "tag_all_walls",
"arguments": {
"viewId": 345678
}
}
tag_all_rooms
{
"name": "tag_all_rooms",
"arguments": {
"viewId": 345678
}
}
Data Export
export_room_data
{
"name": "export_room_data",
"arguments": {
"outputPath": "C:\\exports\\rooms.csv"
}
}
store_project_data
{
"name": "store_project_data",
"arguments": {
"metadata": {
"projectName": "Office Building",
"client": "Acme Corp"
}
}
}
store_room_data
{
"name": "store_room_data",
"arguments": {
"roomId": 123456,
"metadata": {
"department": "Engineering",
"capacity": 12
}
}
}
query_stored_data
{
"name": "query_stored_data",
"arguments": {
"query": "SELECT * FROM rooms WHERE department = 'Engineering'"
}
}
Advanced
send_code_to_revit
{
"name": "send_code_to_revit",
"arguments": {
"code": "var doc = Application.ActiveUIDocument.Document; return new FilteredElementCollector(doc).OfClass(typeof(Wall)).GetElementCount();"
}
}
Command Set Development
Creating Custom Commands
Commands inherit from RevitMCPCommandSet.BaseCommand:
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using RevitMCPCommandSet;
using System.Collections.Generic;
public class CreateCustomElement : BaseCommand
{
public override string Name => "create_custom_element";
public override string Description => "Creates a custom element";
public override Dictionary<string, object> Execute(
UIApplication uiApp,
Dictionary<string, object> parameters)
{
var doc = uiApp.ActiveUIDocument.Document;
using (var trans = new Transaction(doc, "Create Custom Element"))
{
trans.Start();
var typeId = GetElementId(parameters, "familyTypeId");
var location = GetXYZ(parameters, "location");
var familySymbol = doc.GetElement(typeId) as FamilySymbol;
if (!familySymbol.IsActive)
{
familySymbol.Activate();
}
var instance = doc.Create.NewFamilyInstance(
location,
familySymbol,
StructuralType.NonStructural
);
trans.Commit();
return new Dictionary<string, object>
{
["success"] = true,
["elementId"] = instance.Id.IntegerValue
};
}
}
}
Register Command in command.json
{
"commands": [
{
"name": "create_custom_element",
"description": "Creates a custom element",
"parameters": {
"familyTypeId": {
"type": "number",
"required": true
},
"location": {
"type": "object",
"required": true
}
}
}
]
}
Build and Deploy
dotnet build commandset -c Release.R25
cp commandset/bin/Release.R25/RevitMCPCommandSet.dll plugin/bin/AddIn 2025 Release/Commands/RevitMCPCommandSet/2025/
Testing
Tests use Nice3point.TUnit.Revit for integration testing:
using Autodesk.Revit.DB;
using Nice3point.Revit.Api;
using Nice3point.Revit.Executors;
using RevitMCPCommandSet;
using TUnit.Core;
public class CustomElementTests : RevitApiTest
{
private static Document _doc;
[Before(HookType.Class)]
[HookExecutor<RevitThreadExecutor>]
public static void Setup()
{
_doc = Application.NewProjectDocument(UnitSystem.Imperial);
}
[After(HookType.Class)]
[HookExecutor<RevitThreadExecutor>]
public static void Cleanup()
{
_doc?.Close(false);
}
[Test]
public async Task CreateCustomElement_ValidParameters_CreatesElement()
{
var command = new CreateCustomElement();
var parameters = new Dictionary<string, object>
{
["familyTypeId"] = 123456,
["location"] = new Dictionary<string, object>
{
["x"] = 10.0,
["y"] = 20.0,
["z"] = 0.0
}
};
var result = command.Execute(Application.UIApplication, parameters);
await Assert.That(result["success"]).IsEqualTo(true);
await Assert.That(result).ContainsKey("elementId");
}
}
Run tests:
dotnet test -c Debug.R26 -r win-x64 tests/commandset
Common Patterns
Query Elements by Category
const wallTypes = await use_mcp_tool({
server_name: "mcp-server-for-revit",
tool_name: "get_available_family_types",
arguments: {
category: "Walls"
}
});
const walls = await use_mcp_tool({
server_name: "mcp-server-for-revit",
tool_name: "get_current_view_elements",
arguments: {
category: "Walls"
}
});
Create and Tag Rooms
const roomResult = await use_mcp_tool({
server_name: "mcp-server-for-revit",
tool_name: "create_room",
arguments: {
levelId: 123456,
location: { x: 10.0, y: 10.0 },
name: "Conference Room",
number: "201"
}
});
await use_mcp_tool({
server_name: "mcp-server-for-revit",
tool_name: "tag_all_rooms",
arguments: {
viewId: 345678
}
});
Color Code by Parameter
await use_mcp_tool({
server_name: "mcp-server-for-revit",
tool_name: "color_elements",
arguments: {
parameterName: "Fire Rating",
colorScheme: {
"1 Hour": { red: 255, green: 255, blue: 0 },
"2 Hour": { red: 255, green: 0, blue: 0 },
"None": { red: 128, green: 128, blue: 128 }
}
}
});
Extract and Export Data
const quantities = await use_mcp_tool({
server_name: "mcp-server-for-revit",
tool_name: "get_material_quantities",
arguments: {
elementIds: [123456, 789012]
}
});
await use_mcp_tool({
server_name: "mcp-server-for-revit",
tool_name: "export_room_data",
arguments: {
outputPath: "C:\\exports\\rooms.csv"
}
});
Troubleshooting
MCP Server Not Connecting
-
Verify Node.js installation:
node --version
-
Test server manually:
npx -y mcp-server-for-revit
-
Check Claude Desktop config syntax:
{
"mcpServers": {
"mcp-server-for-revit": {
"command": "cmd",
"args": ["/c", "npx", "-y", "mcp-server-for-revit"]
}
}
}
Revit Plugin Not Loading
-
Check addin manifest location:
%AppData%\Autodesk\Revit\Addins\2025\mcp-servers-for-revit.addin
-
Verify DLL paths in .addin file match actual file locations
-
Check Revit version matches build configuration
-
Enable plugin in Revit ribbon Settings
WebSocket Connection Fails
-
Check if plugin is loaded (ribbon tab visible)
-
Verify WebSocket port (default: 8081) is not blocked
-
Restart Revit after configuration changes
Command Execution Errors
-
Enable command in Settings dialog
-
Check parameter types match command requirements
-
Verify element IDs exist in current document
-
Ensure transactions are not already open
Build Errors
.NET SDK Version:
winget install Microsoft.DotNet.SDK.10
Missing Revit API References:
- Install Revit version matching build configuration
- NuGet packages restore automatically via Nice3point.Revit.Api
Platform Target:
dotnet test -c Debug.R26 -r win-x64
Release Process
Create release using bump script:
# Update version and create tag
./scripts/release.ps1 -Version 1.2.3
# Push to trigger CI/CD
git push origin main --tags
The GitHub Actions workflow will:
- Build plugin for Revit 2020-2026
- Create GitHub release with ZIP assets
- Publish MCP server to npm
Manual npm publish (if needed):
cd server
npm version 1.2.3
npm publish --provenance