revit-bridge
Based on the provided schema, this MCP server lets an AI client run confirmed C# in a live Revit session and manage reusable Revit tool packs.
execute_code— send C# code to Revit over a local TCP socket; refused unlessspec_confirmed=true; returns the execution result or error.solidify_tool— save a successful code execution as a named reusable tool with tags, description, and parameter definitions.list_tools— list all solidified tools available for execution.get_tool_choices— query Revit for a tool’s dynamic parameter choices, such as levels or family types, before running it.run_tool— execute a named solidified tool with JSON parameters; refused unlessspec_confirmed=true.
Executes code in a running Autodesk Revit instance, providing tools for design tasks such as creating walls, querying levels, listing family types, and running arbitrary C# code within Revit's document context.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@revit-bridge List all levels in the current Revit project."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
revit-bridge
Intent bridge between designers and AI for Autodesk Revit: an MCP server that executes code in a running Revit, keeps a library of reusable capability packs, and refuses to run anything the designer has not confirmed - except a dry run, which is always rolled back and keeps nothing.
The package contains no model SDK, no vector store and no web framework. Your MCP host (Claude Desktop, Claude Code, any MCP client) brings the model; the revit-bridge-addin inside Revit executes the code.
Install
Prerequisites: Python 3.11+ with uv (for uvx),
Revit 2020, 2021 or 2023-2026 with the add-in installed (one install per Revit
year; see revit-bridge-addin)
and its local TCP listener on (default 127.0.0.1:18080). dry_run_code,
test_addin_command, zoom_view and capture_view need revit-bridge-addin
0.5.0 or later.
Claude Desktop — claude_desktop_config.json:
{
"mcpServers": {
"revit-bridge": {
"command": "uvx",
"args": ["revit-bridge"]
}
}
}Claude Code - the plugin (skill + MCP server + confirmation hook, recommended):
/plugin marketplace add revitbridge/revit-bridge
/plugin install revit-bridge@revit-bridgeThe plugin's .mcp.json starts the server with uvx; its hooks/hooks.json
denies execute_code / run_tool calls that carry no confirmation token
(uv run executes plugin/hooks/spec_gate.py, so uv must be on PATH). The
skill is also installable on its own with
npx skills add revitbridge/revit-bridge.
MCP server only, without the skill and hook:
claude mcp add revit-bridge -- uvx revit-bridgeAny MCP client — run uvx revit-bridge as a stdio server. Pass connection
settings through environment variables (see Configure), for example in the
env block of the host's server entry.
Your own host — the same flow is a package API: revit_bridge.execution
(run_pack, run_code, revalidate) with your own ToolStore, Gate,
Ledger and Revit client, plus revit_bridge.host_instructions() for a host
whose interface does the confirmation.
From a checkout: uv sync then uv run revit-bridge.
Develop a standalone C# add-in, phase by phase — the skills in
plugin/skills/ follow an add-in from the designer's sentence to the release.
Each phase skill works on its own; the bridge components (MCP server,
revit-bridge-addin, revit-api-docs) only add to a phase, and each phase
skill's SKILL.md has a table saying what they add.
Phase | Skill | What it does | Needs a component |
Brief |
| Rewrites a one-sentence request ("I pick two crossing pipes and the first one gets jogged over the other") into a testable brief: numbered behaviour, inputs with units and defaults, cancel and failure rules, project facts, deliverables, verification, decisions. | No; with the bridge it reads the project facts itself |
Coding |
| Continues a project or creates a minimal command project for Revit 2024 to 2027, including the 2025.5/2026.5 .NET 10 updates (select the exact installed release, not just its year), and delivers a DLL that runs without the bridge. | No; the bridge adds model context and prototype checks |
Bridging |
| Builds, changes and queries the open model through the server: snapshot, reconcile, confirm, execute, verify. | Yes: the MCP server and the revit-bridge-addin |
Test |
| Runs the compiled add-in in a real Revit without disturbing others on the machine, reads journals, finds why Revit hangs, judges a build matrix, compares base and branch. | No; with the revit-bridge-addin calls go through its protocol |
Release |
| Multi-year release build, obfuscation, installer, acceptance on a real machine, the review record, logs from a user's machine. | No |
Install the skills in another project
The six skills (revit-task-brief, revit-addin-dev, revit-addin-test,
revit-addin-release, revit-bridge, revit-core) are self-contained
folders: a SKILL.md plus references/, scripts/ and assets/. Any agent
that reads skill folders can use them, with or without the MCP server. The
four add-in phase skills need no bridge connection at all (testing and
acceptance need a real Revit, not the server); revit-bridge and revit-core describe the bridge
tools and are most useful with the server configured; in a repository without
the server their descriptions only cost context, so install --profile addin
there.
Where you work | Install |
Claude Code, everything (skills + MCP server + confirmation hook) |
|
Claude Code, one project (skills only) |
|
Claude Code, every project of this user (skills only) |
|
Codex, dsh and other agents reading |
|
One skill only | add its name: |
An add-in repository that does not use the bridge |
|
Without |
|
From a checkout, without copying |
|
revit-bridge skills list prints the names and descriptions. install
copies whole folders, leaves other skills in the directory alone, and refuses
to overwrite an existing folder of the same name unless --force is given,
so local edits survive an accidental re-install. To upgrade, run it again
with --force after uvx has fetched the new release (uvx revit-bridge@latest skills install ...).
The bundled scripts need Python 3.11+ or Windows PowerShell 5.1+:
new_addin.py in revit-addin-dev; journal_tail.py, addin_snapshot.py,
revit_ps.ps1 and window_list.ps1 in revit-addin-test; collect_logs.ps1
with its collect_logs.bat launcher in revit-addin-release. Nothing else is
installed and none of them starts, installs or closes a Revit.
Example request once installed: "Use revit-addin-dev to continue my C#
plugin, inspect the selected walls through revit-bridge where needed, and
build an independent command." The bundled scripts/new_addin.py --help
describes the starter generator; it does not install or launch the add-in.
Related MCP server: Civil3D MCP Server
Use
Start Revit, open a project and make sure the add-in is listening.
Check the connection:
uvx revit-bridge checkPrints host, port, whether a token is set, the open document's title (
document, ordocument_errorwhen the add-in answered but could not read it) and"status": "connected", pluscapability(supportedwhen the add-in answersget_bridge_capabilities,unsupportedfor an older add-in,unknownwith thereasonotherwise) andenvironment(Revit version and runtime); the exit code is 0 when the add-in answered, 1 otherwise.In your host, the flow is snapshot → questions → confirmation → execution → validation:
get_project_snapshot— what the model contains (units, levels, grids, family types, selection, …);query(kind, args)answers single read-only questions (levels,grids,family_types,elements,selection,view_elements,units,counts). Neither needs confirmation.list_tools— the capability packs (eight built-ins such ascreate_wall,create_structural_column,query_levels, plus your own);missing_params(tool, known)— the questions still open, with the real options, who can answer each (kind) and the steps it holds up (blocks);get_tool_choices(name)— levels, types or elements for a pack's dynamic parameters.reconcile(spec, snapshot)— a draft TaskSpec against the model: values that do not exist, missing parameters, readings to confirm (units, "on F2"), a stale snapshot.check_code(code, parameters)— compiles C# forexecute_codein Revit without running it (no token):diagnosticswith lines in your code,hints, andguidance(the lessons for those errors, or pointers once it compiles);checked: falsewhen the add-in cannot (an older add-in).dry_run_code(code, parameters, include)- runs C# in Revit and always rolls it back (no token): what the code returned, what it would have added, modified and deleted (counts by category), and every Revit warning or error;no_dry_runwhen the add-in has no dry run, anddry_run_not_rolled_backis a defect to report at once.includenames local.csfiles compiled with the code (at most 20, 400 KB in all), so an add-in's core-logic file is dry-run as it is; it needs an add-in that reportsfeatures.dry_run_sources(elseno_dry_run_include).test_addin_command(dll, command_class, picks, input, readback_code, zoom_to, timeout_seconds, restore)- runs a built add-in DLL's command in the open model without installing it: picks clicked on elements by id, input from<name>.input.json, then the model is restored (no token). Returns what the command returned, its result file, the changes and every warning the command left to Revit, and the read-back;addin_test_not_restoredis a defect to report at once.zoom_viewandcapture_viewmove the view and save a picture of it. All three need an add-in that reportsfeatures.addin_test(elseno_addin_test).get_guidance(stage=...)— lessons for writing Revit code (the snippet contract, units, API pitfalls), chosen by stage, API symbols, OST_* categories, compiler errors and run-time exceptions; read-only, no token.confirm_spec(spec)with the TaskSpec the designer confirmed, thenrun_tool(name, params, token)with exactly the confirmed values.plan_verification(template, params)/verify_execution(evidence_id, verification_id)— forexecute_code: a read-back check (created_ids,count_delta,param_equals) planned before confirming, run after; no token.
execute_codetakes arbitrary C# for tasks no pack covers. The code runs inside Revit withdocumentin scope and a transaction already open; end it withreturn <object>;. When it throws in Revit, the reply'shintnames theget_guidance(stage="fix", exceptions=[...])call for that exception.solidify_toolsaves code that worked as a new pack.A pack's validator (
created_ids,count_deltaorparam_equals) asserts the outcome after the run:successis true only when Revit succeeded and the assertion held, and every execution leaves a line in the evidence ledger (evidence,validate(evidence_id)).
Devices and the dialog in Revit. A host that reaches Revit over the
network (the web demo) pairs each add-in installation once:
DeviceStore.create_pairing() hands out a XXXX-XXXX code that is valid for
ten minutes, the add-in redeems it with DeviceStore.redeem(code) and keeps
the device token it gets back, and the browser that asked for the pairing
keeps a browser key. Only sha256 digests of the code, the token and the key
are stored (<data dir>/auth/devices.json); verify_device,
verify_browser and revoke are how a host authorises a request afterwards.
Each confirmation and each ledger line then carries the scope it belongs to
the
device_id, orlocalfor the add-in on this machine - and a token confirmed for one device cannot be redeemed on another. Independently of any client setting,execute_codeasks the designer once more in Revit: the request carries the confirmed spec card, the add-in shows it with Yes/No and waits up to three minutes, and a No comes back aserror: "declined_on_device"(the token is spent and the run is in the ledger).run_toolruns capability packs without that dialog.
Confirmation gate. execute_code and run_tool return
confirmation_required without a token. A token comes only from
confirm_spec(spec): the TaskSpec lists every parameter with its value, source
and evidence; the server validates it and issues a one-time token bound to
exactly that tool and those parameters (or that code). Running anything else
with it, reusing it, or using it after 10 minutes fails with
confirmation_invalid. missing_params and reconcile help build the spec.
dry_run_code needs no token: the add-in rolls every dry run back.
Hosts that run their own confirmation flow can set
REVIT_BRIDGE_ALLOW_UNCONFIRMED=1.
Resources: revit://stats, revit://tools/{name}, revit://evidence/recent,
revit://connection-status, revit://guidance/index.
Guidance layers and CLI. get_guidance and check_code read the packaged
lessons (framework) and up to three directories laid out the same way: company
(REVIT_BRIDGE_GUIDANCE_COMPANY), project (REVIT_BRIDGE_GUIDANCE_PROJECT) and
personal (<data dir>/guidance). A higher layer replaces a lesson of the same id,
except a company lesson with enforced: true; a layer that fails validation is
left out with a layer_invalid warning. uvx revit-bridge guidance check validates
them (exit 1 on a problem), guidance index [DIR] [--check] rebuilds the lesson
indexes and the revit-core skill export, and guidance explain --stage fix --errors CS1061 --symbols Wall LocationCurve prints what would be recommended, and why.
Output of revit-bridge guidance and revit-bridge skills sent to a pipe or a
file is UTF-8; in Windows PowerShell 5.1 run [Console]::OutputEncoding = [Text.Encoding]::UTF8 before piping or capturing it, otherwise Chinese text
shows as mojibake (revit-bridge check prints ASCII-escaped JSON there and
needs nothing).
The plugin ships an eval suite (plugin/evals/, the three baseline tasks and
two second-turn cases, with mocks of the MCP server). Run it by hand from
plugin/ with claude plugin eval . (on Windows in a UTF-8 console:
chcp 65001 first, or the Chinese prompts reach the model garbled); it is not
part of CI.
Pair with revit-api-docs
revit-api-docs is an optional second server: search_revit_api looks API names up in the Revit 2026 API reference, and check_code hints point at it. Its data set covers Revit 2026 only, whichever Revit year the add-in runs in; for another year, treat members that changed between releases as unconfirmed.
The plugin does not start it: add it with claude mcp add revit-api-docs -- uvx revit-api-docs, or in one config:
{"mcpServers": {"revit-bridge": {"command": "uvx", "args": ["revit-bridge"]},
"revit-api-docs": {"command": "uvx", "args": ["revit-api-docs"]}}}Its first run downloads the data set v1.1-data (267 MB; uvx revit-api-docs download fetches it ahead of time): the Revit 2026 API reference, including constructors such as new XYZ(x, y, z) and interface members.
From revit-api-docs 0.3.0 on, TYPESAFE_API_KEY alone turns on Jev reranking; Cohere is optional.
For multi-step task requests (several steps in one sentence) also set an embedding key, REVIT_API_DOCS_EMBEDDING_API_KEY (OpenRouter, model openai/text-embedding-3-large), to fuse vector search with keyword search.
On 223 English test queries the fused nDCG@5 was 0.647 against 0.557 for keyword search alone, both without reranking, and 0.842 with Jev.
Each query makes one more embedding call (about 0.9 s, negligible cost); every setting is in its README.
Configure
Variable | Default | Meaning |
|
| Host where the add-in listens |
|
| TCP port of the add-in |
| (unset) | Pre-shared token, sent with every request when the add-in has one configured |
|
| Seconds to wait for a command to finish |
| (unset) |
|
|
| Seconds a confirmation token stays valid |
|
| Per-user data: solidified packs, |
|
| User pack directory; the packs shipped in the wheel stay visible, a user pack of the same name replaces one |
|
| Evidence ledger ( |
| (unset) | Company guidance layer: a directory laid out like |
| (unset) | Project guidance layer, above the company one; the personal layer is |
Development:
uv sync
uv run pytest
uv build
uvx --from . revit-bridge check
uv run revit-bridge guidance check plugin/guidance
uv run revit-bridge guidance index plugin/guidance --checkLicense: MIT. Issues and discussion: https://github.com/revitbridge/revit-bridge/issues.
Use from dsh (DeepSeek Harness)
dsh runs an agent that can talk to revit-bridge and revit-api-docs like any other MCP client, and it iterates on its own: writes, compiles, reads the model, fixes, until the task is done. The flow for a feature developed against the live Revit:
Install the add-in in Revit (Releases of
revit-bridge-addin), open the project you want to work on and click Add-Ins > Revit MCP Switch.uvx revit-bridge checkmust print"status": "connected"with that document's title.Register both servers in the dsh profile you use (
~/.dsh/profiles/<profile>/cordis.patch.yml, a top-level list):- insert: - id: mcp-revit-bridge name: '@deepseek-ai/dsh-mcp-client' config: { serverName: revit-bridge, transport: stdio, command: uvx, args: [revit-bridge] } - id: mcp-revit-api-docs name: '@deepseek-ai/dsh-mcp-client' config: { serverName: revit-api-docs, transport: stdio, command: uvx, args: [revit-api-docs] }Keys (
TYPESAFE_API_KEY,REVIT_API_DOCS_EMBEDDING_API_KEY) and a proxy go into each server'senv; dsh stripsKEY/TOKENvariables from its own environment, so set them there, not globally.Put the skills where dsh finds them: copy
plugin/skills/revit-task-brief,revit-addin-dev,revit-addin-test,revit-addin-release,revit-coreandrevit-bridgeinto<project>/.agents/skills/.Start dsh in the project directory and give it the task in one or two designer sentences, plus the facts it cannot discover: "Revit 2026 with the test model is open on this machine", whether anyone will answer questions, and what the report must contain. With
--profile headless --jsonit runs unattended and streams events; interactive mode lets you answer the bridge's confirmation requests, which is what lets the agent prototype in the open model (check_code,confirm_spec,execute_code) before it ports the logic into the add-in.Read the agent's report against the brief (what was built, what it verified in Revit, what it could not), then install the add-in and test the picks, dialogs and cancel paths yourself.
An unattended run cannot confirm execute_code; the agent then verifies by compile checks, model reads and dry_run_code (the code runs in the open model and is rolled back; it needs an add-in with the dry run). Keep the project open on a copy of the model: a prototype that hangs inside Revit blocks the bridge until the request ends.
Available Tools
5 toolsexecute_codeADestructive
Send C# code to Revit for execution over the local TCP socket. Refused unless spec_confirmed=true (the designer confirmed the task spec). Returns execution result or error message.
Inputs: code (required), parameters, spec_confirmed. Returns: result
get_tool_choicesARead-only
Query Revit for dynamic parameter choices of a solidified tool. Call this BEFORE run_tool to discover available levels, family types, etc. Returns {param_name: [{label, value}, ...]} for parameters that need selection.
Inputs: name (required). Returns: result
list_toolsARead-only
List all solidified tools available for execution.
Inputs: no named parameters. Returns: result
run_toolADestructive
Execute a solidified tool by name with given parameters. IMPORTANT: Call get_tool_choices first for parameters with choices_from / source: query:*. Refused unless spec_confirmed=true (the designer confirmed the task spec). params: JSON object of parameter values, e.g. {"level_name": "L1", "height": 3000}
Inputs: name (required), params, spec_confirmed. Returns: result
solidify_toolB
Save a successful code execution as a reusable named tool. parameters: JSON array of {name, type, description, source?, default?, choices_from?} tags: comma-separated tags
Inputs: code (required), name (required), tags, parameters, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools have clearly distinct roles: execute_code runs raw C#, run_tool runs saved tools, solidify_tool creates them, and list_tools/get_tool_choices support discovery. However, execute_code and run_tool both perform execution, which could cause an agent to misselect when only one is appropriate.
All tool names follow a consistent verb_noun snake_case pattern: execute_code, solidify_tool, list_tools, get_tool_choices, run_tool. The naming is predictable and makes the surface easy to navigate.
Five tools is well-scoped for a Revit bridge: execute raw code, solidify it, list solidified tools, query parameter choices, and run a solidified tool. Each tool earns its place with no unnecessary redundancy.
The set covers creating, listing, querying, and running solidified tools, but lacks update and delete operations for those tools. There is also no way to view a single tool's details, leaving the lifecycle partially incomplete.
Maintenance
Related MCP Connectors
AI for Revit: 450+ tools, 1 undo step. Windows, Revit 2024–2027 (2021–2023 included). Free account.
Unified AEC tools: ACC, Revit, Navisworks, Twinmotion, and APS from one endpoint.
Convert Revit files to XKT, IFC, or DWG and query BIM data via natural language.
AI Hub for AEC — 50+ 3D formats, clash detection, ACC integration via Autodesk Platform Services.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceAllows AI assistants to interact with Autodesk Revit through the MCP protocol, enabling the AI to create, modify, and delete elements in Revit projects.1559 npm1-
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Autodesk Civil 3D, allowing them to retrieve project data, create/modify/delete drawing elements, and execute code to automate Civil 3D operations.350MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Autodesk Revit to query project data, manage elements, and execute generated code via the Model Context Protocol. It provides full compatibility with GitHub Copilot and Claude to automate BIM modeling workflows.13MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to connect to Revit 2024 via MCP, inspect documents and selections, query and modify elements, and validate, preview, or commit plans with audit logging and rollback.MIT