Open-source Revit MCP server: let Claude and other AI assistants read and edit BIM models, with human approval on every change.
Python aecai-agentsautodeskautomationbimclaudeifcmcpmcp-servermodel-context-protocolnavisworksrevitrevit-addinrevit-apirhino
Prepare MCP registry distribution
sammohammad578c20c2632f925
diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.ymlindex b6002dd..df35270 100644--- a/.github/workflows/publish-mcp.yml+++ b/.github/workflows/publish-mcp.yml@@ -17,25 +17,6 @@ jobs:- name: Checkout codeuses: actions/checkout@v5- - name: Set up Python- uses: actions/setup-python@v6- with:- python-version: "3.11"-- - name: Install build tooling- run: |- python -m pip install --upgrade pip- python -m pip install build-- - name: Build Python package- working-directory: packages/mcp-server-revit- run: python -m build-- - name: Publish package to PyPI- uses: pypa/gh-action-pypi-publish@release/v1- with:- packages-dir: packages/mcp-server-revit/dist-- name: Install mcp-publisherrun: |curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisherdiff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.ymlnew file mode 100644index 0000000..57d90a6--- /dev/null+++ b/.github/workflows/publish-pypi.yml@@ -0,0 +1,34 @@+name: Publish Python Package++on:+ workflow_dispatch:++jobs:+ publish:+ runs-on: ubuntu-latest+ permissions:+ id-token: write+ contents: read++ steps:+ - name: Checkout code+ uses: actions/checkout@v5++ - name: Set up Python+ uses: actions/setup-python@v6+ with:+ python-version: "3.11"++ - name: Install build tooling+ run: |+ python -m pip install --upgrade pip+ python -m pip install build++ - name: Build Python package+ working-directory: packages/mcp-server-revit+ run: python -m build++ - name: Publish package to PyPI+ uses: pypa/gh-action-pypi-publish@release/v1+ with:+ packages-dir: packages/mcp-server-revit/distdiff --git a/.gitignore b/.gitignoreindex ebc928a..8ac4380 100644--- a/.gitignore+++ b/.gitignore@@ -92,7 +92,8 @@ dmypy.json.pyre/# VS Code-.vscode/+.vscode/*+!.vscode/mcp.json*.code-workspace# PyCharm@@ -154,6 +155,9 @@ distnpm-debug.log*yarn-debug.log*yarn-error.log*+.playwright-cli/+mcp-publisher+mcp-publisher.exe# Misc.DS_Storediff --git a/.vscode/mcp.json b/.vscode/mcp.jsonnew file mode 100644index 0000000..009f72b--- /dev/null+++ b/.vscode/mcp.json@@ -0,0 +1,15 @@+{+ "servers": {+ "revit": {+ "type": "stdio",+ "command": "python",+ "args": ["-m", "revit_mcp_server.mcp_server"],+ "env": {+ "MCP_REVIT_MODE": "bridge",+ "MCP_REVIT_BRIDGE_URL": "http://127.0.0.1:3000",+ "MCP_REVIT_WORKSPACE_DIR": "${workspaceFolder}",+ "MCP_REVIT_ALLOWED_DIRECTORIES": "${workspaceFolder}"+ }+ }+ }+}diff --git a/README.md b/README.mdindex 6450de1..4b27c33 100644--- a/README.md+++ b/README.md@@ -2,7 +2,7 @@<img src="https://cdn.simpleicons.org/autodeskrevit/0696D7" alt="Revit" height="80"/>-# Revit MCP Server+# Autodesk Revit MCP Server**Model Context Protocol server for Autodesk Revit**@@ -77,6 +77,12 @@ Edit `%APPDATA%\Claude\claude_desktop_config.json`:}```+### Configure VS Code / GitHub Copilot++This repository includes a workspace MCP config at `.vscode/mcp.json`. After installing the Python package and starting Revit with the bridge add-in loaded, open this repository in VS Code and run `MCP: List Servers` or use the MCP Servers view.++For marketplace and registry publication details, see [MCP Marketplaces and Client Distribution](docs/marketplaces.md).+### Verify InstallationStart Revit, then:@@ -329,6 +335,7 @@ Autodesk-Revit-MCP-Server/- [API Reference](docs/tools.md)- [Architecture](docs/architecture.md)- [Security Model](docs/security.md)+- [MCP Marketplaces and Client Distribution](docs/marketplaces.md)- [Claude Desktop Setup](CLAUDE_DESKTOP_SETUP.md)- [Contributing](CONTRIBUTING.md)diff --git a/RevitBridge.addin b/RevitBridge.addindeleted file mode 100644index bc6b0fd..0000000--- a/RevitBridge.addin+++ /dev/null@@ -1,11 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<RevitAddIns>- <AddIn Type="Application">- <Name>RevitMCP Bridge</Name>- <Assembly>C:\ProgramData\RevitMCP\bin\RevitBridge.dll</Assembly>- <AddInId>6721F048-9A81-4DE6-8543-B485A6329B92</AddInId>- <FullClassName>RevitBridge.Bridge.App</FullClassName>- <VendorId>RevitMCP</VendorId>- <VendorDescription>MCP server bridge for Autodesk Revit</VendorDescription>- </AddIn>-</RevitAddIns>diff --git a/docs/marketplaces.md b/docs/marketplaces.mdnew file mode 100644index 0000000..4518b44--- /dev/null+++ b/docs/marketplaces.md@@ -0,0 +1,114 @@+# MCP Marketplaces and Client Distribution++This project is prepared for the major MCP discovery paths that can be handled from a public GitHub repository.++Some marketplaces can index the repository automatically once the official MCP Registry entry exists. Others still require a maintainer-owned account, OAuth approval, or a manual web form. Those final publication clicks cannot be completed from the repository alone.++## Primary Listing++### Official MCP Registry++Status: configured.++Files and automation:++- [server.json](../server.json) is valid for the official registry and points to the v0.1.1 MCPB release artifact.+- [.github/workflows/publish-mcp.yml](../.github/workflows/publish-mcp.yml) publishes with GitHub OIDC on version tags or manual workflow dispatch.+- [.github/workflows/publish-pypi.yml](../.github/workflows/publish-pypi.yml) publishes the optional Python package to PyPI when triggered manually after PyPI trusted publishing is configured.+- [packages/mcp-server-revit/README.md](../packages/mcp-server-revit/README.md) contains the required `mcp-name` ownership marker for PyPI verification if the package is also published to PyPI.++Manual publish from a maintainer machine after installing the official publisher:++```powershell+mcp-publisher login github+mcp-publisher publish+```++Automated publish from GitHub:++```powershell+git tag v0.1.1+git push origin v0.1.1+```++The official registry is the feed most downstream MCP galleries and aggregators are expected to scrape.++### GitHub MCP Registry and VS Code MCP Gallery++Status: covered by the official MCP Registry path.++GitHub and VS Code surface MCP servers from registry metadata. After the official registry publish succeeds, this server should be discoverable through the MCP surfaces that consume that registry. No separate VS Code extension is required for a standard stdio MCP server.++The repository also includes [.vscode/mcp.json](../.vscode/mcp.json) so users can install the server into a VS Code workspace directly.++## Client Configurations++### VS Code / GitHub Copilot++The workspace config is already committed at `.vscode/mcp.json`.++For user-level install:++```powershell+code --add-mcp "{`"name`":`"revit`",`"type`":`"stdio`",`"command`":`"python`",`"args`":[`"-m`",`"revit_mcp_server.mcp_server`"],`"env`":{`"MCP_REVIT_MODE`":`"bridge`",`"MCP_REVIT_BRIDGE_URL`":`"http://127.0.0.1:3000`",`"MCP_REVIT_WORKSPACE_DIR`":`"C:\\RevitProjects`",`"MCP_REVIT_ALLOWED_DIRECTORIES`":`"C:\\RevitProjects`"}}"+```++### Claude Desktop, Cursor, Windsurf, Cline, Roo Code, Continue, and Similar Clients++Most desktop MCP clients accept this shape:++```json+{+ "mcpServers": {+ "revit": {+ "command": "python",+ "args": ["-m", "revit_mcp_server.mcp_server"],+ "env": {+ "MCP_REVIT_MODE": "bridge",+ "MCP_REVIT_BRIDGE_URL": "http://127.0.0.1:3000",+ "MCP_REVIT_WORKSPACE_DIR": "C:\\RevitProjects",+ "MCP_REVIT_ALLOWED_DIRECTORIES": "C:\\RevitProjects"+ }+ }+ }+}+```++If the Python package was installed from PyPI, the console script can be used instead:++```json+{+ "mcpServers": {+ "revit": {+ "command": "revit-mcp-server",+ "env": {+ "MCP_REVIT_MODE": "bridge",+ "MCP_REVIT_BRIDGE_URL": "http://127.0.0.1:3000",+ "MCP_REVIT_WORKSPACE_DIR": "C:\\RevitProjects",+ "MCP_REVIT_ALLOWED_DIRECTORIES": "C:\\RevitProjects"+ }+ }+ }+}+```++## Third-Party Directories++These directories usually need either an official registry entry, repository URL submission, or maintainer account verification.++| Directory | Current best path |+| --- | --- |+| PulseMCP | Already mirrors this repo. After official registry publish, claim or ask them to replace the temporary mirror with the official registry entry. |+| MCP.Directory | Submit the GitHub repository URL and optional PyPI package URL through their server submission form. |+| Glama | Let Glama index the official registry entry, then claim/verify the maintainer page if needed. |+| Smithery | This Revit server is local stdio and Windows/Revit-dependent, so use MCPB/local distribution or a manual listing rather than hosted HTTP unless a remote bridge is added. |+| MCP.so / MCP Market / MCP Store / Conare / Aibase | Submit the GitHub repository URL and use the client config above. These sites generally crawl README, GitHub metadata, and registry data. |++## Release Checklist++1. Build and attach the `.mcpb` artifact to the GitHub release.+2. Update `server.json` version, artifact URL, and SHA-256 if the artifact changes.+3. Run `mcp-publisher validate`.+4. Publish to the official MCP Registry.+5. Verify discovery through the registry API.+6. Submit or claim listings on third-party directories.diff --git a/packages/mcp-server-revit/README.md b/packages/mcp-server-revit/README.mdindex 3ddcb3a..9ffb6dc 100644--- a/packages/mcp-server-revit/README.md+++ b/packages/mcp-server-revit/README.md@@ -1,9 +1,10 @@-# Revit MCP Server (Python Package)+# Autodesk Revit MCP Server (Python Package)Python package for the Autodesk Revit MCP server used by AI clients over stdio.- Repository: https://github.com/Sam-AEC/Autodesk-Revit-MCP-Server- MCP entrypoint: `python -m revit_mcp_server.mcp_server`+- Console script: `revit-mcp-server`- Requires Python 3.11+Environment variables (prefix `MCP_REVIT_`) include:diff --git a/packages/mcp-server-revit/pyproject.toml b/packages/mcp-server-revit/pyproject.tomlindex 1098e13..04ccefe 100644--- a/packages/mcp-server-revit/pyproject.toml+++ b/packages/mcp-server-revit/pyproject.toml@@ -17,6 +17,9 @@ dependencies = ["mcp>=0.9.0",]+[project.scripts]+revit-mcp-server = "revit_mcp_server.mcp_server:run_mcp_server"+[project.optional-dependencies]dev = ["pytest>=8.0",diff --git a/packages/mcp-server-revit/src/revit_mcp_server/__main__.py b/packages/mcp-server-revit/src/revit_mcp_server/__main__.pyindex bd091c4..9854380 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/__main__.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/__main__.py@@ -1,4 +1,4 @@-from .server import run_server+from .mcp_server import run_mcp_serverif __name__ == "__main__":- run_server()+ run_mcp_server()diff --git a/packages/mcp-server-revit/src/revit_mcp_server/server.py b/packages/mcp-server-revit/src/revit_mcp_server/server.pyindex b72786b..77c08f7 100644--- a/packages/mcp-server-revit/src/revit_mcp_server/server.py+++ b/packages/mcp-server-revit/src/revit_mcp_server/server.py@@ -22,7 +22,15 @@ class MCPServer:self,config_obj: Config | None = None,bridge_factory: Callable[[str], BridgeTransport] | None = None,+ **kwargs,) -> None:+ if "config" in kwargs:+ if config_obj is not None:+ raise TypeError("Pass either config_obj or config, not both")+ config_obj = kwargs.pop("config")+ if kwargs:+ unexpected = ", ".join(kwargs)+ raise TypeError(f"Unexpected keyword argument(s): {unexpected}")self.config = config_obj if config_obj is not None else configself.workspace = WorkspaceMonitor(self.config.allowed_directories)self.audit = AuditRecorder(self.config.audit_log)diff --git a/packages/mcp-server-revit/tests/test_server.py b/packages/mcp-server-revit/tests/test_server.pyindex 1da944d..7964e34 100644--- a/packages/mcp-server-revit/tests/test_server.py+++ b/packages/mcp-server-revit/tests/test_server.py@@ -17,6 +17,7 @@ def create_config(tmp_path: Path, **overrides) -> Config:return Config(workspace_dir=tmp_path,allowed_directories=[tmp_path],+ audit_log=tmp_path / "audit.log",bridge_url=overrides.get("bridge_url"),mode=overrides.get("mode", BridgeMode.mock),)