How to Connect Claude to Revit with pyRevit MCP (5 Steps)

I typed one sentence into Claude Code, and Revit built a small office: levels, grids, walls, a gable roof, rooms, tags and three drawing sheets. I did not click once in Revit. This guide shows how to connect Claude to Revit with the MCP server that now ships inside pyRevit. The setup is five steps and three commands, and it took me about ten minutes.

Everything below is also in my video, if you prefer to watch:

The short version

If you already have Revit, pyRevit 7.1 and Claude Code, the whole connection is this:

pyrevit configs agent enable
pyrevit mcp install claude
pyrevit agent status

Restart Revit after the first command. When the third command says responding, Claude can read and change your open model. The rest of this article explains each step, the two tests I ran, and the three errors you are most likely to hit.

What you need

  • Revit. I used Revit 2025. The pyRevit 7.1 release was tested on Revit 2023 to 2027.
  • pyRevit 7.1, which is free and open source. The agent arrived in version 7.0, and 7.1 made it safer to use.
  • Claude Code, Anthropic's coding agent that runs in a terminal.
  • Windows PowerShell, for the commands.

You do not need an extra Revit plugin, and there is no code to copy.

How Claude talks to Revit through MCP

MCP, the Model Context Protocol, is the open standard that AI assistants use to call outside tools. The Revit MCP setup in this guide has three parts: Claude Code, where you type; a small MCP server that pyRevit installs; and an agent that runs inside Revit.

Diagram of the Claude to Revit connection: Claude Code, the pyRevit MCP server and the agent inside Revit

Claude does not click buttons in Revit. It writes short Python programs, and the agent runs them in your open model through the Revit API. Reading the model happens straight away. A change waits for your approval inside Revit, unless you turn that off.

This is different from MCP servers that expose one tool per Revit command. Here the Revit API is the toolset, so Claude is not limited to a fixed list of actions. The pyRevit agent runtime documentation lists every tool and setting.

Before you start: model data leaves your computer

Whatever Claude reads from your model (element names, parameter values, results) is sent to Claude's servers. pyRevit also keeps a plain-text record of each run on your own machine, under %APPDATA%\pyRevit\agent, for at least 14 days.

So use a test model first, and check your company's confidentiality rules before you point this at a real project. The pyRevit team still marks the agent as experimental, and it is off by default.

Connect Claude to Revit in 5 steps

Step 1: Install pyRevit 7.1

Go to the pyRevit releases page on GitHub and scroll down to Downloads. Take the normal installer, not the admin one. It installs for your Windows user only.

pyRevit 7.1 downloads on GitHub with the normal per-user installer marked

Close Revit, then run the installer. It takes less than a minute.

Step 2: Turn on the agent

The agent is off by default. Open PowerShell and type:

pyrevit configs agent enable

Step 3: Register the pyRevit MCP server with Claude Code

One more command connects it to Claude Code:

pyrevit mcp install claude

This adds an MCP server named pyrevit to your Claude Code user settings. If Claude Code was open, restart it.

PowerShell after pyrevit configs agent enable and pyrevit mcp install claude

The same command registers other clients. pyRevit accepts codex, cursor, vscode and opencode in place of claude.

Step 4: Open Revit and a model

Start Revit and open a model. I started a new project from the default template, so the model was empty. If Revit asks about a signed add-in when it starts, see problem 3 further down.

Step 5: Check the connection

Back in PowerShell:

pyrevit agent status

pyrevit agent status showing a Revit 2025 session that is responding

Your Revit session should be listed as responding. Mine showed Revit 2025, the policy ask and the default engine ironpython. That is the whole setup.

Test 1: ask a question that only reads the model

Start small. In Claude Code I asked:

Which model is open in Revit, its levels and the active view? Do not change anything.

Claude asks before it uses a Revit tool for the first time. Say yes. It answered with the model name, the levels and the active view, and nothing in the model changed.

Claude Code asking permission to use the pyRevit Get Context tool before reading the Revit model

Test 2: build a small office in Revit from one prompt

Now the real test. My prompt was one line: build a small office, 10 × 7 m, one storey, with a gable roof.

