Skip to main content

Revit Model MCP server

The Python package exposes Revit tools over MCP stdio; actions run by default. Set REVIT_MCP_READ_ONLY=1 or create the workstation read-only file to disable them without hiding the action tools. It requires Python 3.11 or later and the matching add-in loaded in Revit on Windows.

Install and run

After the first PyPI release, run the published package with uv:

uvx revit-model-mcp

Register the local Windows server with Claude Code:

claude mcp add revit-model-mcp -e REVIT_MCP_HOST=local -- uvx revit-model-mcp

For a client on macOS or Linux:

claude mcp add revit-model-mcp -e REVIT_MCP_HOST=ssh:revit-host -e REVIT_MCP_REDACT_PATHS=1 -- uvx revit-model-mcp

Replace revit-host with an alias from the client's SSH configuration. The Windows SSH session must use the same account as Revit or an explicitly shared channel directory.

Claude Desktop uses this entry in claude_desktop_config.json on Windows:

{
  "mcpServers": {
    "revit-model-mcp": {
      "command": "uvx",
      "args": ["revit-model-mcp"],
      "env": {
        "REVIT_MCP_HOST": "local",
        "REVIT_MCP_REDACT_PATHS": "1"
      }
    }
  }
}

uvx must be available on the client's PATH; an absolute executable path is also supported. A remote Desktop client uses REVIT_MCP_HOST=ssh:revit-host.

For development or before the first PyPI publication, run from the repository root:

uv run --directory server revit-model-mcp
claude mcp add revit-model-mcp -e REVIT_MCP_HOST=local -- uv run --directory /absolute/path/to/revit-model-mcp/server revit-model-mcp

mcp-name: io.github.sharafutdinovdi/revit-model-mcp

Configuration

Variable Default Behavior
REVIT_MCP_HOST local Local PowerShell, ssh:<alias> or an http:// / https:// add-in endpoint. --host overrides it.
REVIT_MCP_READ_ONLY Unset 1 refuses action calls, including revit_batch, revit_export_nwc, revit_edit_families, revit_align_link_datums and revit_undo_last, with read-only mode instead of running them; the tools stay listed. The workstation read-only file is checked independently.
REVIT_MCP_TOKEN Unset HTTP bearer token from workstation settings. --token overrides it.
REVIT_MCP_SSH_MUX Enabled 0 disables OpenSSH connection multiplexing. Local mode ignores SSH settings.
REVIT_MCP_SSH_OPTIONS Unset Extra SSH arguments, parsed with shell quoting and appended after built-in options, before the host. Example: -o ServerAliveInterval=30 -p 2222.
REVIT_MCP_ACTIVATE_TASK Unset Optional existing Windows scheduled task. Runs once after 60 seconds if the trigger remains pending. The task must activate the interactive Revit window. No task is created by the server.
REVIT_MCP_CHANNEL_DIR %LOCALAPPDATA%\RevitModelMcp on Windows Absolute Windows channel path. Set the same value in the Python server environment and in Revit's environment before starting Revit. In SSH mode this path belongs to the remote host.
REVIT_MCP_REDACT_PATHS Unset 1 removes directories from response documentPath, path and centralPath fields and Windows paths in message fields. --redact-paths enables the same behavior.

revit_family_audit is a read tool. It inspects an open family when families is omitted, or exact family names / ["*"] in a project. revit_edit_families applies ordered shared-parameter, removal, purge and shared-flag operations. Project edits use one family load per family and one undo entry; dry_run=true rolls back. The edit tool is refused in read-only mode. Family audit defaults to a 600-second response budget; family edits default to 1800 seconds.

SSH mode passes ControlMaster=auto, ControlPath=<dir>/mux-%C and ControlPersist=600 on every invocation. The socket directory is $XDG_RUNTIME_DIR when nonempty, otherwise /tmp/revit-model-mcp-<uid>/. The directory is created or restricted to mode 0700 on macOS and Linux. Keep its absolute path short for Unix socket limits; %C hashes the connection identity. The master connection remains available for 600 seconds after its last client disconnects. Extra options follow OpenSSH's first-value-wins behavior. To supply a custom multiplexing path or lifetime, set REVIT_MCP_SSH_MUX=0 and provide all three Control* options through REVIT_MCP_SSH_OPTIONS. Clients whose OpenSSH lacks multiplexing support, such as native Windows OpenSSH, use REVIT_MCP_SSH_MUX=0.

uv run --directory server revit-model-mcp --help prints the environment host mode, Windows channel directory and path redaction flag without contacting Revit.

The server reads activation configuration at process startup. A configured task may restore and focus the Revit window. Without a task the server only polls for pickup.

Responses and privacy

Model paths occur in responder metadata and instance listings. Redaction covers documentPath, path and centralPath fields in MCP results, including RVT/CAD/image link paths from revit_links_status. It also reduces Windows drive and UNC paths in confirmationText, summary, error, message, warning and warnings strings at any depth to file names, including tool errors. It preserves exported image localPath values for clients that open the downloaded file. Names, parameter values and remaining message text stay visible. Redaction applies to outgoing Python responses, not files stored in the channel or add-in logs. Revit model data and errors can retain their original language. Python tool descriptions and server-generated messages are English.

Request behavior

For HTTP setup and remote access commands, see transport. HTTP submits once and polls by job ID within timeout_seconds; pickup timeout applies only to file transports. HTTP exports download PNG directly without remote PowerShell. Each HTTP endpoint represents one Revit process.

The default file pickup timeout is 300 seconds. The response timeout is 120 seconds after pickup. Most tools accept pickup_timeout_seconds and timeout_seconds. revit_export_view uses the defaults. Supply document when multiple Revit instances run on the host. Use a distinctive document title or file name. Matching is case-insensitive and accepts substrings. A pending job remains in the channel after pickup timeout and may execute later. Use one MCP server process per channel directory.

See transport for file handling and SSH behavior.

Tests

From the repository root:

cd server
uv run --with pytest pytest -q

The tests use mocked host operations and exercise MCP stdio without Revit.

See the tool arguments, action arguments and response contract.

License

MIT, copyright (c) 2026 Dinar Sharafutdinov.

Metadata

Release files for revit-model-mcp 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for revit-model-mcp 0.9.1
File Size Uploaded
revit_model_mcp-0.9.1.tar.gz 153.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for revit-model-mcp 0.9.1
File Interpreter ABI Platform
revit_model_mcp-0.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 246.8 kB

Release files / revit_model_mcp-0.9.1.tar.gz

Download URL revit_model_mcp-0.9.1.tar.gz
Size 153.1 kB
Tags Source
SHA-256 checksum
How to use checksums
48c5933ec12601fea35d11ff47e2782f5d867457cf7d90159dc90c33779beff6
BLAKE2b-256 checksum
How to use checksums
4318fba33b89ad80e7d5b77dd21a165f89912a15a11d6430dec298e210dc5ae3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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 Oct 6, 2026.

Transparency log

Release files / revit_model_mcp-0.9.1-py3-none-any.whl

Download URL revit_model_mcp-0.9.1-py3-none-any.whl
Size 93.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30e6e421a60d593ef34a71b8735c0ac7869b438d712b6685918b04a1f187a650
BLAKE2b-256 checksum
How to use checksums
1a305657ef86ea40a48533ec31c8914f30726549cdc076a855886d12f254d022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

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 Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.10.0

2 release files

This release

0.9.1 This release

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page