Logo van Revit MCP

Revit MCP

Community
shuotao

LEARN HOW TO BUILD UP YOUR REVIT MCP

Uitgevershuotao
RepositoryREVIT_MCP_study
TaalC#
Forks
121
Sterren
101
Beschikbare tools
0
Transporttypestdio
Categorieën
Links
  • Koppel tools aan AI-workflows

    Revit MCP biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    101 sterren en 121 forks in de gekoppelde repository.

Revit MCP - AI-Powered Revit Control

English | 繁體中文

Revit MCP lets AI clients call Autodesk Revit tools through the Model Context Protocol (MCP). The MCP server forwards tool calls to a local Revit add-in, and the add-in executes the corresponding Revit API workflow.

What is this?

Talk to Revit in plain language. Ask your AI client to "dimension every wall on this view" or "check the curtain-wall elevations", and Revit does it — through 192 MCP tools backed by 83 professional BIM SOPs (building code, quantity take-off, compliance checks).

Who it's for: BIM engineers and architects who use Revit and want AI-assisted, standards-based workflows. You'll need Revit (2022–2026) on Windows and to be comfortable installing an add-in.

Quickstart (3 steps)

  1. Install the Revit add-in. Build and deploy the C# add-in — see Manual Setup. This is the half that actually talks to Revit.
  2. Point your AI client at the MCP server. No cloning needed — it runs straight from npm:
    json
    { "mcpServers": { "revit-mcp": { "command": "npx", "args": ["-y", "@shuotao/revit-mcp-server"] } } }
  3. Open Revit, enable the MCP service in the ribbon, and start asking. Full setup: AI Client Configuration.

Questions or want to show what you built? → Discussions

Current Project Counts

ItemCountSource
Runtime MCP tools192registerRevitTools() in MCP-Server/src/tools/index.ts
Domain SOP files83domain/*.md except README.md, plus domain/references/*.md
Claude skills61.claude/skills/*/SKILL.md

When these numbers change, update CLAUDE.md, README.zh-TW.md, this file, docs/DOCUMENT_AUDIENCE_INVENTORY.md, and run:

powershell
.\scripts\verify-qaqc.ps1 -SkipBuild -SkipDeploy

New: Interactive Clash Viewer (MCP Apps)

detect_clashes can now render an interactive clash-review UI inline in the conversation, via the MCP Apps extension (io.modelcontextprotocol/ui). This requires an MCP host that supports the extension. It is purely additive:

  • Interactive rendering only happens in GUI hosts that support MCP Apps (Claude Desktop, the claude.ai web app, VS Code GitHub Copilot). A terminal CLI like Claude Code can't render the panel and always shows the text result — this is expected, not a fault.
  • Hosts without MCP Apps support keep getting detect_clashes's normal text result — nothing changes for them.
  • The stdio connection and the existing Revit add-in are unaffected; no reinstall or reconfiguration is needed.

See docs/MIGRATION_GUIDE.md for the full MCP 2026-07-28 upgrade notes.

Architecture

text
AI Client
  Claude Desktop / Claude Code / Gemini CLI / VS Code Copilot / Antigravity
        |
        | stdio
        v
MCP Server
  Node.js / TypeScript
  MCP-Server/build/index.js
        |
        | WebSocket ws://localhost:8964
        v
Revit Add-in
  C# / Revit API
  MCP/Application.cs
  MCP/Core/SocketService.cs
  MCP/Core/ExternalEventManager.cs
        |
        v
Autodesk Revit

External AI clients do not need an API key inside this repository. Their account and authorization are managed by the AI client itself. Only an embedded Revit chat feature that directly calls an AI API would need an API key.

Requirements

ItemRequirement
OSWindows 10 or later
RevitAutodesk Revit 2022, 2023, 2024, 2025, 2026
.NET.NET Framework 4.8 for Revit 2022-2024; .NET 8 for Revit 2025-2026
Node.jsLTS, preferably 20.x or later

One-Click Setup

Recommended for new users:

powershell
.\scripts\setup.ps1

For AI agents or non-interactive setup:

powershell
powershell -ExecutionPolicy Bypass -File scripts/setup.ps1 -NonInteractive -RevitVersions "2024,2025"

The setup script checks prerequisites, installs dependencies, builds the MCP server, builds and deploys the Revit add-in, and helps configure common AI clients.

Install from MCP Registry

The MCP server is published on the MCP Registry as io.github.shuotao/revit-mcp-server (npm package @shuotao/revit-mcp-server). Run it directly with:

bash
npx -y @shuotao/revit-mcp-server

Note: this npm package is only the Node stdio bridge. The C# Revit add-in (MCP/) must still be installed separately — follow Manual Setup below for your Revit version.

Manual Setup

1. Build the MCP Server

powershell
cd MCP-Server
npm install
npm run build

AI clients launch:

