pyrevit-mcp
This server enables MCP clients and a web chat UI to inspect, edit, and visualize an open Autodesk Revit model through natural language.
Status & model info: Check connection status; retrieve document title, path, project info, active view, and element counts; list levels, views, categories, and category parameters (scope, data type, writability).
Query elements: Get elements by category or filters (level, parameter values), fetch all properties by ID, and retrieve current Revit warnings grouped by type.
Edit/create/delete: Set single or bulk instance/type parameters; move, copy, rotate elements; create walls, floors, levels, and grids; load and place families; delete elements with two-step confirmation.
Visualization & views: Override graphics/color elements, isolate elements, color by parameter with legend, reset view, switch active view, and export the current view as PNG.
Selection & geometry: Get or set the current selection; retrieve element geometry (position, size, area, volume) and quantities by category/type.
Persistence & integration: Save or sync with central models; all tools are exposed to MCP clients, and a web chat UI offers CSV import/export, undo, and model screenshots.
Enables AI agents to inspect and edit an open Autodesk Revit model, including querying elements, setting parameters, controlling views, highlighting graphics, and managing model health through the Revit API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pyrevit-mcpfind all doors narrower than 1.2m and highlight them in red"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pyrevit-mcp
An MCP server that exposes an open Autodesk Revit model to any MCP client, so the model can be inspected and edited in plain language instead of through the Revit UI.
Ask "find all doors narrower than 1.2m and highlight them in red", "how many square metres of wall are in this building" or "place a container next to the site entrance", and the server translates that into Revit API calls through pyRevit Routes. A small web chat UI is included for demos: split-screen with Revit, CSV import and export, undo, and screenshots of the model right in the chat.
Built for live demos, prototyping and everyday experimenting.
This is not an official Autodesk product and comes with no support commitment. I work at Autodesk as a Technical Specialist for Emerging Tech in Construction, and this project is not part of that role. See Disclaimer and support.
How it works
MCP client (Claude Code, Claude Desktop, ...)
│ stdio
▼
server.py (Python 3 / FastMCP) ──HTTP :48884──> pyRevit Routes (IronPython, inside Revit)
▲ │
│ shared revit_get/revit_post ▼
app.py (FastAPI :8100) ◄── web chat UI Revit API, Transactions
│
▼ Claude APITwo entry points share one bridge:
server.pyis the MCP server. Any MCP client can connect over stdio and gets 29 tools.app.pyis a FastAPI backend with a chat UI (web/index.html) driven by the Claude API. It exposes the same tools plus CSV export, and renders images, downloads, and undo in the chat.
Inside Revit, a pyRevit extension (pyrevit-mcp.extension/) registers REST routes. pyRevit
injects the active document into the handlers, which run in the Revit API context, one
transaction per write.
Related MCP server: Revit MCP Server
What it covers
29 MCP tools:
Area | Tools |
Orientation |
|
Query |
|
Write |
|
Visual |
|
Selection |
|
Views |
|
Model health |
|
Geometry |
|
Families |
|
Editing |
|
Creation |
|
Persistence |
|
Parameter access covers instance and type parameters: reads fall back to the element type automatically, and a type write reports how many instances it affects before you trust it. Values are returned as display values in project units. Doors report their room assignment (FromRoom/ToRoom).
Anything geometric works in metres and takes anchors rather than coordinates. An
anchor is {"room": "Lager"}, {"element_id": 123456}, {"grid": "B/3"} or, as a last
resort, {"point_m": {...}}, and it can carry a level and an offset_m. This is not
decoration: a language model asked for absolute coordinates will produce plausible numbers
that put the wall outside the building, whereas an anchor is resolved against the model.
Deleting is deliberately two-step. The first call changes nothing and returns a preview plus a token derived from the affected ids; only a second call carrying that token deletes. The token cannot be replayed against a different set of elements.
Documentation
The full guide with a validated per-tool reference is hosted at
mk92at.github.io/pyrevit-mcp/pyrevit-mcp.html.
It supports English and German (?lang=en|de), light and dark themes, and per-tool anchors
(#find_elements). The web chat UI links into it from the tool reference sidebar.
Requirements
Autodesk Revit 2024 or newer (developed against Revit 2027) with pyRevit installed
Python 3.11 or newer and uv
For the web chat UI: an Anthropic API key
Setup
1. Install the Revit extension. Copy or clone this repository, then add
pyrevit-mcp.extension to pyRevit's extension search paths (pyRevit Settings → Custom
Extension Directories, pointing at this repository's root). Enable the Routes server in
pyRevit's settings. Restart Revit.
2. Verify the bridge. With a model open:
curl http://localhost:48884/pyrevit_mcp/status/The trailing slash is mandatory on every route.
3. Install the Python side:
uv sync4a. Register with an MCP client, e.g. Claude Code:
claude mcp add revit -s user -- uv --directory "<path-to>/pyrevit-mcp" run python server.py4b. Or run the web chat UI. Create a .env with your ANTHROPIC_API_KEY (see
.env.example), then:
uv run uvicorn app:app --port 8100Open http://localhost:8100. The sidebar has a tool reference generated from the server at
runtime, with a clickable example per tool.
After any change to the extension code, restart Revit cold. The Routes server (Beta)
crashes Revit on a pyRevit reload. scripts/restart_revit.ps1 automates the cold restart and
test_routes.py smoke-tests every route afterwards.
Layout
server.py MCP server, 29 tools, shared HTTP bridge
app.py FastAPI chat backend (CSV, undo, images, downloads)
web/index.html chat UI, single file
test_routes.py end-to-end smoke test for every route
test_mcp.py smoke test for the MCP stdio transport itself
explore_model.py quick model inventory via the running server
scripts/restart_revit.ps1 automated cold restart
pyrevit-mcp.extension/
startup.py route registration
lib/pyrevit_mcp/
status.py, elements.py, parameters.py, views.py, selection.py, model.py
geometry.py measurements, quantities, anchor resolution
editing.py families, transforms, confirmed deletion
creation.py walls, floors, levels, grids
utils.py ElementId helpers, safe JSON encoding, parameter accessKnown limits
No clash detection. Revit and ACC Model Coordination already do interference checking properly, across linked models and with a result workflow attached. This does not try to replace them.
Geometry creation covers walls, floors, levels and grids. Not roofs, stairs, curtain systems, MEP runs, or anything that needs a sketch more complex than a closed outline.
The derived grid is a heuristic read off wall positions. It recovers the orthogonal order of a building, not a designer's grid, and it wants a human to check it.
No editing of geometry after creation beyond move, copy, rotate and delete. Walls cannot be re-hosted, joined, or trimmed through this server.
Type parameters are written with a warning, but there is no dry-run mode.
Rooms queries slow down on very large models.
The Routes server is a pyRevit beta feature; treat the whole bridge as a prototype.
Disclaimer and support
I work at Autodesk as a Technical Specialist for Emerging Tech in Construction. This project grew out of my own exploration of MCP and the Revit API and runs alongside that work, not as part of it. It is not an official Autodesk product or project. Nothing here is built, reviewed, endorsed or maintained by Autodesk, and nothing in this repository is a statement on behalf of Autodesk. Reaching me through my job is not a way to get help with it.
On support I want to be straight with you, because the honest answer has two halves.
I would like to offer as much help as I can, and I am genuinely interested in developing this further together with anyone who finds it useful. Questions and ideas are best raised in Discussions; bugs go to Issues, and pull requests are welcome. I will read all of it. Tell me what you built with it — Show and tell exists for exactly that.
What I cannot do is promise any of that. There is no guaranteed response, no timeline, no fix for your blocker, and no commitment that this keeps working against future Revit or pyRevit changes. If you are building something that has to work, fork it and own your copy.
This project stands on pyRevit by Ehsan Iran-Nejad and the pyRevit Labs community, licensed GPL-3.0. pyRevit is a prerequisite you install yourself, not something this repository ships: its Routes module is the bridge that makes any of this possible, and no pyRevit code is included here.
The ElementId helpers in the extension were adapted from
revit-mcp-server, licensed MIT,
Copyright (c) 2025 Juan Rodriguez, whose handling of the Revit 2024+ ElementId change and of
Revit's modal failure dialogs during headless transactions I reused. Everything else was
written for this project and is licensed MIT as well, see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Token-free MCP server for structured RevoGrid Core, Pro, and Enterprise knowledge retrieval.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceMCP server for Autodesk Revit (BIM) with 705+ API endpoints. Enables AI agents to create walls, place doors/windows, generate sheets, manage views, and produce construction documents via the Model Context Protocol. Uses named pipes for zero-crash Revit integration.22MIT
- AlicenseBqualityDmaintenanceMCP server for Autodesk Revit via pyRevit, providing 45 tools for building design, editing, analysis, MEP, interop, and documentation. Works with any MCP client.4525MIT
- AlicenseNot gradedqualityBmaintenanceA pyRevit extension and Python server that enables AI clients to interact with a live Autodesk Revit session through tools for project info, view management, element operations, and schedule management.55MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Autodesk Revit 2024/2025/2026/2027 via pyRevit — 48 tools for building design, editing, analysis, clash detection, MEP, interop, documentation, and model persistence.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mk92at/pyrevit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server