aps-sample-revit-mcp-tools-bundle
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Gecti
- Code scan — Scanned 4 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
This tool is a sample C# AppBundle designed for the Autodesk Automation API. It enables AI assistants like Claude or VS Code Copilot to execute custom tools and orchestrate operations on Revit Cloud Models through natural language via a connected MCP server.
Security Assessment
Overall Risk: Low. The automated code scan reviewed 4 files and found no dangerous patterns, hardcoded secrets, or requests for excessive local permissions. However, be aware that the tool inherently makes network requests to Autodesk cloud services to load and save Revit models. Because it is designed to interact with cloud infrastructure, developers should ensure proper configuration of their own Autodesk API credentials rather than relying on embedded secrets.
Quality Assessment
The project is actively maintained, with its most recent push occurring today. It benefits from a clear README, transparent documentation (including a GitHub Copilot-generated disclaimer noting it is a "vibe-coded" exploratory proof-of-concept), and a standard permissive MIT license. The primary drawback is very low community visibility; it currently has only 5 GitHub stars, meaning the codebase lacks extensive peer review from the broader developer community. Additionally, developers should note a minor discrepancy between the repository description (which references Revit 2026) and the README badges (which reference Revit 2027 and .NET 10).
Verdict
Safe to use as a learning reference or starting point for experimental integrations, but exercise caution and perform your own due diligence if adapting this proof-of-concept for a production environment.
Sample AppBundle for Automation API for Revit 2026 that enables AI assistants to execute custom tools on Revit Cloud Models through the MCP.
# Revit MCP Tools for APS Automation API
A sample AppBundle for Automation API for Revit 2027 that executes custom tools on Revit Cloud Models. Designed to work with MCP Revit Automation - allowing AI assistants like Claude or VS Code Copilot to orchestrate Revit operations through natural language.
⚠️ Disclaimer
This is a vibe-coded sample solution - an exploratory proof-of-concept developed iteratively. It demonstrates patterns and possibilities but may not follow all production-grade practices. This README was generated by GitHub Copilot based on analyzing the actual codebase, ensuring documentation matches implementation.
How It Works
This AppBundle is deployed to Autodesk Automation API for Revit and invoked by the MCP Revit Automation server:
┌─────────────────┐ ┌──────────────────────┐ ┌─────────────────────┐
│ AI Assistant │──────│ MCP Revit Server │──────│ Automation API │
│ (Claude/VS Code)│ │ (Orchestration) │ │ (Revit Engine) │
└─────────────────┘ └──────────────────────┘ └─────────────────────┘
│ │ │
│ "Link these models" │ │
├────────────────────────>│ │
│ │ Create WorkItem │
│ ├─────────────────────────────>│
│ │ │
│ │ ┌─────────┴─────────┐
│ │ │ This AppBundle │
│ │ │ - Load tool │
│ │ │ - Execute logic │
│ │ │ - Save model │
│ │ └─────────┬─────────┘
│ │ Results │
│ │<─────────────────────────────┤
│ "Links added!" │ │
│<────────────────────────┤ │
Table of Contents
- How It Works
- Overview
- Features
- Prerequisites
- Installation
- Usage
- Sample Tools
- Development
- Integration with MCP Revit Automation
Overview
Revit MCP Tools is an AppBundle that provides a plugin-based architecture for executing automated operations on Revit Cloud Models. When deployed to Automation API for Revit 2027, it can be invoked by the MCP Revit Automation server, enabling AI assistants to perform Revit operations through natural language commands.
Problem It Solves
When building AI-powered Revit automation workflows, developers need:
- Reusable Tool Library: A collection of common Revit operations that AI can call
- Model Lifecycle Management: Automatic opening, processing, and saving of Cloud Models
- Flexible Tool Registration: Easy addition of custom tools without modifying core code
- Worksharing Support: Automatic handling of both workshared and non-workshared models
- JSON-based Configuration: Simple way to specify which model and tool to execute
This AppBundle abstracts away the complexity of Revit API operations, allowing AI assistants to focus on user intent while the tools handle the technical details.
Who It's For
- Developers building AI-powered Revit automation solutions
- Teams implementing MCP (Model Context Protocol) servers for AEC workflows
- Organizations wanting to enable natural language control of Revit operations
- AEC firms exploring AI assistants for model coordination tasks
Features
- 🤖 AI Assistant Ready: Designed to be invoked by MCP servers and AI assistants
- 🔧 Plugin Architecture: Easy registration of custom tools via attributes
- ☁️ Cloud Model Support: Seamless opening and saving of Autodesk Forma models
- 🔄 Worksharing Aware: Automatically handles workshared vs. non-workshared models
- ⚙️ JSON Configuration: Simple JSON-based configuration for model and tool selection
- 🏗️ Builder Pattern: Fluent API for setting up the toolbox
- 📝 Comprehensive Logging: Built-in console logging for debugging and monitoring
- 🔌 Extensible: Easy to add new tools without modifying core framework
Prerequisites
- .NET 10.0 SDK
Installation
1. Clone the Repository
git clone https://github.com/autodesk-platform-services/aps-sample-revit-mcp-tools-bundle.git
cd RevitMcpTools
2. Restore Dependencies
dotnet restore
3. Build the Project
dotnet build -c Release
4. Package for Automation API
Create an AppBundle for Automation API for Revit following Autodesk's guidelines.
5. Create Activity
When creating an Activity for this AppBundle, use the following configuration:
{
"activity": {
"id": "RevitMcpToolsActivity",
"description": "Revit MCP Tools for Automation API",
"engine": "Autodesk.Revit+2027",
"alias": "dev",
"commandLine": [
"$(engine.path)\\RevitCoreConsole.exe /al \"$(appbundles[RevitMcpTools].path)\""
],
"parameters": {
"revitmodel": {
"verb": "get",
"localName": "revitmodel.json"
},
"toolinputs": {
"verb": "get",
"localName": "toolinputs.json"
}
},
"appbundles": [
"{{nickname}}.RevitMcpTools+dev"
],
"settings": {}
}
}
Key Configuration Points:
- Input Parameters:
revitmodel: The model configuration file (which model to open and which tool to execute)toolinputs: Tool-specific input data (parameters for the selected tool)
Replace {{nickname}} with your Autodesk APS app nickname/Client Id.
Usage
Configuration
To open and process a Revit Cloud Model, the following configuration is required, which must be passed through the WorkItem parameters as revitmodel.json:
{
"region": "US",
"projectGuid": "your-project-guid",
"modelGuid": "your-model-guid",
"toolName": "create_model",
"save": true
}
Configuration Options:
| Property | Type | Description |
|---|---|---|
region |
string | Forma region (e.g., "US", "EMEA") |
projectGuid |
string | GUID of the Forma project |
modelGuid |
string | GUID of the Revit model |
toolName |
string | Name of the tool to execute (matches tool attribute) |
save |
boolean | Whether to save the model after tool execution |
Note: When using the MCP Revit Automation server, this configuration is automatically generated and passed to the WorkItem. Manual creation is only needed for direct Automation API testing.
Creating Custom Tools
Implement the IRevitMcpTool interface and decorate your class with the [RevitMcpTool] attribute:
using Autodesk.Revit.DB;
using DesignAutomationFramework;
using RevitMcpTools.Utils;
namespace RevitMcpTools.Tools
{
[RevitMcpTool("my_custom_tool")]
public class MyCustomTool : IRevitMcpTool
{
public bool Execute(DesignAutomationData data, Document doc)
{
try
{
Console.WriteLine("*** Executing My Custom Tool ***");
// Your tool logic here
using (Transaction trans = new Transaction(doc, "My Operation"))
{
trans.Start();
// Modify the model...
trans.Commit();
}
Console.WriteLine("*** Tool completed successfully ***");
return true;
}
catch (Exception ex)
{
Console.WriteLine($"*** Error: {ex.Message} ***");
return false;
}
}
}
}
Registering Tools
Add your tool to the AddMcpTools extension method:
public static RevitMcpToolBoxBuilder AddMcpTools(this RevitMcpToolBoxBuilder builder)
{
return builder
.AddTool<CreateModelTool>()
.AddTool<LinkModelsTool>()
.AddTool<MyCustomTool>(); // Add your tool here
}
Sample Tools
create_model
Creates a new Revit Cloud Model from a template with optional worksharing.
Required Input File: toolinputs.json
{
"accountId": "00000000-0000-0000-0000-000000000000",
"projectId": "00000000-0000-0000-0000-000000000000",
"folderId": "urn:adsk.wipprod:fs.folder:co.example",
"modelName": "NewModel.rvt",
"enableWorksharing": true
}
link_models
Add or remove multiple Revit Links into the current model.
Required Input File: toolinputs.json
{
"region": "US",
"projectGuid": "00000000-0000-0000-0000-000000000000",
"linksToAdd": [
{
"modelName": "Architectural_Link.rvt",
"modelGuid": "11111111-1111-1111-1111-111111111111"
},
{
"modelName": "Structural_Link.rvt",
"modelGuid": "22222222-2222-2222-2222-222222222222"
}
],
"linksToRemove": [
{
"modelName": "Old_Link.rvt",
"modelGuid": "99999999-9999-9999-9999-999999999999"
}
]
}
Development
Project Structure
RevitMcpTools/
├── RevitMcpToolsHandler.cs # Main entry point (IExternalDBApplication)
├── Utils/
│ ├── RevitMcpToolBox.cs # Core orchestrator
│ ├── RevitMcpToolBoxBuilder.cs # Fluent builder
│ ├── RevitMcpToolBoxBuilderExtensions.cs
│ ├── IRevitMcpTool.cs # Tool interface
│ ├── RevitMcpToolAttribute.cs # Tool registration attribute
│ └── ModelConfiguration.cs # JSON config parser
├── Tools/
│ ├── CreateModelTool.cs # Model creation tool
│ └── LinkModelsTool.cs # Model linking tool
└── Examples/
└── revitmodel.json # Configuration example
Integration with MCP Revit Automation
This AppBundle is designed to work seamlessly with the MCP Revit Automation server, which:
- Exposes tools to AI assistants via the Model Context Protocol (MCP)
- Translates natural language requests into WorkItem configurations
- Manages Automation API authentication and job submission
Example Workflow
- User (via Claude/VS Code): "Link the structural model to the current architectural model"
- MCP Server: Translates request → creates
revitmodel.jsonandtoolinputs.json - Automation API: Executes this AppBundle with the tool
link_models - This AppBundle: Opens model, links structural model, saves changes
- MCP Server: Reports success back to the AI assistant
- User: Receives confirmation and can continue with next request
Note: This AppBundle is designed for use with Autodesk Automation API for Revit 2027. It requires:
- Deployment to Automation API as an AppBundle (targeting Revit 2027)
- An MCP server (like MCP Revit Automation) to orchestrate work items
- Proper authentication and access to Autodesk Forma projects
This is a sample project intended as a reference implementation. Feel free to clone or fork it and adapt it to your specific needs.
License
This sample is licensed under the terms of the MIT License.
Please see the LICENSE file for full details.
Made with ❤️ for the AEC community | Vibe-coded with GitHub Copilot
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi