๐ MCP Server with Autodesk Platform Services (APS)
๐ Overview
This project implements a Model Context Protocol (MCP) server with support for:
- Tool exposure for LLM clients (e.g., VS Code Copilot)
- External API integration
- Autodesk Platform Services (APS) connectivity
- Authentication flows (2-legged & 3-legged OAuth)
- Custom client + agent architecture
It represents a production-oriented agentic AI backend system.
๐ง Architecture
๐ท High-Level Flow
+------------------------+
| LLM Client (VSCode) |
| Copilot / Chat UI |
+-----------+------------+
|
v
+------------------------+
| MCP Server |
| (server.js / aps) |
+-----------+------------+
|
------------------------------------------------
| | |
v v v
+-------------+ +-------------+ +----------------+
| External | | APS APIs | | Custom Logic |
| APIs | | (OAuth) | | / Tools |
+-------------+ +-------------+ +----------------+
๐ท Agent Flow
User Prompt
โ
LLM decides tool
โ
MCP Server executes tool
โ
External API / APS call
โ
Structured response โ LLM โ User
๐ Project Structure
โโโ .vscode/
โ โโโ mcp.json # MCP configuration for VS Code client
โ
โโโ node_modules/ # Installed dependencies
โ
โโโ .env # Environment variables (API keys, secrets)
โโโ .gitignore # Git ignored files
โ
โโโ agent.js # Agent logic (tool orchestration)
โโโ aps-server.js # APS integration server (OAuth + APIs)
โโโ client.js # Custom MCP client implementation
โโโ server.js # Core MCP server (tool definitions)
โ
โโโ package.json # Project metadata & dependencies
โโโ package-lock.json # Dependency lock file
โ๏ธ Tech Stack
- Node.js (ES Modules)
- Model Context Protocol (MCP SDK)
- Zod (schema validation)
- HTTP Streaming Transport
- Autodesk Platform Services (APS)
๐ Key Components
1. server.js
- Core MCP server
- Registers tools
- Handles client requests
2. aps-server.js
- Integrates Autodesk APIs
- Handles OAuth (2L + 3L)
- Secure API communication
3. agent.js
- Implements agentic behavior
- Decides which tools to call
- Enables multi-step workflows
4. client.js
- Custom MCP client
- Can simulate or replace VS Code client
5. .vscode/mcp.json
- Connects VS Code โ MCP server
๐ Getting Started
1๏ธโฃ Install Dependencies
npm install
2๏ธโฃ Setup Environment
Create .env file:
PORT=3000
# APS Credentials
APS_CLIENT_ID=your_client_id
APS_CLIENT_SECRET=your_client_secret
# External APIs
GEMINI_API_KEY=your_key
3๏ธโฃ Run Server
node server.js
Expected output:
MCP server running at http://localhost:3000/mcp
4๏ธโฃ Configure VS Code
Create:
.vscode/mcp.json
{
"servers": {
"devcon-workshop": {
"type": "http",
"url": "http://localhost:3000/mcp"
},
"devcon-aps": {
"type": "http",
"url": "http://localhost:3001/mcp"
}
}
}
5๏ธโฃ Test Tools
In Copilot Chat:
#add 10 and 20
#greet John in spanish
What's the weather in London?
๐งฉ Tool Design Pattern
server.registerTool(
"tool_name",
{
description: "Tool description",
inputSchema: {
param: z.string()
}
},
async ({ param }) => ({
content: [{ type: "text", text: "Result" }]
})
);
๐ Authentication
โ 2-Legged OAuth
Server-to-server
No user interaction
โ 3-Legged OAuth
User consent required
Fine-grained permissions
Recommended for production
๐๏ธ Production Considerations
๐น Scalability
Stateless architecture
Horizontal scaling possible
๐น Security
Use .env for secrets
Prefer 3LO for user data
๐น Reliability
Input validation (Zod)
Structured responses
๐น ObservabilityAdd logging for tool execution
Monitor API failures
๐ฏ Features
โ MCP-compliant server
โ External API integration
โ APS connectivity
โ Agent-based execution
โ Custom client support
๐ฎ Future Enhancements
Dockerize the application
Deploy on Azure / AWS
Add database-backed tools
Implement caching layer
๐ License
MIT License
๐ Acknowledgements
Autodesk Platform Services (APS) https://autodesk-platform-services.github.io/mcp-devcon2026/
Model Context Protocol (MCP)
OpenAI / LLM ecosystem