Claude split the job into six steps. For each step it wrote a short Python script and sent it to Revit through the pyRevit agent.

  1. Levels and grids: a ground floor, a roof level at 3 m and five grid lines.
  2. Walls and the floor slab: brick and block cavity walls outside, a block wall inside, and the two end walls already cut to the roof shape.
  3. Three doors and six windows, each placed in its wall.
  4. The roof: 25 degrees on both long sides, with a 500 mm overhang.
  5. Rooms, room names, grid dimensions, and tags for every door and window.
  6. The drawings: a section through the office and three sheets.

Claude running step 5 of 6 in Revit: rooms, tags and grid dimensions on the ground floor plan

After each step the agent reports what changed in Revit. In my run that was 5 elements for the levels and grids, 73 for the walls and floor, 9 for the doors and windows, 17 for the roof, 16 for the rooms and annotation, and 61 for the section and sheets. If a step fails, the agent rolls it back, so you never end up with half a wall.

All six build steps finished, with the section and three drawing sheets created in Revit

The whole build took about a minute and a half, typing included.

The result

This is the model in Revit 2025 at the end of the run:

The finished small office in the Revit 2025 3D view, built by Claude through pyRevit

Sheet A101 holds the ground floor plan with rooms, grids and dimensions. Sheet A201 has all four elevations, and A301 has the section and the 3D view. The two pictures below are the sheet graphics from the video.

Sheet A101 with the ground floor plan, room names, grids and dimensions

Sheet A201 with the south, north, east and west elevations

Approvals: Keep or Discard

By default every change stops at a prompt in Revit, with the changed elements selected. You click Keep or Discard. Keep commits the run as one undo entry, so a single Ctrl+Z takes it back.

The Keep and Discard approval buttons and the pyrevit configs agent policy commands

For the recording I switched the policy to automatic, so the six steps ran without stopping:

pyrevit configs agent policy auto

Switch it back when you are done:

pyrevit configs agent policy ask

There is also a readonly policy that allows questions and dry runs only. On a real project, keep the prompt on.

3 problems and the fix for each

Three common pyRevit MCP problems and their fixes

1. Status shows no Revit

The agent is off, or Revit was already open when you turned it on. Run pyrevit configs agent enable, then restart Revit.

2. The pyrevit command does not know the word "agent"

An older pyRevit comes first on your computer. Type where pyrevit to see which one runs, and update the old one.

3. Revit asks about a signed add-in when it starts

That is the new pyRevit. Check that the publisher is the pyRevit developer, then click Always Load.

What Claude does not do

Claude models what you describe. It does not design it. The office above is a demo model and I did not check it as a structure, because that was not the point of the test.

The sizes, the structure and the code checks are still the engineer's job. In my own work on CFS, steel and timber buildings, the analysis and the structural design come first. A tool like this can only save time on the modelling and the sheets that follow.

Other ways to connect Claude to Revit

pyRevit is not the only route. Autodesk has its own Revit Public MCP Server, which was in Technical Preview for Revit 2027 when I wrote this. There are also community MCP servers that sit on top of pyRevit's Routes server and need an extra extension.

I chose the built-in pyRevit agent because it works with the Revit 2025 I already had and it installs with two commands. Every change can also wait for Keep or Discard.

Questions people ask

Is this free?

pyRevit is free and open source. Claude Code needs a paid Claude plan or API credit.

Which Revit versions does it work with?

I tested Revit 2025 with pyRevit 7.1. According to the release notes, pyRevit 7.1 was tested on Revit 2023 to 2027.

Does it only work with Claude?

No. The pyRevit agent works with any coding agent that speaks MCP. The install command has options for Codex, Cursor, VS Code and OpenCode.

Can Claude damage my model?

With the default ask policy, no change stays in the model until you click Keep, and each approved run is one undo entry. It is still software that is marked experimental, so work on a copy until you trust it.

Do I need to know Python?

Not to use it. Claude writes the scripts. Reading them helps when you want to know exactly what a step did.

The commands in one place

pyrevit configs agent enable
pyrevit mcp install claude
pyrevit agent status
pyrevit configs agent policy ask
pyrevit configs agent policy auto

Five steps to connect, six steps to build. The full run is in the video on YouTube, and more short lessons are on my free tutorials page. Next I want to let Claude drive a structural analysis program. If you try this setup and get stuck on a step, send me a message.