pyRevit and the MCP Server for Revit - Python

About pyRevit

pyRevit is a free, open-source add-in for Autodesk Revit. It adds a ribbon tab full of productivity tools and gives you a framework for writing your own Revit automation in Python.

It does two main things:

  1. Ready-made tools. Out of the box you get dozens of utilities that Revit doesn’t have natively. These include batch-renaming views and sheets, matching properties between elements, selecting similar items with more control, wiping unused views and families, quick model-health checks, and printing or exporting sheet sets.
  2. A scripting platform. You can write a Python script, put it in a specially named folder, and pyRevit turns it into a button on the ribbon. This is its real strength. It’s a much faster way to build custom tools than compiling a C# add-in, and unlike Dynamo, the scripts behave like normal Revit commands. It supports IronPython and CPython, and it comes with helper libraries for forms, element selection and output windows.

Ehsan Iran-Nejad created it, and it’s now maintained by the pyRevitLabs team and community. BIM managers often use it to roll out a shared set of company tools: you publish an “extension” (a folder of scripts, often kept in a Git repo), and everyone in the office gets the same buttons.

If you already work with Dynamo, pyRevit is a natural next step for turning a Dynamo or Python routine into a one-click tool that runs without opening Dynamo.

Installing pyRevit

You can download the latest release from github here:

‣

Download the installer

‣

Run the installer

‣

Start Revit and allow the add-in

‣

Confirm it worked

‣

Optional settings

‣

If the pyRevit tab doesn't appear

‣

Updating later

The MCP Server for Revit - Python

pyRevitLabs doesn't ship an official "pyRevit MCP." What people usually mean is the community project MCP Server for Revit – Python. It's a pyRevit extension that connects Revit to Claude or any other MCP client. It uses pyRevit's Routes module as a bridge between Revit and LLMs, and it's meant as a simple template you can build on to give an AI access to your Revit models.

How it works: main.py is the MCP server that talks to Claude. When a tool is called, it turns the call into an HTTP request and forwards it to Revit. The pyRevit Routes piece is a small REST API that runs inside Revit, executes Revit API code, and returns JSON.

Tools currently working:

  • Status and model info: checking that the connection is live, pulling general information about the model, and listing levels with their elevations
  • Views: exporting a view as an image, listing all exportable views, and reading info about the active view and the elements visible in it
  • Families: placing a family instance at a given location, and listing family types and categories
  • Visualization: color-coding elements by parameter value, clearing those overrides, and listing a category's parameters with sample values
  • Code execution: running IronPython directly inside Revit. Through this, the AI can do almost anything the API allows.
  • Documents: finding installed Revit versions, launching Revit, opening, closing and saving documents, and syncing with central

Still pending: getting the current selection, creating line- and surface-based elements such as walls and floors, deleting and modifying elements, and tagging walls.

Safety features: You pair it inside Revit through MCP > Bridge > Connect, and any request that changes the model or runs Python shows you its payload in Revit before it goes ahead. The bridge only accepts local connections, so remote or LAN access is rejected.

Status: The project is being prepared for Autodesk Marketplace review but isn't certified yet. The authors describe it as more of a demonstration than a finished product. There's also a larger fork supporting Revit 2024 through 2027 with 48 tools that cover design, editing, analysis, clash detection, MEP, interop and documentation.

Your setup also has access to Autodesk's own Revit MCP technical preview. That's a separate tool that doesn't depend on pyRevit, so it's worth comparing the two if you're deciding which to use.

Sources:

pyRevit is a free, open-source add-in for Autodesk Revit. It adds a ribbon tab full of productivity tools and gives you a framework for writing your own Revit automation in Python.

It does two main things:

  1. Ready-made tools. Out of the box you get dozens of utilities that Revit doesn’t have natively. These include batch-renaming views and sheets, matching properties between elements, selecting similar items with more control, wiping unused views and families, quick model-health checks, and printing or exporting sheet sets.
  2. A scripting platform. You can write a Python script, put it in a specially named folder, and pyRevit turns it into a button on the ribbon. This is its real strength. It’s a much faster way to build custom tools than compiling a C# add-in, and unlike Dynamo, the scripts behave like normal Revit commands. It supports IronPython and CPython, and it comes with helper libraries for forms, element selection and output windows.

Ehsan Iran-Nejad created it, and it’s now maintained by the pyRevitLabs team and community. BIM managers often use it to roll out a shared set of company tools: you publish an “extension” (a folder of scripts, often kept in a Git repo), and everyone in the office gets the same buttons.

If you already work with Dynamo, pyRevit is a natural next step for turning a Dynamo or Python routine into a one-click tool that runs without opening Dynamo.

Installing the MCP Server for Revit - Python

Comparing the Autodesk MCP Server Tech Preview to the MCP Server for Revit - Python

These two servers take opposite approaches.

  • Autodesk's is official and locked down by design.
  • The community Python server is more open, can edit the model, and lets you add your own tools.

Comparison

Autodesk Tech Preview
MCP Server for Revit – Python
Who makes it
Autodesk (official)
Community, open source (MIT)
Revit versions
2027.2 only
Whatever pyRevit supports; a fork covers 2024–2027
Depends on
Nothing extra; installs from your Autodesk account
pyRevit with the Routes server enabled, plus Python/uv
Searching the model
Strong: multi-criteria filtering with parameter comparisons and summaries
Basic: model info, levels, elements in the current view, family lists
Element data
Detailed and configurable
Category parameters with sample values
Selecting and zooming in live Revit
Yes
Selection is still pending
Exporting
Images, PDF, schedules to CSV
View images only
Editing the model
Only in the Write and Experimental configurations
Places families, applies color overrides, and runs arbitrary IronPython
Document control
Not in the launch toolset
Launches Revit, opens, saves and closes files, syncs with central
Custom tools
Meant to sit alongside other servers, not to be extended
Built to be forked: two files plus two registration lines per tool
Safety model
Separate read and write servers
Pairing in Revit, a payload review before edits or code runs, and localhost-only access

Which to use

  • For questions, audits and QC ("how many fire-rated doors on Level 3 have no mark?"), use Autodesk's server. Its query tool is far more capable, it doesn't need pyRevit, and it's the supported option.
  • For editing, document handling or firm-specific tools, the Python server is more flexible. The tradeoff is that much of that power comes from execute_revit_code, which means the AI writes and runs code against your model. Keep the review prompt on and test on a copy first.
  • You can run both. Autodesk's launch post says the official server is meant to run alongside community and firm-built MCP servers. A common setup is Autodesk's server for reading and the Python server, or your own fork of it, for the writing it doesn't cover yet.