Open-source MCP server for Revit audit workflows — naming conventions, model health, warnings

Open-source MCP server for Revit audit workflows — naming conventions, model health, warnings

omarabdelazizeng
Community Visitor Community Visitor
178 Views
2 Replies
Message 1 of 3

Open-source MCP server for Revit audit workflows — naming conventions, model health, warnings

omarabdelazizeng
Community Visitor
Community Visitor

Sharing a project that may be useful for anyone working with the Revit API and interested in LLM tooling.

 

I built oa-aec-mcp — a read-only MCP (Model Context Protocol) server that connects Claude Desktop to Revit via a C# plugin. Instead of exposing raw element-level API calls, it wraps four common audit workflows into single tool calls:

 

- summarize_model_health: warning count, unused families, unplaced rooms, view count

- list_unplaced_rooms: filtered by level, returns room number/name/department

- find_warnings_by_category: groups warnings by type, returns affected element IDs

- audit_naming_conventions: accepts a regex pattern + category list, returns violations grouped by category

 

The C# plugin uses ExternalEvent to run all API calls on the Revit main thread and communicates with the TypeScript MCP server over WebSocket on localhost:8765.

 

The naming convention tool has one feature worth highlighting for this audience: Claude translates a natural-language rule to regex before calling the tool, so the coordinator describes the standard and the pattern gets generated automatically.

 

Revit 2025, MIT license, two public repos:

- TypeScript MCP server: https://github.com/omarabdelazizeng-sketch/oa-aec-mcp

- C# Revit plugin: https://github.com/omarabdelazizeng-sketch/oa-aec-mcp-plugin

 

Full writeup with architecture diagram and example prompt/response: https://dev.to/omarabdelaziz-sketch/oa-aec-mcp-revit-audit-workflows-as-mcp-tools-25kj

 

Happy to discuss the ExternalEvent approach or the WebSocket architecture if useful.

0 Likes
179 Views
2 Replies
Replies (2)
Message 2 of 3

jose_Miquelao
Observer
Observer

This is a solid architectural decision — wrapping audit workflows rather than raw element primitives is the right call, and the reasoning behind it is sound.

The point about element-level MCP interfaces putting the wrong work in the wrong place is well-taken. If an LLM has to enumerate elements, read properties, and apply logic across thousands of round trips just to answer "does this model follow our naming standard," you've essentially built a very expensive loop with a language model doing bookkeeping. Aggregating inside Revit and sending structured results across the WebSocket is the correct boundary to draw.  

oa-aec-mcp: Revit Audit Workflows as MCP Tools

 

A few things worth discussing for anyone thinking about this kind of architecture:

The ExternalEvent pattern is the right call, but has a quirk worth knowing. Since all Revit API access must happen on the main thread, the ExternalEvent dispatcher is the standard mechanism — but it means your plugin is effectively fire-and-forget from the WebSocket handler's perspective. The handler raises the event and then has to wait for the result asynchronously. If you're handling concurrent requests (e.g., Claude calls two tools in quick succession), you need to be careful that your event queue and result signaling don't race. A SemaphoreSlim or a per-request TaskCompletionSource keyed to a request ID is the typical pattern for keeping this clean.

The natural-language → regex translation is the most interesting part of the naming audit tool. The fact that Claude generates the pattern before calling the tool means the coordinator never has to understand regex syntax — they describe the standard in plain English and the tool gets a machine-checkable pattern. That's a genuinely useful abstraction, and it also means the audit is reproducible: the generated regex can be logged and reused without going through Claude again.  

oa-aec-mcp: Revit Audit Workflows as MCP Tools

 

The four-tool-per-coordination-workflow philosophy scales well. The temptation with MCP servers is to expose everything and let the LLM figure out how to compose it. The problem is that tool call count, token cost, and reasoning complexity all grow with that approach. Keeping tools at the workflow level rather than the API method level keeps the model focused on the actual question rather than orchestration overhead.  

oa-aec-mcp: Revit Audit Workflows as MCP Tools

 

A couple of things worth considering for v0.2 beyond what's already on your list:

  • Clash/interference detection summary — not full clash detection, but a read on whether there are overlapping geometry warnings in a given workset or discipline. Useful before a coordination meeting without needing Navisworks open.
  • Sheet revision audit — beyond just the index, checking whether revision clouds are untagged or revisions are marked issued but clouds remain. That's a common pre-submission QA step that's tedious to do manually
0 Likes
Message 3 of 3

bimautomationstudio
New Member
New Member

The workflow-level design is the right call. Aggregating inside Revit and returning structured results keeps the LLM doing reasoning, not iterating over raw element data across hundreds of round trips.

The read-only boundary you've drawn is the easier half. The moment you add write operations (parameter updates, type assignments, batch corrections), the ExternalEvent pattern gets more complex. You're no longer fire-and-forget. You need transaction management on the Revit side, error signaling that distinguishes "the API call failed" from "the transaction rolled back" from "the WebSocket timed out," and some way to prevent partial model state if a multi-step operation fails midway. Most implementations stay read-only for exactly this reason.

The natural-language to regex translation for naming conventions is the strongest part of the architecture. The same pattern extends cleanly to parameter value validation: describe the rule, Claude generates the check, call the tool.

I've been running a production read-write version that handles parameter writes, type changes, and batch updates alongside audit queries. The transaction boundary is the hardest engineering problem in the stack. I built it for AEC firms at https://bim-automation-studio.github.io

0 Likes