mcp-use-aps-example
mcp-use + APS 認可の例
このスタンドアロンの例では、Agent Passport System の aps-mcp-1 プロファイルを、既存の mcp-use TypeScript ミドルウェアシームの背後に配置します。ゲートウェイは vault_echo ツールをプロキシし、next() がアップストリームサーバーに到達する前に、署名付きの一回限りの認可エンベロープを検証します。
実行
npm install
npm test
npm run dev表示された URL を開くと、組み込みの mcp-use Inspector を使用できます。
メッセージを指定して
issue_aps_demo_grantを呼び出します。その構造化された結果を
vault_echoにコピーします。vault_echoを実行します。APS ミドルウェアは、ディスパッチ前に署名、ターゲット、引数ハッシュ、有効期限、スコープ、リプレイ状態を検証します。同じリクエストをもう一度実行すると、アップストリームが呼び出される前にリプレイが拒否されるのを確認できます。
Related MCP server: auth0-3lo-mcp-server
Inspector 互換性
APS MCP プロファイルは通常、そのエンベロープを次の場所に格納します:
tools/call.params._meta["org.agent-passport/authorization"]現在の Inspector フォームでは、呼び出しごとの任意の _meta を公開できません。インタラクティブなデモンストレーション専用として、このリポジトリは同一のエンベロープを apsAuthorization ツール引数として受け取り、ミドルウェア内で名前空間付きの _meta エントリに移動し、転送前にそれを削除します。本番の MCP クライアントは _meta を直接送信する必要があります。
この localhost デモでは、トランスポート認証はすでに確立されているものとして扱います。本番コードでは OAuth を構成し、検証済みのトランスポートコンテキスト(ctx.auth)からその事実を導出する必要があります。
APS は独立したサードパーティのプロジェクトであり、MCP や mcp-use の一部ではありません。
This server cannot be deployed
Maintenance
Related MCP Connectors
Issue Agent Passports and verify agent authority before value moves. Signed verification records.
Scoped agent execution. Server-side credentials, policy, budgets and verifiable receipts.
Preflight, approve, and prove consequential agent actions with signed evidence and x402 tools.
Prove end users to agents and apps: login-links, OIDC clients, and API keys over remote MCP
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAuthenticating reverse proxy for MCP servers providing credential isolation, OAuth2 token management, and composite tool aggregation.BSD Zero Clause
- FlicenseNot gradedqualityCmaintenanceDemonstrates the AgentCore Gateway 3-Legged OAuth flow with Auth0, exposing whoami and echo tools for end-to-end authorization code testing.-
- AlicenseNot gradedqualityBmaintenanceEnables agents to self-provision tenancies via a single tool call and then publish, list, inspect, call, and remove their own echo, HTTP, and Python tools at runtime, with per-tenant namespaces, stateless streamable-HTTP transport, and admin metering.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides a policy-controlled MCP gateway that lets agents invoke tools with explicit policies, bounded execution, scoped visibility, and decision receipts.MIT