mcp-servers-for-revit/mcp-servers-for-revit

โ–ฒ 5 stars todayโ˜… 366โ‘‚ 152

๐Ÿ”ฅ๐Ÿ’ง๐Ÿค– Sparx fork of the mcp-servers-for-revit/revit-mcp project

About mcp-servers-for-revit/mcp-servers-for-revit

mcp-servers-for-revit/mcp-servers-for-revit is an open-source project on GitHub, mainly written in C#. ๐Ÿ”ฅ๐Ÿ’ง๐Ÿค– Sparx fork of the mcp-servers-for-revit/revit-mcp project It currently holds 366 stars and 152 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #62 with 5 new stars today.

GitHub Repository Details

Repository mcp-servers-for-revit/mcp-servers-for-revit ยท default branch - ยท size 0 KB ยท watchers 0 ยท source: GitHub REST API and repository README

README

Cover Image

mcp-servers-for-revit

Connect AI assistants to Autodesk Revit via the Model Context Protocol.

mcp-servers-for-revit enables AI clients like Claude, Cline, and other MCP-compatible tools to read, create, modify, and delete elements in Revit projects. It consists of three components: a TypeScript MCP server that exposes tools to AI, a C# Revit add-in that bridges commands into Revit, and a command set that implements the actual Revit API operations.

[!NOTE]
This is a fork of the original revit-mcp project with additional tools and functionality improvements.

Architecture

