How revit-mcp/revit-mcp-commandset works
Project type and purpose
• This is a .NET/Visual Studio solution that implements a Revit add-in (plugin) called “Revit-MCP CommandSet.”
• Its purpose is to act as the core client for the Revit-MCP protocol, connecting large language models (LLMs) with Revit’s API to perform AI-driven BIM operations (CRUD on Revit elements, annotation, MEP components, views, etc.).
File structure
• Top-level:
• revit-mcp-commandset.sln (Visual Studio solution)
• .gitignore, LICENSE, README
• Project folder “revit-mcp-commandset” contains:
• Commands/… — C# classes defining ICommand implementations, grouped by functional areas (Access, AnnotationComponents, Delete, ExecuteDynamicCode, etc.).
• Models/… — DTOs and info objects for various domains (Common, Annotation, Architecture, MEP, Views).
• Services/… — EventHandler classes (e.g. CreateDimensionEventHandler, GetSelectedElementsEventHandler) that implement the logic invoked by each command.
• Utils/… — Helper classes for JSON schema generation, transaction management, geometry utilities, duplicate-type handling, etc.
• RevitMCPCommandSet.csproj — project configuration (references to Revit API, Newtonsoft.Json, MCP protocol client).
• Architectural hints:
• A command/event-handler (Command Pattern + event-driven) layered design: Commands → Services → Revit API.
• Models as data contracts between plugin and external MCP server/LLM.
• Utils for cross-cutting concerns.
README
• One-line summary: “Core implementation of the Revit-MCP protocol that connects LLMs with Revit. Includes essential CRUD commands for Revit elements enabling AI-driven BIM automation.”
Final recommendations
• Be exhaustive: include all major folders as logical groupings.
• Extension points: the ExecuteDynamicCode feature should stand out as a customizable hook.
• Error/transaction flow: optionally show Utils/TransactionUtils wrapping Revit API calls.