Get the FREE Ultimate OpenClaw Setup Guide →

mcp -for-revit-python

MCP server from mcp-servers-for-revit/mcp-server-for-revit-python

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mcp-servers-for-revit-mcp-server-for-revit-python python main.py \
  --env REPO_ROOT="<path-to-repo-if-needed>" \
  --env PYTHONUNBUFFERED="1"

How to use

This MCP server provides a Python-based bridge between Revit (via pyRevit Routes) and large language models (LLMs). The main MCP server (main.py) speaks the MCP protocol and forwards tool invocations to the Revit Routes API inside a running Revit instance. Tools implemented cover a wide range of Revit operations, including status checks, model information queries, view/image export, family placement, element creation, and various launch/document management actions. You can call these tools from an MCP client or an LLM-driven workflow to query Revit state, run operations, and retrieve structured JSON responses, enabling automated storytelling, planning, or assistant-style guidance around your Revit model.

To use the server, start the MCP server process as configured (see mcp_config). The server exposes an HTTP/REST bridge via the Revit Routes layer (inside Revit) and a standard MCP interface on the host. When you invoke a tool through your MCP client, the server translates the request into a Revit API call through pyRevit Routes, executes it in the Revit process, and returns the results to the client. The included tool set includes status checks like get_revit_status, model inquiries like get_revit_model_info and list_levels, view exports via get_revit_view, as well as family placement (place_family) and element creation utilities. This makes it straightforward to prototype LLM-powered workflows that reason about a Revit model and perform concrete tasks.

How to install

Prerequisites

  • Python 3.8+ installed on the machine hosting the MCP server
  • Revit installed with pyRevit and the Routes extension available to expose the MCP bridge inside Revit
  • Internet access for initial clone and dependency installation (optional in air-gapped environments)

Installation steps

  1. Clone the repository:
git clone https://github.com/mcp-servers-for-revit/mcp-server-for-revit-python
  1. Navigate to the project folder (the root should contain main.py and the extension content):
cd mcp-server-for-revit-python
  1. Set up a Python virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # on Windows use: venv\Scripts\activate
  1. Install dependencies (if a requirements.txt is provided in the repo; otherwise ensure you have FastMCP and pyRevit Routes compatibility installed in your environment):
pip install -r requirements.txt  # if file exists
  1. Start the MCP server (as configured in mcp_config):
python main.py
  1. Ensure pyRevit Routes is running inside Revit and listening on http://localhost:48884 (as described in the Getting Started section of the README). You can verify by hitting http://localhost:48884/revit_mcp/status/ from a browser or a simple HTTP client.

Note: This project uses a minimal MCP server approach and does not include built-in authentication. For production use, implement your own security measures and consider securing the routes API and MCP endpoints.

Additional notes

Tips and considerations:

  • The two-server architecture (MCP server on the host and pyRevit Routes inside Revit) means you need both processes running and able to communicate over HTTP. The MCP server translates calls into HTTP requests to the Revit Routes API.
  • The Routes API inside Revit is a draft API; expect changes and consider pinning a compatible version of pyRevit Routes in your environment.
  • Since authentication is not built-in, consider network-level restrictions and keep the Revit machine isolated when exposing endpoints during development.
  • The README mentions a number of implemented tools (e.g., get_revit_status, list_levels, place_family, open_document, launch_revit, etc.). Use the MCP Inspector or your own MCP client to test tool calls and inspect results. If a tool reports Pending (🔄), it means the implementation is in progress and may require updates or manual adjustments in your environment.
  • If you need to customize tooling, you can extend the tools/ modules and register new tools with the main MCP server via the existing modular tool system described in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers