Open-source Revit MCP server: let Claude and other AI assistants read and edit BIM models, with human approval on every change.
Build And Install Scripts
The scripts/ directory is the operational entry surface for building, packaging, installing, and running the stack.
Script Roles
scripts/build-addin.ps1
Builds the C# add-in for a selected Revit version.
Key behavior:
- blocks unsafe execution from
C:\Windows - prefers MSBuild discovered through
vswhere - falls back to
dotnet build - passes
RevitVersionintoRevitBridge.csproj
scripts/package.ps1
Creates a distribution package under dist\AECModelBridge.
Key behavior:
- builds add-in binaries for one or more Revit versions
- copies versioned binaries into
dist\bin\{year} - attempts PyInstaller packaging for the Python server
- always builds a wheel as fallback
- writes
default.jsonandREADME.txtinto the distribution payload
scripts/build-installer.ps1
Builds the double-click Windows installer.
Key behavior:
- runs
package.ps1for all Revit years first (skip with-SkipPackagewhendist\AECModelBridgeis current) - refuses to build if the payload is incomplete or contains Autodesk assemblies (
assert-no-autodesk-assemblies.ps1) - locates Inno Setup (
ISCC.exe); outside CI it trieswingetif missing - writes
AECModelBridge-Setup-<version>.exetodist\(or-OutputDir);-UpdateChecksumsadds it toSHA256SUMS.txt - uses the wizard images and app icon from
assets/, generated byscripts/make_brand_assets.py - the installer script is
scripts/installer/AECModelBridge.iss; itsAppVersionline is kept in sync byscripts/version.py
scripts/test-installer.ps1
Silent install, upgrade, failure and uninstall smoke test for the built installer. It
changes C:\ProgramData\AECModelBridge and %APPDATA%, so it only runs with
-AllowOverwrite; use a throw-away machine. The release workflow runs it before publishing.
scripts/install.ps1
Installs from a prepared distribution package.
Key behavior:
- auto-triggers packaging if
dist\AECModelBridgeis missing - copies bridge binaries into
C:\ProgramData\AECModelBridge\bin\{year} - installs the add-in manifest into the selected Revit add-in directory
- copies default configuration into
C:\ProgramData\AECModelBridge\config
scripts/install-addin.ps1
Performs the minimal manifest copy for a chosen Revit year.
This is the narrowest install path and is useful when the binaries are already built.
scripts/setup.ps1
Acts as the orchestration script.
It runs:
- build
- package
- optional install
scripts/start-server.ps1
Prepares and launches the Python MCP server.
Key behavior:
- creates
.envfrom.env.exampleif needed - checks Python availability
- installs the Python package in editable mode
- optionally probes the dynamic Revit bridge endpoint from the local registry in bridge mode
- launches
python -m revit_mcp_server
scripts/run-server.ps1
This is the thinnest launch path and only executes python -m revit_mcp_server.
Safety Pattern
The more powerful scripts include a path guard that refuses execution from C:\Windows. That is an intentional operational safeguard, not decoration.
Working Rule
Use setup.ps1 when you want the full build-package-install path. Use start-server.ps1 when the add-in is already in place and you only need to validate or run the Python side.