AS

aws-samples/sample-multi-tenant-saas-mcp-server

Developer tools公式

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

20 stars 10 forks 品質 66 トレンド 30MIT-0

Amazon CognitoとAWSでホストされているAmazon BedrockでマルチテナントリモートMCPサーバー

概要

このリポジトリには、TypeScript SDK で書かれた Streamable HTTP トランスポートを使用したマルチテナントリモート MCP サーバーの実装が含まれています。 Amazon CognitoとOAuth 2.1によるマルチテナント認証と認可を備えたB2B旅行予約用のリモートMCPサーバーの実装。 - AWSサービス:ECS、DynamoDB、S3、Cognito - 保護されたメタデータリソース処理() - データ分離によるマルチテナントアーキテクチャ - 動的クライアント登録() - OpenID設定エンドポイント() 詳細なアーキテクチャの概要については、MCP Server README を参照してください。 出力 URL ([https://mc-xxx.ecs.] .on.aws) に注意してください。 管理ユーザスクリプトでユーザーを作成します。 +tenantname suffix はテナント ID (ユーザー管理参照) になります。 デプロイされたサーバーに接続する2つの方法。 プロトコルレベルの検査 — ツール/リソース/プロンプトを参照してください。手動で呼び出し、ループ内のLLMは使用しません.

概要(AI 翻訳)

このリポジトリには、TypeScript SDK で書かれた Streamable HTTP トランスポートを使用したマルチテナントリモート MCP サーバーの実装が含まれています。

#MCP サーバー

Amazon CognitoとOAuth 2.1によるマルチテナント認証と認可を備えたB2B旅行予約用のリモートMCPサーバーの実装。

  • ツール、リソース、プロンプトの Express および MCP SDK を使用した Node.js
  • AWSサービス:ECS、DynamoDB、S3、Cognito
  • 保護されたメタデータ資源の処理(RFC 9728)
  • データ分離によるマルチテナントアーキテクチャ
  • 動的クライアント登録(RFC 7591)
  • 登録エンドポイントを広告するOpenID構成エンドポイント(RFC 8414)

詳細なアーキテクチャの概要については、MCP Server README を参照してください。

デプロイ

出力 URL ([https://mc-xxx.ecs. .on.aws]) に注意してください。 管理ユーザスクリプトでユーザーを作成します。

[+tenantname suffix はテナント ID (ユーザー管理を参照) になります。

試してみる

デプロイされたサーバーに接続する2つの方法。

##1. MCPインスペクタ

プロトコルレベルの検査 — ツール/リソース/プロンプトを参照してください。手動で呼び出し、ループ内のLLMは使用しません。

印刷する URL を開き、[https://mc-xxx.ecs. .on.aws/mcp] を貼り付け、OAuth フローを完了し、ツールを実行します。

##2.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

Multi-Tenant (SaaS) MCP Server Sample

This repository contains a multi-tenant remote MCP server implementation using the Streamable HTTP transport written with the TypeScript SDK.

MCP Server

A remote MCP server implementation for B2B travel booking with multi-tenant authentication and authorization via Amazon Cognito and OAuth 2.1.

  • Node.js with Express and MCP SDK for tools, resources and prompts
  • AWS services: ECS, DynamoDB, S3, Cognito
  • Protected Metadata Resource handling (RFC 9728)
  • Multi-tenant architecture with data isolation
  • Dynamic client registration (RFC 7591)
  • OpenID Configuration endpoint to advertise the registration endpoint (RFC 8414)

For a detailed architecture overview, see the MCP Server README.

Deploy

cd mcp_server/infra
npm install
./deploy.sh

Note the output URL (https://mc-xxx.ecs..on.aws). Create a user with the manage-users script:

cd mcp_server/scripts
npm install
node manage-users.js create myuser [email protected]

The +tenantname suffix becomes the tenant ID (see User Management).

Try it

Two ways to connect to the deployed server.

1. MCP Inspector

For protocol-level inspection — see tools/resources/prompts, invoke them manually, no LLM in the loop.

npx @modelcontextprotocol/inspector

Open the URL it prints, paste https://mc-xxx.ecs..on.aws/mcp, complete the OAuth flow, exercise tools.

2. Amazon Quick Suite

For end-to-end chat with the MCP tools. The Quick Suite MCP client handles OAuth 2.1 + PKCE + Dynamic Client Registration automatically.

  1. Open Amazon Quick Suite → Connections → Integrations → Actions.
  2. Choose Model Context Protocol → +.
  3. MCP server endpoint: https://mc-xxx.ecs..on.aws/mcp
  4. Authentication: User authentication (OAuth). Leave credentials blank — DCR will register Quick automatically.
  5. Approve in the Cognito hosted UI when prompted.
  6. Quick discovers all tools (whoami, find_flights, book_flight, list_hotels, book_hotel, list_bookings, loyalty_info).

Full setup reference: Model Context Protocol (MCP) integration.

Disclaimer

This repository is for demonstration and reference purposes only. The code and configurations provided are not intended for production use without proper review, testing, and security considerations.

Contributing

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

GitHub で README 全文を見る

インストール

npx @modelcontextprotocol/inspector
MCP 初心者?mcpskill.org のガイドから始めましょう →