Skip to main content
Glama
latesh-munde

Devcon MCP Workshop 2026

by latesh-munde

🚀 Autodesk Platform Services (APS) 対応 MCP サーバー

Node.js MCP License Status


📌 概要

本プロジェクトは、以下の機能を備えた Model Context Protocol (MCP) サーバー を実装しています:

  • LLMクライアント(例:VS Code Copilot)向けのツール公開

  • 外部API統合

  • Autodesk Platform Services (APS) 接続

  • 認証フロー(2-legged & 3-legged OAuth)

  • カスタムクライアント + エージェントアーキテクチャ

これは、本番環境向けのAIエージェントバックエンドシステムを体現しています。


Related MCP server: RevitMCPBridge2026

🧠 アーキテクチャ

🔷 全体フロー


+------------------------+
| LLM Client (VSCode)    |
| Copilot / Chat UI      |
+-----------+------------+
            |
            v
+------------------------+
| MCP Server             |
| (server.js / aps)      |
+-----------+------------+
            |
------------------------------------------------
      |                |                |
      v                v                v
+-------------+ +-------------+ +----------------+
| External    | |   APS APIs  | |  Custom Logic  |
| APIs        | | (OAuth)     | |   / Tools      |
+-------------+ +-------------+ +----------------+

🔷 エージェントフロー

User Prompt
↓
LLM decides tool
↓
MCP Server executes tool
↓
External API / APS call
↓
Structured response → LLM → User

📁 プロジェクト構造

├── .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

⚙️ 技術スタック

  • Node.js (ES Modules)

  • Model Context Protocol (MCP SDK)

  • Zod (スキーマバリデーション)

  • HTTPストリーミングトランスポート

  • Autodesk Platform Services (APS)


🔑 主要コンポーネント

1. server.js

  • MCPサーバーのコア

  • ツールの登録

  • クライアントリクエストの処理


2. aps-server.js

  • Autodesk APIの統合

  • OAuth (2L + 3L) の処理

  • セキュアなAPI通信


3. agent.js

  • エージェントの挙動の実装

  • 呼び出すツールの判断

  • マルチステップワークフローの有効化


4. client.js

  • カスタムMCPクライアント

  • VS Codeクライアントのシミュレーションまたは代替が可能


5. .vscode/mcp.json

  • VS CodeとMCPサーバーの接続


🚀 はじめに

1️⃣ 依存関係のインストール

npm install

2️⃣ 環境設定

.envファイルを作成します:

PORT=3000

# APS Credentials
APS_CLIENT_ID=your_client_id
APS_CLIENT_SECRET=your_client_secret

# External APIs
GEMINI_API_KEY=your_key

3️⃣ サーバーの実行

node server.js

期待される出力:

MCP server running at http://localhost:3000/mcp

4️⃣ VS Codeの設定

以下を作成します:

.vscode/mcp.json

{
  "servers": {
    "devcon-workshop": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    },
    "devcon-aps": {
      "type": "http",
      "url": "http://localhost:3001/mcp"
    }
  }
}

5️⃣ ツールのテスト

Copilotチャットにて:

#add 10 and 20
#greet John in spanish
What's the weather in London?

🧩 ツール設計パターン

server.registerTool(
"tool_name",
{
description: "Tool description",
inputSchema: {
param: z.string()
}
},
async ({ param }) => ({
content: [{ type: "text", text: "Result" }]
})
);

🔐 認証

✅ 2-Legged OAuth

サーバー間通信

ユーザー操作不要

✅ 3-Legged OAuth

ユーザーの同意が必要

詳細な権限設定

本番環境で推奨


🏗️ 本番環境での考慮事項

🔹 スケーラビリティ

ステートレスアーキテクチャ

水平スケーリングが可能

🔹 セキュリティ

シークレットには.envを使用

ユーザーデータには3LOを推奨

🔹 信頼性

入力バリデーション (Zod)

構造化されたレスポンス

🔹 可観測性

ツール実行のログを追加

APIエラーの監視


🎯 特徴

✔ MCP準拠サーバー

✔ 外部API統合

✔ APS接続

✔ エージェントベースの実行

✔ カスタムクライアントサポート


🔮 今後の拡張予定

アプリケーションのDocker化

Azure / AWSへのデプロイ

データベースバックエンドツールの追加

キャッシュ層の実装

📜 ライセンス

MITライセンス


🙌 謝辞

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers