AS

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

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

20 stars 10 forks 质量 66 趋势 30MIT-0

多Tenant远程 MCP 服务器与 Amazon Cognito 和 Amazon Bedrock 的远程客户端在 AWS 上托管

概览

这个寄存器包含一个多租户远程MCP服务器执行,使用用TypeScript SDK所写的可流式HTTP传输. 一个远程MCP服务器实施B2B出行预订,通过亚马逊·科尼通和OAuth 2.1. - 有快递和MCP SDK的节点用于工具、资源和提示 - AWS服务:ECS、DynamoDB、S3、Cognitto - 保护元数据资源处理() - 数据隔离的多租户架构 - 动态客户端注册() - OpenID配置端点以广告注册端点() 详细架构概况,见MCP服务器README. 注意输出 URL ([T0].on.aws). 创建有管理用户脚本的用户 : +tenantname后缀成为租户ID(参见用户管理). 连接到已部署服务器的两种方式. 关于协议级别的检查——见工具/资源/即时,手动引用,循环中没有LLM.

概述(AI 翻译)

这个寄存器包含一个多租户远程MCP服务器执行,使用用TypeScript SDK所写的可流式HTTP传输.

□ MCP 服务器

一个远程MCP服务器实施B2B出行预订,通过亚马逊·科尼通和OAuth 2.1.

  • 为工具、资源和提示提供快递和MCP SDK的节点
  • AWS服务:ECS、DynamoDB、S3、科尼奥托
  • 保护元数据资源处理(RFC 9728)
  • 具有数据隔离的多租户结构
  • 动态客户登记(RFC 7591)
  • OpenID配置端点,为注册端点作广告(RFC 8414)

详细架构概况,见MCP服务器README.

□ 部署

注意输出 URL ([T0]). 创建有管理用户脚本的用户 :

+tenantname后缀成为租户ID(参见用户管理).

∮试试看∮

连接到已部署服务器的两种方式.

  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
新手?先看 mcpskill.org 教程 →