manaty226/remote-mcp-based-on-aws-managed-services
If you are the rightful owner of remote-mcp-based-on-aws-managed-services and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A simple example of a remote model context protocol server built using AWS managed services.
Remote MCP Server Sample with AWS Managed Services
This repository provides a sample implementation of a remote Model Context Protocol (MCP) server using only AWS managed services: API Gateway and Cognito. The goal is to leverage the advanced features of API Gateway to implement an authorization-enabled MCP server without requiring any additional compute resources (such as Lambda, EC2, or containers) beyond the MCP tooling itself.
Architecture
- API Gateway: Serves as the main entry point for all MCP server requests. It handles routing, request/response transformation, and integrates with Cognito for authentication and authorization.
- Cognito: Provides user authentication and authorization. API Gateway is configured to require valid Cognito tokens for access to protected endpoints.
- Lambda: Lambda is required for only the MCP tooling itself.
[Client] --(HTTPS)--> [API Gateway] --(Authorization)--> [Cognito User Pool]
|
v
[Cognito Authorizer]
|
v
[Lambda] (MCP tooling)
Getting Started
Prerequisites
- Terraform (for infrastructure as code)
- AWS account with permissions to create API Gateway and Cognito resources
Setup
-
Clone this repository:
git clone https://github.com/manaty226/remote-mcp-based-on-aws-managed-services.git cd remote-mcp-based-on-aws-managed-services
-
Initialize and apply the Terraform configuration:
cd infra terraform init terraform apply
This will provision the API Gateway, Cognito User Pool, and related resources.
-
After deployment, note the output values for the API endpoint and Cognito User Pool details.
Usage
To verify operation with MCP Inspector:
- Run MCP Inspector
npx @modelcontextprotocol/inspector
- Open MCP Inspector in your browser
- Select
Streamable HTTP
transport and enterhttps://<YOUR API GATEWAY HOST>/mcp
as the URL - Click Connect to establish a connection and then use MCP tool
To verify operation with VSCode:
- Open VSCode and edit the
.vscode/mcp.json
file - Modify it to include the following content:
{ "servers": { "get-uuid": { "url": "https://<YOUR API GATEWAY HOST>/mcp/get-uuid" } } }
- Save the file and start the MCP server
File Structure
infra/
- Terraform scripts for provisioning AWS resourcesmcp-server/
- (Optional) Sample Lambda or Dockerfile for extension (not required for core functionality)README.md
- This documentation
Notes
- This implementation is intended as a reference for building secure, serverless MCP servers using only AWS managed services.
- For advanced logic or custom processing, you may extend with Lambda or other compute resources as needed.
License
See for details.