Alaamri Revit MCP
Provides full access to the live Autodesk Revit API inside a running Revit session, including arbitrary C# execution and tools to inspect, edit, select, delete, open, save, and export models, elements, parameters, views, and documents.
Click on "Deploy 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., "@Alaamri Revit MCP count all walls on Level 1 in the open model"
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.
Alaamri Revit MCP
An MCP server that gives Claude (or any MCP client) full Revit API access inside a running Autodesk Revit 2025, 2026 or 2027 session: run any C# against the live model, plus ready tools to read, edit, select, delete, open, save and export.
It has two parts:
Revit add-in (
addin/, prebuilt per version indist/2025,dist/2026,dist/2027): adds an Alaamri ribbon tab with a Start/Stop Claude button (green = connected) and About. It opens a bridge on127.0.0.1only, protected by a per-session token, and runs every request on Revit's API thread throughExternalEvent. C# is compiled at runtime with Roslyn, isolated in its own load context so other add-ins' Roslyn versions don't clash.MCP server (
server.py): exposes the bridge as MCP tools over stdio.
بالعربي: القسم العربي · برومبت التثبيت عبر Claude · تثبيت بنقرة واحدة:
install.bat
Requirements
Windows, Autodesk Revit 2025, 2026 or 2027 (2027 is live-tested; 2025/2026 builds target .NET 8)
Python 3.10 or newer
Related MCP server: Horizun Revit MCP
Install
Let Claude do it: paste the prompt in prompts/install-with-claude.md into Claude Code.
Quick (Windows): close Revit, then double-click install.bat (inside the cloned folder or on its own). It copies the add-in for every supported Revit version it finds to %APPDATA%\Autodesk\Revit\Addins\<year>, installs the server into %LOCALAPPDATA%\Alaamri-Revit-MCP and registers it in Claude Desktop (keeping a .bak of your config). Fully quit and reopen Claude Desktop, open Revit and choose Always Load for the add-in.
Claude Code:
claude mcp add alaamri-revit -- "%LOCALAPPDATA%\Alaamri-Revit-MCP\.venv\Scripts\alaamri-revit-mcp.exe"Build the add-in from source (.NET 10 SDK; 2025/2026 use the Nice3point Revit API reference packages, so Revit need not be installed):
dotnet build addin\AlaamriRevitMcp.csproj -c Release -p:RevitYear=2026 -o dist\2026Tools
Tool | What it does |
| Run any C# inside Revit with globals |
| Bridge, Revit version/build, active document and view, open documents |
| Title, path, units, levels, phases, worksharing, model element counts |
| Elements by category or API class, optional active-view / name filter |
| All instance (and type) parameters of an element |
| Set one parameter on many elements or their types |
| Read or set the Revit selection (and zoom) |
| Delete elements (undoable) |
| File operations |
| Export the active view to PNG for visual checking |
| Version, author, license, links |
Example execute_csharp code:
var level = new FilteredElementCollector(doc).OfClass(typeof(Level)).Cast<Level>().OrderBy(l => l.Elevation).First();
var w = Wall.Create(doc, Line.CreateBound(XYZ.Zero, new XYZ(ft(6000), 0, 0)), level.Id, false);
return w; // -> {id, name, category, type, level}Safety
This tool gives an AI unrestricted control of the open Revit model. Work on a copy of real projects, keep backups, and review what the agent is doing. Each call is a single named transaction you can undo with Ctrl+Z; calls with transaction=false (open/save/close or self-managed transactions) are not wrapped. The bridge listens on 127.0.0.1 only, rejects browser requests, and needs the random token written to %LOCALAPPDATA%\Alaamri-Revit-MCP\bridge.json each time it starts. Click Stop Claude to switch it off; the choice is remembered.
Author
Developed by Dr Ibrahim M.A. Alaamri: LinkedIn · Also: Alaamri MS Project MCP
Feedback and ratings are welcome in Issues.
License
MIT, see LICENSE.
بالعربية
Alaamri Revit MCP خادم MCP يمنح Claude (أو أي عميل MCP) صلاحية كاملة على Revit API داخل جلسة Revit المفتوحة (الإصدارات 2025 و2026 و2027): تنفيذ أي كود C# على النموذج مباشرة، إضافة إلى أدوات جاهزة للقراءة والتعديل والتحديد والحذف والفتح والحفظ والتصدير.
المكوّنان
إضافة Revit: تضيف تبويب Alaamri فيه زر Start/Stop Claude (أخضر عند الاتصال) وزر About. الاتصال محلي فقط على
127.0.0.1ومحمي برمز سري يتجدد في كل تشغيل.خادم MCP (
server.py) يعرض هذه الإمكانات أدواتٍ لـ Claude.
التثبيت
عبر Claude: الصق البرومبت الموجود في prompts/install-with-claude.md في Claude Code وسيتولى التثبيت والاختبار.
بنقرة واحدة: أغلق Revit ثم شغّل
install.bat، ثم أعد فتح Claude Desktop، وافتح Revit واختر Always Load.
الأدوات
execute_csharp (تنفيذ أي كود C# داخل Revit)، وstatus، وdocument_info، وlist_elements، وget_parameters، وset_parameters، وget_selection، وselect_elements، وdelete_elements، وopen_document، وnew_document، وsave_document، وexport_view_image، وabout.
تنبيه
الأداة تمنح الذكاء الاصطناعي تحكماً غير مقيّد بالنموذج المفتوح، فاعمل على نسخة من المشاريع الحقيقية واحتفظ بنسخ احتياطية. كل أمر يُنفَّذ في Transaction واحدة باسم واضح يمكن التراجع عنها بـ Ctrl+Z، ويُلغى أثره تلقائياً عند الخطأ. لإيقاف الاتصال اضغط Stop Claude.
المطوّر
تطوير د. إبراهيم م. أ. العامري (Dr Ibrahim M.A. Alaamri): LinkedIn
يسعدني تقييمك وملاحظاتك عبر Issues.
الترخيص
MIT، راجع ملف LICENSE.
Available Tools
14 toolsaboutC
Server name, version, author, license and links.
Inputs: no named parameters. Returns: result
delete_elementsB
Delete elements (one undoable transaction). Returns all ids Revit removed, including dependents.
Inputs: element_ids (required). Returns: result
document_infoA
Active document: title, path, units, levels, phases, worksharing, element counts by category.
Inputs: no named parameters. Returns: result
execute_csharpA
Run any C# code inside Revit with FULL Revit API access (the main tool).
Write a C# script body (statements, optional return value;). Available globals:
uiapp (UIApplication), app (Application), uidoc (UIDocument), doc (active Document),
print(obj) to add output lines, mm(feet)->mm, ft(mm)->feet, id(long)->ElementId.
Namespaces already imported: System, System.Linq, System.Collections.Generic, System.IO, System.Text,
Autodesk.Revit.DB (+ .Architecture .Structure .Mechanical .Plumbing .Electrical), Autodesk.Revit.UI(.Selection).
Revit internal units are feet. With transaction=true (default) the code runs inside one named
transaction that is committed on success and rolled back on any exception; the user can undo it with Ctrl+Z.
Use transaction=false for read-only code or when the code opens/closes/saves documents or manages
its own transactions. Example: return new FilteredElementCollector(doc).OfClass(typeof(Wall)).Count();
Inputs: code (required), timeout_s, transaction, transaction_name. Returns: result
export_view_imageB
Export the active view as a PNG image to path, so the result can be checked visually.
Inputs: path (required), pixel_width. Returns: result
get_parametersB
All instance parameters of one element (and its type parameters if include_type).
Inputs: element_id (required), include_type. Returns: result
get_selectionC
Elements currently selected in Revit.
Inputs: no named parameters. Returns: result
list_elementsA
List element instances filtered by category name (e.g. 'Walls', 'Doors') or API class (e.g. 'Wall', 'FamilyInstance'), optionally only in the active view and/or by name substring.
Inputs: limit, category, view_only, class_name, +1 more. Returns: result
new_documentA
Create a new project from a template (default template if empty) and activate it.
Inputs: template_path. Returns: result
open_documentC
Open an .rvt/.rfa file (activates it in the UI by default).
Inputs: path (required), activate. Returns: result
save_documentC
Save the active document, or Save As a new path.
Inputs: overwrite, save_as_path. Returns: result
select_elementsC
Select elements in Revit (and zoom to them).
Inputs: element_ids (required), zoom. Returns: result
set_parametersB
Set one parameter on many elements (or on their types). Value is text: numbers for Double params use display units via SetValueString (e.g. '3000' mm), Integer/Yes-No as '1'/'0', ElementId as the id.
Inputs: value (required), parameter (required), element_ids (required), on_type. Returns: result
statusA
Is Revit running with the bridge on? Revit version, active document, open documents.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have clearly distinct resource+action targets (list_elements, get_parameters, set_parameters, delete_elements, open/save/new_document). The only mild overlap is between status (Revit version, active doc, open docs), about (server metadata) and document_info (active doc details), which a careful reader can separate from the descriptions but could still momentarily confuse. execute_csharp is explicitly framed as the general-purpose escape hatch, which helps rather than muddies the set.
The dominant convention is consistent snake_case verb_noun (list_elements, get_parameters, set_parameters, select_elements, delete_elements, open_document, export_view_image). The metadata tools 'status' and 'about' are noun-only and break the pattern, and 'execute_csharp' names a technology rather than an operation, but overall the set reads predictably.
14 tools is squarely in the well-scoped band for a Revit bridge server. Each tool covers a distinct slice of the workflow (connection/inspection, element query, parameter read/write, selection, document lifecycle, export, raw API execution) with no filler.
The surface covers connection check, document lifecycle (open/new/save), element listing, parameter read/write, selection, deletion and visual verification. Notable omissions are element creation helpers, family/view management, document close, and no update/rename tool, but execute_csharp with full API access makes all of these reachable, so no true dead ends.
Maintenance
Related MCP Connectors
Read and edit the Revit 2024–2027 model on your PC. Needs the free Revit MCP add-in.
- AutoMEPDeprecatedapp.automep
Edit AutoCAD and Revit MEP drawings from Claude or ChatGPT in plain English.
Convert Revit files to XKT, IFC, or DWG and query BIM data via natural language.
AI for Revit: 450+ tools, 1 undo step. Windows, Revit 2024–2027 (2021–2023 included). Free account.
Related MCP Servers
- AlicenseAqualityFmaintenanceAllows AI to interact with Autodesk Revit via the MCP protocol, enabling retrieval of project data and automation of tasks like creating, modifying, and deleting elements.13486MIT
- -licenseNot gradedqualityNot gradedmaintenanceConnects MCP clients like Claude, Codex, and Cursor to a running Autodesk Revit session for typed BIM queries, verified model edits, family authoring, exports, and Power BI workflows. It is open-source, Apache-2.0, and designed for reliable, verified outcomes.-
- AlicenseBqualityCmaintenanceEnables AI agents to connect to Autodesk Revit and run Revit API Python, inspect models, capture screenshots, request user element selections or annotated snips, and manage multi-instance connections through MCP.13MIT
- AlicenseCqualityBmaintenanceEnables AI clients to inspect, visualize, modify, launch, and manage Autodesk BIM models, views, families, and documents through a local authenticated bridge, including direct code execution.33MIT