A sample Model Context Protocol (MCP) remote server (HTTP) that enables AI assistants like Claude to automate Autodesk Revit operations via Automation API using Service-to-Service Authentication (SSA).
Revit.Automation.MCP.mp4
β οΈ 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.
π Companion Repository
This MCP server works with the APS Automation API Revit MCP Tools Sample - the Revit AppBundle that executes the actual tools in Automation API. Deploy that AppBundle to use this MCP server.
MCP Revit Automation bridges AI assistants with Autodesk Revit through the Model Context Protocol. It enables headless, scalable automation of Revit operations on cloud-hosted models (ACC/BIM360) without manual interaction.
Target Audience: AEC Firms, BIM Managers, BIM Coordinators, Developers building AI-powered BIM workflows
- π SSA Authentication - JWT bearer tokens with RSA signing for service-to-service auth
- ποΈ Fluent API - Type-safe model configuration with compile-time validation
- π¦ Dual JSON Architecture - Separates model context from tool inputs
- π€ MCP Integration - Exposes tools to AI assistants naturally
- βοΈ Cloud-Native - Works with Autodesk Cloud Models
- Easy to add new Revit automation tools
- Consistent pattern for all operations
- No core service changes required
- Exposes tools to AI assistants like Claude or VS Code Copilot
- Natural language to Revit automation
- HTTP transport for broad compatibility
- Works with Autodesk Cloud Models (ACC/BIM360) - Workshared and Non-Workshared
- Scalable workitem submission
- Automation API for Revit integration
MCP Client (Claude/VS Code)
β MCP Protocol
MCP Server (This Project)
ββ RevitAutomationTools (MCP tool definitions)
ββ RevitAutomationService (Workitem submission)
ββ SsaTokenService
β HTTPS + Bearer Token
Autodesk Automation API for Revit (Cloud execution)
Dual JSON Pattern:
revitmodel.json- Model context (region, project, model GUIDs, tool name)toolinputs.json- Tool-specific parameters
- .NET 10 SDK (Download)
- An Autodesk Platform Services Sever-to-Server App with Automation API enabled
- Service Account configured (SSA Management Tool)
- Automation Activity deployed for APS Automation API Revit MCP Tools Sample
git clone https://github.com/autodesk-platform-services/aps-sample-mcp-server-revit-automation.git
cd mcp-revit-automation
dotnet restore
dotnet build --configuration ReleaseCreate appsettings.json:
{
"Forge": {
"ClientId": "your-client-id",
"ClientSecret": "your-client-secret",
"ServiceAccountId": "your-service-account-id",
"KeyId": "your-key-id",
"PrivateKeyPath": "path/to/private-key.pem"
}
}Run (http): dotnet run
Obtain credentials from APS Developer Portal:
- Create APS application with Automation API enabled β Get
ClientId&ClientSecret - Create Service Account β Generate RSA key pair β Get
ServiceAccountId&KeyId - Download private key as
.pemfile β Set path inPrivateKeyPath
Visual Studio Code: See how to configure an MCP Server here
{
"inputs": [],
"servers": {
"revit-automation-mcp": {
"url": "http://localhost:6223",
"type": "http"
}
}
}// Model configuration (type-safe, compile-time validated)
var modelConfig = ModelConfiguration.Create()
.WithRegion("US")
.WithProject("project-guid")
.WithModelGuid("model-guid")
.WithToolName("link_models")
.Save(true)
.Configure();
// Tool-specific inputs (flexible dictionary)
var toolInputs = new Dictionary<string, object>
{
{ "modelName", "My Model" },
{ "linksToAdd", new[] { new { modelName = "Link1", modelGuid = "guid1" } } },
{ "linksToRemove", Array.Empty<object>() }
};
var result = await service.SubmitWorkItemAsync(modelConfig, toolInputs);| Tool | Description |
|---|---|
create_model |
Creates a new Revit model from template |
link_models |
Adds/removes Revit model links |
revitmodel.json
{
"region": "US",
"projectGuid": "00000000-0000-0000-0000-000000000000",
"modelGuid": "11111111-1111-1111-1111-111111111111",
"toolName": "create_model",
"save": false
}toolinputs.json
{
"enableWorksharing": true,
"accountId": "00000000-0000-0000-0000-000000000000",
"projectId": "00000000-0000-0000-0000-000000000000",
"folderId": "urn:adsk.wipprod:fs.folder:co.example",
"modelName": "NewModel.rvt"
}revitmodel.json
{
"region": "US",
"projectGuid": "00000000-0000-0000-0000-000000000000",
"modelGuid": "00000000-0000-0000-0000-000000000000",
"toolName": "link_models",
"save": true
}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"
}
]
}1. In Tools/RevitAutomationTools.cs
[McpServerTool(Name = "my_tool")]
public async Task<WorkItemSubmissionResult> MyTool(...)
{
var modelConfig = ModelConfiguration.Create()
.WithRegion(region)
.WithProject(projectGuid)
.WithModelGuid(modelGuid)
.WithToolName("my_tool")
.Configure();
var toolInputs = new Dictionary<string, object> { /* tool params */ };
return await revitAutomationService.SubmitWorkItemAsync(modelConfig, toolInputs);
}2. In your Revit AppBundle: add case for "my_tool". See how to add new tools here
- Revit AppBundle (Companion Repo): aps-automation-api-revit-mcp-tools-sample
- APS Portal: aps.autodesk.com
- APS Automation API: Documentation
- APS SSA API: Developer Guide
- MCP Spec: modelcontextprotocol.io
- .NET MCP Server Template: microsoft learn
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