MIRALTO
FRENFollow the Lab
← The Lab

Connecting Claude Code to Revit

With the open-source MCP mcp-servers-for-revit, Claude Code acts in Revit: parameters, filters, views, sheets. Set-up in 2 steps, then a wall-type sheet set built from an Excel file.

One Excel file, a few sentences, and the wall-type sheet set is ready: codes, filters, colours, views and sheets. It works for a great many everyday tasks in Revit.

Animated tutorial
The screens in this video are redrawn to be readable. The steps and the prompt are the ones to follow. To go further and ask your questions: the online sessions.

What you need

  • Revit 2020 to 2027, the versions the add-in supports.
  • Claude Code, in Claude Desktop (Code tab), and Node.js 18 or later.
  • mcp-servers-for-revit, open source (MIT licence).

The 2 steps

  1. Install the Revit add-in: on the releases page, download the ZIP for your Revit version and copy its contents into %AppData%\Autodesk\Revit\Addins\<version>. When Revit starts, choose “Always Load”. In the mcp-servers-for-revit tab, click Settings, tick the commands Claude may use, then Save.
  2. Connect Claude Code: in a terminal (not inside Claude Code), run the command below. Revit must be open before you start the session.
claude mcp add mcp-server-for-revit -- cmd /c npx -y mcp-server-for-revit

The prompts

Say hello in Revit to test the connection.
Read wall_types.xlsx and fill in the “Wall code” parameter of each wall type.
Create one filter per wall code, each with a colour, then a “Wall types” view per level with these filters.
Put each view on an A1 sheet with the colour legend, numbered A-101 to A-103.

One request per step: easier to check and fix. For views, filters and sheets, Claude writes C# code that the add-in runs in Revit (the send_code_to_revit command).

If it gets stuck

  • Claude can’t see Revit: open Revit first, then start a new session in Claude Code.
  • A command does nothing: enable it in Settings, then Save.
  • The generated code fails: paste the error message to Claude; it reads it and fixes its code.
  • The add-in doesn’t load: check the ZIP matches your Revit version.
  • Not what you expected: Ctrl+Z in Revit, then refine the request in one sentence.

Followthe Lab.

Newly tested methods, the tools that matter and invitations to the online sessions, in one e-mail when there is something worth sharing. No spam, unsubscribe at any time.

contact@miralto.fr