AP

autodesk-platform-services/au2026-mcp-workshop-advanced

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 5 forks 质量 61 趋势 21

APS MCP Workshop — Advanced Session (AU2026)

概览

An MCP (Model Context Protocol) server that exposes Autodesk Forma project data over , acting on behalf of a signed-in Autodesk user. Built for the AU2026 advanced workshop, starting from the code the beginner session produces. The server connects GitHub Copilot (or any MCP-compatible client) to the hubs and projects the signed-in user can see, and can render designs as interactive 3D previews directly in chat. Clients must sign in through the server's own OAuth endpoints before they can call a tool. viewer.html is registered as an MCP app resource under ui://aps-mcp/viewer.html. preview-design references it via _meta.ui.resourceUri, so a client that supports MCP Apps renders the viewer in a panel and feeds the tool's structuredContent to it. Selecting an object in 3D reports back to the host as extra model context. There is no build step. mcp.js reads viewer.html from disk at module load, and the one browser-side library it needs is loaded from a CDN. - Node.

README

以下为原文 README 节选,完整内容请查看原文。

APS MCP Server (Advanced)

An MCP (Model Context Protocol) server that exposes Autodesk Forma project data over Streamable HTTP, acting on behalf of a signed-in Autodesk user. Built for the AU2026 advanced workshop, starting from the code the beginner session produces.

What it does

The server connects GitHub Copilot (or any MCP-compatible client) to the hubs and projects the signed-in user can see, and can render designs as interactive 3D previews directly in chat. Clients must sign in through the server’s own OAuth endpoints before they can call a tool.

MCP tools

Tool Inputs Description
list-hubs-projects — Lists all hubs and their projects accessible to the authenticated user
list-folder-contents hubId, projectId, folderId? Lists folder contents; omit folderId to get top-level folders
preview-design projectId, designId, region? Returns a payload the embedded APS Viewer UI uses to load the model

Viewer UI resource

viewer.html is registered as an MCP app resource under ui://aps-mcp/viewer.html. preview-design references it via _meta.ui.resourceUri, so a client that supports MCP Apps renders the viewer in a panel and feeds the tool’s structuredContent to it. Selecting an object in 3D reports back to the host as extra model context.

There is no build step. mcp.js reads viewer.html from disk at module load, and the one browser-side library it needs is loaded from a CDN.

Prerequisites

  • Node.js 24+
  • An APS application with data:read scope (create one here), with a Callback URL of /auth/callback
  • An Autodesk Forma hub your APS app is provisioned to, and membership of at least one project in it — the 3-legged flow uses your permissions

Setup

Create a .env file at the project root:

APS_CLIENT_ID=your-client-id
APS_CLIENT_SECRET=your-client-secret

Then:

npm install
npm start
Variable Required Default
APS_CLIENT_ID yes —
APS_CLIENT_SECRET yes —
PORT no 3000
PUBLIC_URL no http://localhost:

The start script loads .env via Node’s --env-file-if-exists flag, so any of these can go there. .env is gitignored; the code only ever reads process.env. Where the variables are already in the environment — a Codespace with repository secrets, a container — no .env is needed and Node skips it.

在 GitHub 查看完整 README

安装

npx serve docs -l 4000
新手?先看 mcpskill.org 教程 →