Skip to content

JohnOnSoftware/aps-aecdm-mcp-dotnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Platforms .NET License

oAuth2 Data-SDK AEC-Data-Model

aps-aecdm-mcp-dotnet

.NET MCP Server to connect with Autodesk Assistant or Claude Desktop, AEC Data Model API including the Geometry feature(beta) and the Viewer.

Introduction

This project started as an experiment with the Model Context Protocol during an Autodesk Platform Accelerator.

It continues as a comprehensive Model Context Protocol (MCP) local server implementation that enables AI Agency to interact with APS AEC Data Model with either stdio or Streamable HTTP communication as follow:

  • Claude Desktop by stdio communication
  • Autodesk Assistant by Streamable HTTP communication

The MCP server provides natural language access models from Autodesk Construction Cloud data, do clash detection, spatial analysis, and 3D visualization capabilities.

Features

  • 🔐 Authentication - OAuth token management for APS API access
  • 🏗️ BIM Navigation - Browse hubs, projects, and element groups
  • 🔍 Element Querying - Filter and retrieve building elements by category
  • 📤 IFC Export - Export filtered elements to Industry Foundation Classes (IFC) format
  • ⚠️ Clash Detection - Accurate geometric clash detection using bounding box analysis
  • 📦 Spatial Containment - Find elements spatially contained within other elements
  • 📁 File Upload - Upload files to Autodesk Docs (ACC/BIM 360)
  • 👁️ 3D Visualization - Render and highlight elements in Autodesk Viewer
  • 🔌 Dual Transport - STDIO mode and Streamable HTTP mode

Prerequisites

Software Requirements

Autodesk Platform Services

  • An APS account (free at aps.autodesk.com)
  • An APS application with:
    • App Type: Single Page Application is recommended(for PKCE authentication)
    • Callback URL: http://localhost:8080/api/auth/callback/
    • APIs Enabled: Data Management API, AEC Data Model API, Model Derivative API
  • Access to ACC (Autodesk Construction Cloud) projects

AEC Data Model Geometry(beta)

Autodesk Assistant

  • Get your access to Autodesk Assistant staging version

Provisioning

Installation

git clone https://github.com/JohnOnSoftware/aps-aecdm-mcp-dotnet.git
cd aps-aecdm-mcp-dotnet

Setup

1. Set Environment Variables

You need to configure your APS credentials as environment variables, or you can set these in Properties/launchSettings.json:

{
  "profiles": {
    "mcp-server-aecdm": {
      "commandName": "Project",
      "environmentVariables": {
        "CLIENT_ID": "your_aps_pkce_client_id",
        "CALLBACK_URL": "http://localhost:8080/api/auth/callback/"
      }
    }
  }
}

2. Running with AI Agent

Claude Desktop

  • To connect this MCP server with Claude Desktop, add the following to your claude_desktop_config.json file:
    {
      "mcpServers": {
        "aecdm": {
          "command": "dotnet",
          "args": [
            "run",
            "--project",
            "C:\\path-to-your-folder\\...mcp-server-aecdm.csproj",
            "--no-build"
          ]
        }
      }
    }
  • Build the project with dotnet build
  • Run Claude Desktop and enable the MCP server aecdm
  • Play with it.

Autodesk Assistant(Staging, Autodesk Internal Only)

  • Build the project with dotnet build
  • Run the App with dotnet run --http
  • Open the browser without CORS, for Chrome please refer here
  • Test in the browser by http://127.0.0.1:4000/mcp/health, you should get the status of this MCP server.
  • Run Autodesk Assistant if everything is good, enable MCP.
  • Play with it.

Workflow Scenario from AI agent

  • Please find my design "Sample.rvt" from ACC project "Sample Project”, and render it in the viewer.
  • Show me all the stairs in the design and highlight them.
  • Now list me all the rooms from this design.
  • Please check last 5 stairs and tell me which are inside room "Stair S1”.
  • Highlight the contained stairs in the viewer.
  • Please export all the Doors from this design to IFC file with file name “DoorsSample”
  • Upload this IFC file to Autodesk Docs, under same project.

Troubleshooting

  • Can't find my hub -- Solution: Ensure your APS app is provisioned in your ACC hub. This must be done by an ACC administrator.
  • Code changes not reflected in Claude -- Solution: Completely quit Claude Desktop (check Task Manager/Activity Monitor), Rebuild your project: dotnet build, Restart Claude Desktop
  • Port conflicts (8081/8082), Viewer tools fail if ports are already in use --Solution: Close applications using these ports or modify port numbers in ViewerTool.cs.
  • Element IDs vs File Version URNs, Some tools require element group IDs, not file version URNs -- Solution: Use the ID from GetElementGroupsByProject, not the fileVersionUrn field.

Video Tutorial

📺 Watch the Demo Video - See the MCP server in action with Claude Desktop.

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Author

About

.NET MCP Server to connect with Claude Desktop and AEC Data Model API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%