flowchart LR
    Client["MCP Client
(Claude, Cline, etc.)"] Server["MCP Server
server/"] Plugin["Revit Plugin
plugin/"] CommandSet["Command Set
commandset/"] Revit["Revit API"]

Client <-->|stdio| Server Server <-->|WebSocket| Plugin Plugin -->|loads| CommandSet CommandSet -->|executes| Revit

The MCP Server (TypeScript) translates tool calls from AI clients into WebSocket messages. The Revit Plugin (C#) runs inside Revit, listens for those messages, and dispatches them to the Command Set (C#), which executes the actual Revit API operations and returns results back up the chain.

Requirements

Quick Start (Using a Release)

1. Download the ZIP for your Revit version from the Releases page (e.g., mcp-servers-for-revit-v1.0.0-Revit2025.zip)

2. Extract the ZIP and copy the contents to your Revit addins folder:

   %AppData%\Autodesk\Revit\Addins\\
   
After copying you should have:
   Addins/2025/
   โ”œโ”€โ”€ mcp-servers-for-revit.addin
   โ””โ”€โ”€ revit_mcp_plugin/
       โ”œโ”€โ”€ RevitMCPPlugin.dll
       โ”œโ”€โ”€ ...
       โ””โ”€โ”€ Commands/
           โ””โ”€โ”€ RevitMCPCommandSet/
               โ”œโ”€โ”€ command.json
               โ””โ”€โ”€ 2025/
                   โ”œโ”€โ”€ RevitMCPCommandSet.dll
                   โ””โ”€โ”€ ...
   

3. Configure the MCP server in your AI client (see MCP Server Setup)

4. Start Revit โ€” if prompted about an unknown add-in, click Always Load

5. In Revit, click the Settings button on the mcp-servers-for-revit ribbon tab, enable the commands you want to use, and click Save

MCP Server Setup

The MCP server is published as an npm package and can be run directly with npx.

Claude Code

Run this in a terminal (not inside Claude Code):

claude mcp add mcp-server-for-revit -- cmd /c npx -y mcp-server-for-revit

Claude Desktop

Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config โ†’ claude_desktop_config.json:

{
    "mcpServers": {
        "mcp-server-for-revit": {
            "command": "cmd",
            "args": ["/c", "npx", "-y", "mcp-server-for-revit"]
        }
    }
}

Restart Claude Desktop. When you see the hammer icon, the MCP server is connected.

Claude Desktop connection

Revit Plugin Setup

If using a release ZIP, the plugin is already included. For manual installation:

1. Build the plugin from plugin/ (see Development) 2. Copy mcp-servers-for-revit.addin to %AppData%\Autodesk\Revit\Addins\\ 3. Copy the revit_mcp_plugin/ folder to the same addins directory

Command Set Setup

If using a release ZIP, the command set is pre-installed inside the plugin. For manual installation:

1. Build the command set from commandset/ (see Development) 2. Inside the plugin's installation directory, create Commands/RevitMCPCommandSet// 3. Copy the built DLLs into that folder 4. Copy command.json (from repo root) into Commands/RevitMCPCommandSet/

Supported Tools

| Tool | Description | | ---- | ----------- | | get_current_view_info | Get current active view info | | get_current_view_elements | Get elements from the current active view | | get_available_family_types | Get available family types in current project | | get_selected_elements | Get currently selected elements | | get_material_quantities | Calculate material quantities and takeoffs | | ai_element_filter | Intelligent element querying tool for AI assistants | | analyze_model_statistics | Analyze model complexity with element counts | | create_point_based_element | Create point-based elements (door, window, furniture) | | create_line_based_element | Create line-based elements (wall, beam, pipe) | | create_surface_based_element | Create surface-based elements (floor, ceiling, roof) | | create_grid | Create a grid system with smart spacing generation | | create_level | Create levels at specified elevations | | create_room | Create and place rooms at specified locations | | create_dimensions | Create dimension annotations in the current view | | create_structural_framing_system | Create a structural beam framing system | | delete_element | Delete elements by ID | | operate_element | Operate on elements (select, setColor, hide, etc.) | | color_elements | Color elements based on a parameter value | | tag_all_walls | Tag all walls in the current view | | tag_all_rooms | Tag all rooms in the current view | | export_room_data | Export all room data from the project | | store_project_data | Store project metadata in local database | | store_room_data | Store room metadata in local database | | query_stored_data | Query stored project and room data | | send_code_to_revit | Send C# code to Revit to execute | | say_hello | Display a greeting dialog in Revit (connection test) |

Testing

The test project uses Nice3point.TUnit.Revit to run integration tests against a live Revit instance. No separate addin installation is required โ€” the framework injects into the running Revit process automatically.

Prerequisites

Running Tests

1. Open Revit 2026 (or 2025) and wait for it to fully load 2. Run the tests from the command line:

# For Revit 2026
dotnet test -c Debug.R26 -r win-x64 tests/commandset

For Revit 2025

dotnet test -c Debug.R25 -r win-x64 tests/commandset
Note: The -r win-x64 flag is required on ARM64 machines because the Revit API assemblies are x64-only.

Alternatively, you can use dotnet run:

cd tests/commandset
dotnet run -c Debug.R26

IDE Support

Test Structure

| Directory | Purpose | |-----------|---------| | tests/commandset/AssemblyInfo.cs | Global [assembly: TestExecutor] registration | | tests/commandset/Architecture/ | Tests for level and room creation commands | | tests/commandset/DataExtraction/ | Tests for model statistics, room data export, and material quantities | | tests/commandset/ColorSplashTests.cs | Tests for color override functionality | | tests/commandset/TagRoomsTests.cs | Tests for room tagging functionality |

Writing New Tests

Test classes inherit from RevitApiTest and use TUnit's async assertion API:

public class MyTests : RevitApiTest
{
    private static Document _doc;

[Before(HookType.Class)] [HookExecutor] public static void Setup() { _doc = Application.NewProjectDocument(UnitSystem.Imperial); }

[After(HookType.Class)] [HookExecutor] public static void Cleanup() { _doc?.Close(false); }

[Test] public async Task MyTest_Condition_ExpectedResult() { var elements = new FilteredElementCollector(_doc) .WhereElementIsNotElementType() .ToElements();

await Assert.That(elements.Count).IsGreaterThan(0); } }

Development

MCP Server

cd server
npm install
npm run build

The server compiles TypeScript to server/build/. During development you can run it directly with npx tsx server/src/index.ts.

Revit Plugin + Command Set

Open mcp-servers-for-revit.sln in Visual Studio. The solution contains both the plugin and command set projects. Build configurations target Revit 2020-2026:

Building the solution automatically assembles the complete deployable layout in plugin/bin/AddIn / - the command set is copied into the plugin's Commands/ folder as part of the build.

Project Structure

mcp-servers-for-revit/
โ”œโ”€โ”€ mcp-servers-for-revit.sln    # Combined solution (plugin + commandset + tests)
โ”œโ”€โ”€ command.json     # Command set manifest
โ”œโ”€โ”€ server/          # MCP server (TypeScript) - tools exposed to AI clients
โ”œโ”€โ”€ plugin/          # Revit add-in (C#) - WebSocket bridge inside Revit
โ”œโ”€โ”€ commandset/      # Command implementations (C#) - Revit API operations
โ”œโ”€โ”€ tests/           # Integration tests (C#) - TUnit tests against live Revit
โ”œโ”€โ”€ assets/          # Images for documentation
โ”œโ”€โ”€ .github/         # CI/CD workflows, contributing guide, code of conduct
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

Releasing

A single v* tag drives the entire release. The release workflow automatically:

To create a release:

1. Run the bump script (updates server/package.json, server/package-lock.json, and plugin/Properties/AssemblyInfo.cs, then commits and tags):

   ./scripts/release.ps1 -Version X.Y.Z
   

2. Push to trigger the workflow:

   git push origin main --tags
   

[!NOTE]
npm publish uses trusted publishing via OIDC โ€” no npm token is required. Provenance attestation is generated automatically.

Acknowledgements

This project is a fork of the work by the mcp-servers-for-revit team. The original repositories:

Thank you to the original authors for creating the foundation that this project builds upon.

License

MIT

GitHub Stars & Activity

366Stars
152Forks
0Open issues
C#Language

GitHub Popularity

GitHub stars366
Forks152
Open issues0
Primary languageC#
License-
Stars gained today5
Created-
Last pushed-

Trending History

Daily boardrank #62 ยท โ–ฒ 5 stars

Related AI Projects

1

CoplayDev / unity-mcp

C#โ˜… 14,746โ‘‚ 1,534โ–ฒ 22 stars
โ†’
2

microsoft / mcp

C#โ˜… 3,742โ‘‚ 637โ–ฒ 7 stars
โ†’
3

ggml-org / Llama-Windows

C#โ˜… 54โ‘‚ 9โ–ฒ 7 stars
โ†’
4

mattpocock / skills

Shellโ˜… 279,351โ‘‚ 23,406โ–ฒ 1,406 stars
โ†’
5

affaan-m / ECC

JavaScriptโ˜… 274,808โ‘‚ 0
โ†’
6

NousResearch / hermes-agent

Pythonโ˜… 251,897โ‘‚ 0
โ†’
7

deepseek-ai / deepseek-harness

TypeScriptโ˜… 245,133โ‘‚ 0
โ†’
8

n8n-io / n8n

TypeScriptโ˜… 206,820โ‘‚ 0
โ†’

More AI Rankings