devcon workshop mcp

๐Ÿš€ MCP Server with Autodesk Platform Services (APS)

Node.jsMCPLicenseStatus

๐Ÿ“Œ 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

MCP Server ยท Populars

MCP Server ยท New

    kridaydave

    File Organizer MCP Server

    This MCP server will organize your files using connections to MCP using clients like Claude, Cursor and Gemini Cli

    Community kridaydave
    higress-group

    AI Gateway

    ๐Ÿค– AI Gateway | AI Native API Gateway

    Community higress-group
    raine

    consult-llm

    MCP server for consulting powerful reasoning models in Claude Code

    Community raine
    sipyourdrink-ltd

    bernstein

    Deterministic orchestrator for 30+ CLI AI coding agents. Git worktree isolation, HMAC audit trail, MCP server mode.

    Community sipyourdrink-ltd
    wxtsky

    byob

    Bring Your Own Browser โ€” let your AI agent use the Chrome you already have open

    Community wxtsky