RevitMCP MCP server

Enables AI to interact directly with Revit models, allowing natural language querying, element creation, and complex model manipulation for architects and engineers.
Back to servers
Setup instructions
Provider
Jacob Branch
Release date
Mar 27, 2025
Language
Python
Stats
15 stars

RevitMCP is a pyRevit extension that enables external applications, such as AI assistants, to interact with running instances of Autodesk Revit through an HTTP API. It acts as a bridge between external tools and Revit, allowing automation of various tasks including element selection, parameter management, and sheet placement through natural language commands.

Prerequisites

  • A compatible version of Autodesk Revit
  • pyRevit installed for your Revit version (available from pyrevitlabs.io)

Installation

Install pyRevit

Follow the official installation guide on the pyRevit website.

Install RevitMCP Extension

  1. Locate your pyRevit extensions folder:

    • Open pyRevit Settings in Revit (pyRevit Tab → Settings)
    • Go to the "Extensions" section to find registered extension paths
    • Common default locations:
      • %APPDATA%/pyRevit/Extensions
      • %PROGRAMDATA%/pyRevit/Extensions
  2. Copy the entire RevitMCP.extension folder into one of your pyRevit extensions directories

  3. Reload pyRevit or restart Revit to ensure the extension is recognized

Configuration

Enable pyRevit Routes Server

  1. Open Revit
  2. Go to the pyRevit Tab → Settings
  3. Find the section for "Routes" or "Web Server" or "API"
  4. Enable the Routes server
  5. Note the default port number (typically 48884 for the first Revit instance)
  6. Restart Revit after enabling the Routes server

Configure Firewall/Network Access

  • Allow Windows Firewall permission when prompted for Revit to open a network port
  • Ensure no firewall or security software is blocking connections to the port used by the pyRevit Routes server

Using the System

The system consists of two main components:

1. Revit-Side API (Managed by RevitMCP.extension)

This component runs automatically when Revit starts with pyRevit loaded. It defines API endpoints that external applications can call to interact with Revit.

2. External Intermediary Server

This is the server that your applications will communicate with to access Revit:

  1. Launch the server by clicking the "Launch RevitMCP" button in the RevitMCP panel in Revit
  2. The server will start and typically provide a web interface at http://localhost:8000
  3. Through this interface, you can:
    • Select an AI model from the dropdown menu (Anthropic, OpenAI, Google Generative AI)
    • Enter your API keys for the selected AI service in the settings area

Workflow

AI Assistant/Client App → External Server (port 8000) → pyRevit Routes API (in Revit on port 48884)

Features and Usage

Element Selection and Filtering

You can use natural language commands to find and select elements by category, properties, or custom filters.

Project Information Access

Retrieve project metadata and document properties through API calls.

Element Parameter Management

Read and update element parameters with type validation.

Sheet and View Management

The sheet placement tool allows you to place views onto sheets using simple commands:

  • "Place detail foundation onto a sheet"
  • "Put section A-A on a new sheet"

The tool automatically:

  • Finds views by name using fuzzy matching
  • Creates new sheets with appropriate numbering (D001, S001, etc.)
  • Places views in the center of sheets
  • Handles titleblock selection and viewport creation

Troubleshooting

Route Not Found Errors

If you encounter RouteHandlerNotDefinedException:

  • Ensure RevitMCP.extension/startup.py exists and contains route definitions
  • Reload pyRevit or restart Revit after any changes
  • Check pyRevit logs for messages from startup.py
  • Verify the pyRevit Routes server is enabled

Connection Issues

If you can't connect to the pyRevit Routes API:

  • Verify the pyRevit Routes server is enabled
  • Confirm the correct port number is being used
  • Check firewall settings

Check Logs

  • pyRevit Logs: pyRevit Tab → Settings → Logging
  • External Server Logs: Check the console output of your server

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "revitmcp" '{"command":"python","args":["server.py"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "revitmcp": {
            "command": "python",
            "args": [
                "server.py"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "revitmcp": {
            "command": "python",
            "args": [
                "server.py"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later