text
node MCP-Server/build/index.js

2. Build the Revit Add-in

Choose the configuration that matches your Revit version:

powershell
cd MCP
dotnet build -c Release.R22 RevitMCP.csproj   # Revit 2022
dotnet build -c Release.R23 RevitMCP.csproj   # Revit 2023
dotnet build -c Release.R24 RevitMCP.csproj   # Revit 2024
dotnet build -c Release.R25 RevitMCP.csproj   # Revit 2025
dotnet build -c Release.R26 RevitMCP.csproj   # Revit 2026

Expected output:

text
MCP/bin/Release.R{YY}/RevitMCP.dll

Example for Revit 2024:

text
MCP/bin/Release.R24/RevitMCP.dll

3. Deploy the Add-in

Recommended:

powershell
# Pick the Revit version explicitly. With several installed and no -Version, the script asks;
# in -NonInteractive mode it fails rather than guessing (it never silently picks the highest).
.\scripts\install-addon.ps1 -Version 2024

# Deploy to every installed version that has a matching build
.\scripts\install-addon.ps1 -All

The script copies every DLL in the build output (13 for R22-R24, 8 for R25-R26 — both are correct), checks the build generation matches the target Revit before copying, verifies each file by SHA256 afterwards, and rotates old backups.

For manual deployment, place the .addin file and DLL under the matching Revit Addins directory, and keep the relative assembly path in RevitMCP.addin:

xml
<Assembly>RevitMCP\RevitMCP.dll</Assembly>

Do not create version-specific .addin files, and do not hardcode absolute DLL paths.

AI Client Configuration

Project-level .mcp.json:

json
{
  "mcpServers": {
    "revit-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["./MCP-Server/build/index.js"],
      "env": {}
    }
  }
}

VS Code config in .vscode/mcp.json:

json
{
  "servers": {
    "revit-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["${workspaceFolder}/MCP-Server/build/index.js"],
      "env": {}
    }
  }
}

Other AI clients use the same concept: launch MCP-Server/build/index.js with node.

Config template per client:

AI ClientConfig locationTemplate
Claude Codeproject root .mcp.jsonbuilt in, works out of the box
Claude Desktop%APPDATA%\Claude\claude_desktop_config.jsonMCP-Server/claude_desktop_config.json
Gemini CLI~/.gemini/settings.jsonMCP-Server/gemini_mcp_config.json
VS Code Copilot.vscode/mcp.jsonbuilt in
AntigravityUI settingsAntigravity_MCP_Complete_Guide.md

Replace <YOUR_PROJECT_PATH> in the templates with the actual project path on your machine.

Switching Between AI Clients

The Revit-side WebSocket service holds an exclusive lock: only one AI client can be connected at a time. A second client that tries to connect is cleanly rejected (HTTP 409), not swapped in — the first connection stays stable. Multiple AI clients are therefore used by switching, not concurrently:

Before that lock check even runs, any handshake carrying a browser Origin header is rejected outright with HTTP 403. This closes a separate risk: a malicious page open in your browser could otherwise drive the add-in without your knowledge, since WebSocket handshakes aren't covered by the browser's same-origin policy. It has no settings opt-out and does not affect the MCP bridge, which never sends an Origin header.

  1. In the Revit ribbon, click the "切換/釋放連線" (Switch/Release Connection) button to release the current connection.
  2. Start or reconnect the other AI client; once its MCP server connects to localhost:8964, it takes the lock.
  3. The "MCP 設定" dialog shows which client currently holds the connection (e.g. claude-code, claude-ai).
  4. If the connection misbehaves, use the same ribbon button, or restart the MCP service from the Revit ribbon to reset it.

Startup Flow

  1. Start Revit.
  2. Open or create a Revit project.
  3. Enable the MCP service from the Revit ribbon.
  4. Confirm the Revit add-in is listening on localhost:8964.
  5. Start or restart the AI client so it loads the MCP server.
  6. Call Revit MCP tools from the AI client.

If localhost:8964 is unreachable, Revit may not be running, the MCP service may be off, the port may be occupied, or the AI client and Revit add-in may be using different port settings.

Project Structure

text
REVIT_MCP/
  MCP/                         Revit Add-in (C#)
    Application.cs             Revit add-in entry point
    RevitMCP.csproj            Single multi-version project
    RevitMCP.addin             Single add-in manifest
    Core/
      SocketService.cs         Revit-side WebSocket server
      ExternalEventManager.cs  UI-thread execution bridge
      RevitCompatibility.cs    Revit 2022-2026 compatibility helpers
      CommandExecutor.cs       Main command dispatcher
      Commands/*.cs            Command modules
  MCP-Server/                  MCP Server (Node.js / TypeScript)
    src/index.ts               stdio MCP server entry
    src/socket.ts              WebSocket client to Revit
    src/tools/*.ts             MCP tool definitions
  domain/                      Shared BIM SOPs; do not convert to English-only
  .claude/                     AI commands and skills
  docs/                        Human-facing docs and public knowledge site
  scripts/                     Setup, deployment, QA/QC scripts
  log/                         Append-only session and commit logs

AI Docs and Human Docs

TypeLocationRule
AI-onlyCLAUDE.md, .claude/commands/, .claude/skills/English-first to avoid mojibake
Human-facingREADME.md, README.zh-TW.md, docs/, scripts/README.mdMatch the reader's language
Shareddomain/*.md, log/README.mdDomain files must remain Chinese-readable and must not become English-only
Historicaldocs/_archive/**, old logsPreserve by default

See docs/DOCUMENT_AUDIENCE_INVENTORY.md.

Domain, Skill, and Tool Responsibilities

  • domain/*.md: BIM SOPs, regulatory logic, and calculation methods. Shared by humans and AI.
  • .claude/skills/*/SKILL.md: AI workflow orchestration.
  • MCP-Server/src/tools/*.ts: MCP tool definitions and input schemas.
  • MCP/Core/Commands/*.cs: Revit API implementation.

If a Domain file and a Skill disagree on method, the Domain file wins.

QA/QC

After documentation, tool, Domain, Skill, build, or deployment changes, run:

powershell
.\scripts\verify-qaqc.ps1 -SkipBuild -SkipDeploy

Before deployment, run a full check:

powershell
.\scripts\verify-qaqc.ps1 -Version 2024

QA/QC checks:

  • forbidden legacy files and paths
  • required file structure
  • README / CLAUDE / docs count alignment
  • Domain table forward and reverse coverage
  • local Markdown link rot
  • Domain frontmatter
  • document audience classification
  • mojibake risk in canonical docs

Troubleshooting

AI cannot find Revit tools

Check:

  1. npm run build has been run in MCP-Server.
  2. The AI client's MCP config points to the correct MCP-Server/build/index.js.
  3. The AI client has been restarted or has reloaded MCP servers.

MCP Server cannot connect to Revit

Check:

  1. Revit is running.
  2. The MCP service is enabled in the Revit ribbon.
  3. localhost:8964 is not occupied.
  4. If HTTP.sys / PID 4 is holding the port, try:
powershell
powershell -ExecutionPolicy Bypass -File scripts\release-port.ps1

Revit does not show the MCP Tools panel

Confirm the .addin file and DLL were deployed under the matching %APPDATA%\Autodesk\Revit\Addins\{version} directory, then restart Revit.

Important Rules

  • Keep one MCP/RevitMCP.csproj.
  • Keep one MCP/RevitMCP.addin.
  • Do not create version-specific .csproj or .addin files.
  • Do not create nested MCP/MCP/ directories.
  • Do not change .addin <Assembly> to an absolute path.
  • Do not convert Domain files to English-only.
  • Do not bypass the MCP server with hand-written WebSocket JSON.
  • For live Revit view, level, selection, or document state, AI must query live state in the current turn.

Document Navigation

DocumentPurpose
CLAUDE.mdMain AI agent constitution and project map
AGENTS.mdRedirect to CLAUDE.md
GEMINI.mdRedirect to CLAUDE.md
README.zh-TW.mdTraditional Chinese README
CONTRIBUTING.mdContribution guide
CHANGELOG.mdRelease history
domain/README.mdDomain SOP catalog
domain/lessons.mdProject lessons
.claude/skills/AI skills
.claude/commands/AI slash commands
scripts/README.mdScript documentation
docs/DOCUMENT_AUDIENCE_INVENTORY.mdDocument audience inventory
docs/DOCS_STRUCTURE.mdDocs directory guide
log/README.mdLog append rules

License

MIT License

Installatie

TypingMind
{
  "mcpServers": {
    "revit-mcp-study": {
      "command": "gemini",
      "args": [
        "--config",
        "{{config.CONFIG_PATH}}"
      ],
      "env": {
        "CONFIG_PATH": "<CONFIG_PATH>"
      }
    }
  }
}

Gebruik Revit MCP MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Revit MCP is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Revit MCP toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Revit MCP.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "revit-mcp-study": {
      "command": "npx",
      "args": [
        "-y",
        "@google/gemini-cli"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Revit MCP in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Revit MCP in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Revit MCP gebruiken om me hiermee te helpen?
Revit MCP
Zeker. Ik heb het gelezen.
Dit vond ik met Revit MCP.

Veelgestelde vragen

Waarvoor wordt de MCP-server Revit MCP gebruikt?

Revit MCP is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Revit MCP MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Revit MCP gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Revit MCP MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Revit MCP verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Revit MCP MCP met TypingMind?

Revit MCP werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Revit MCP MCP in TypingMind?

Revit MCP biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Revit MCP MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Revit MCP authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