Skip to main content Switch to mobile version revit-bridge 0.13.1 Intent bridge between designers and AI for Revit: MCP server + Claude Code plugin
pip install revit-bridge==0.13.1 Copy PIP instructions
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.
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-bridge The 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-bridge Any 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 (role, code and mentions give a text per role, one without code-writing, one with the designer's selections) and revit_bridge.mentions for levels, types, links and elements the designer picks. Request kind="element", source="selection" to page through the active selection. Type searches accept Chinese and English category names and return matching types across categories.
Streamable HTTP. Import build_asgi_app and scope_directory from revit_bridge.mcp_app. Pass an async get_client(request) that returns (authenticated_device_id, connected_revit_client) after the host verifies the pairing. The host owns the connection. For example, app = build_asgi_app(get_client, channel="remote-mcp") serves /mcp. The path is relative to the mount point. Enter app.router.lifespan_context(app) in the parent application's lifespan. For a public origin, pass the MCP SDK's TransportSecuritySettings with the host's allowed hosts and origins.
Read a device's execution history with Ledger(scope_directory(device_id) / "evidence"). Use the same optional data_dir in the factory and directory lookup. The device directory also holds its capabilities/, workflows/ and verifications/. Stage local source includes and add-in DLLs for that device in its files/ directory. The confirmation channel in the spec and the ledger's host field retain their separate meanings. The factory's channel sets the latter.
Workflows. revit_bridge.workflows.WorkflowStore(tool_store) saves v1 YAML beside the user tools. Call save(definition, overwrite=False), load(name), list_workflows() or delete(name). A load validates against the current catalog. Invalid definitions raise WorkflowError with a list of problems. For an editor, validate_workflow(definition, tool_store) returns that list directly. Before running any steps, validate the full definition. For each step, resolve_step_params(step, inputs, results_by_step_id) returns the parameters or raises ValueError naming the missing input or result path. The host submits each step through its usual confirmation and execution flow.
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.
Install the skills in another project
The eight skills (revit-task-brief, revit-addin-dev, revit-addin-test, revit-addin-release, revit-journal-analysis, revit-install, 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), and revit-journal-analysis needs only the journal files; 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, and add revit-journal-analysis by name where you read journals. revit-install is in neither profile as well: name it on a machine where the Autodesk products or the content libraries are to be installed.
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; plan.py, inspect_revit_content_adix.py, inspect_revit_content_msi.ps1 and read_content_identity.ps1 (which also needs 7-Zip) in revit-install. 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.
Start Revit, open a project and make sure the add-in is listening.
Check the connection:
uvx revit-bridge check Prints host, port, whether a token is set, the open document's title (document, or document_error when the add-in answered but could not read it) and "status": "connected", plus capability (supported when the add-in answers get_bridge_capabilities, unsupported for an older add-in, unknown with the reason otherwise) and environment (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 (40 built-ins such as create_wall, create_level, move_elements, 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# for execute_code in Revit without running it (no token): diagnostics with lines in your code, hints, and guidance (the lessons for those errors, or pointers once it compiles); checked: false when 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_run when the add-in has no dry run, and dry_run_not_rolled_back is a defect to report at once. include names local .cs files 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 reports features.dry_run_sources (else no_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
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, then run_tool(name, params, token) with exactly the confirmed values.
plan_verification(template, params) / verify_execution(evidence_id, verification_id) — for execute_code: a read-back check (created_ids, count_delta, param_equals) planned before confirming, run after; no token.
execute_code takes arbitrary C# for tasks no pack covers. The code runs inside Revit with document in scope and a transaction already open; end it with return
A pack's validator (created_ids, count_delta or param_equals) asserts the outcome after the run: success is 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 (/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, or local for the add-in on this machine - and a token confirmed for one device cannot be redeemed on another. Independently of any client setting, execute_code asks 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 as error: "declined_on_device" (the token is spent and the run is in the ledger). run_tool runs 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 (/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:
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 --check License: 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 Bridge so that it says On (on add-ins up to 0.5 the button is Revit MCP Switch). uvx revit-bridge check must print "status": "connected" with that document's title.
Register both servers in the dsh profile you use (~/.dsh/profiles/
- 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's env; dsh strips KEY/TOKEN variables 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-journal-analysis, revit-install, revit-core and revit-bridge into
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 --json it 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.
Released: Nov 27, 2026
Both files in this release have provenance metadata.
View provenance details
MIT View SPDX License List
bim claude-code mcp revit
Development Status 3 - Alpha
Intended Audience Developers
Operating System OS Independent
Programming Language Python :: 3
Topic Scientific/Engineering
Release files for revit-bridge 0.13.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 1.4 MB
Release files / revit_bridge-0.13.1.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Release files / revit_bridge-0.13.1-py3-none-any.whl
Security for revit-bridge 0.13.1
Both files in this release have been uploaded with provenance metadata.
With provenance revit_bridge-0.13.1.tar.gz Nov 27, 2026
With provenance revit_bridge-0.13.1-py3-none-any.whl Nov 27, 2026
Attestation for revit_bridge-0.13.1.tar.gz
Attestation for revit_bridge-0.13.1-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 27, 2026 2 release files Full provenance
Nov 26, 2026 2 release files Full provenance
Nov 25, 2026 2 release files Full provenance
Nov 24, 2026 2 release files Full provenance
Nov 20, 2026 2 release files Full provenance
Nov 19, 2026 2 release files Full provenance
Nov 17, 2026 2 release files Full provenance
Nov 10, 2026 2 release files Full provenance
Nov 9, 2026 2 release files Full provenance
Nov 8, 2026 2 release files Full provenance
Oct 27, 2026 2 release files Full provenance
Oct 26, 2026 2 release files Full provenance
Sep 22, 2026 2 release files Full provenance
Sep 21, 2026 2 release files Full provenance
Sep 18, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from fc0d8e6











