Enables deployment and management of MCP servers on Amazon Bedrock AgentCore, providing a gateway to wrap AWS Lambda functions as standardized tools.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Amazon Bedrock AgentCore MCP Gatewaycheck the stock price for AMZN"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server POC for Amazon Bedrock AgentCore
This POC demonstrates deployment and management of Model Context Protocol (MCP) servers on Amazon Bedrock AgentCore using the Gateway method.
Overview
The Model Context Protocol (MCP) provides a standardized interface for AI applications to access tools, resources, and enterprise data sources. This solution implements:
Gateway Method: Wraps existing Lambda functions or REST APIs as MCP tools, handling protocol translation automatically
MCP Server: Direct implementation using FastMCP framework
Architecture
Components
MCP Gateway (
gateway/): Translates MCP protocol to Lambda/REST API callsMCP Server (
server/): Direct MCP server implementation using FastMCPExample Tools (
tools/): Sample Lambda functions and REST APIsInfrastructure (
infrastructure/): AWS SAM templates for deployment
Prerequisites
Python 3.11+
AWS CLI configured
AWS SAM CLI installed
Docker (for local testing)
Quick Start
1. Install Dependencies
2. Deploy Infrastructure
Option A: Using AWS SAM (Recommended for beginners)
Option B: Using Terraform
See TERRAFORM_QUICKSTART.md for detailed Terraform deployment guide with Python dependencies layer configuration.
3. Test MCP Gateway
Project Structure
Gateway Method
The Gateway method automatically:
Translates MCP tool calls to Lambda invocations
Translates MCP tool calls to REST API requests
Handles authentication and error handling
Provides unified interface for multiple backends
Example Usage
Registering a Lambda Function as MCP Tool
Registering a REST API as MCP Tool
Testing
Run the test suite:
Test the gateway locally:
Deployment
Terraform: See
TERRAFORM_QUICKSTART.mdfor quick Terraform deployment (includes Python dependencies layer)SAM: See
DEPLOYMENT.mdfor detailed SAM deployment instructionsTerraform Details: See
terraform/README.mdfor comprehensive Terraform guide
License
MIT