Content
# Demo SF: Strands Agents & MCP Lambda Demos
Welcome! This repository is a hands-on collection of demos and sample code for building, deploying, and experimenting with AI agents and Model Context Protocol (MCP) servers using AWS and the open-source Strands Agents SDK.
**Note:** Many parts of this repository require valid AWS credentials to run. Please ensure your AWS CLI is configured and you have the necessary permissions for Lambda, API Gateway, DynamoDB, and Amazon Bedrock.
---
## Repository Structure
This repo is organized into several directories, each demonstrating a different concept or integration:
### 1. `1-mcp-lambda-basic/`
A minimal example of an MCP server implemented as an AWS Lambda function using the [`awslabs.mcp-lambda-handler`](https://awslabs.github.io/mcp/) library. This is the simplest starting point for building your own MCP-compliant Lambda endpoints.
### 2. `2-mcp-lambda-dice-sam/`
A more advanced, deployable demo of an MCP server using AWS Lambda and API Gateway, managed with AWS SAM (Serverless Application Model). Features include:
- MCP-compliant API for dice rolling and session management
- Custom Lambda authorizer (token-based)
- DynamoDB-backed session storage
See the detailed [README in this folder](2-mcp-lambda-dice-sam/README.md) for setup and deployment instructions.
### 3. `3-strands-basic/`
Sample code and examples for [Strands Agents](https://strandsagents.com/), an open source SDK for building, testing, and deploying AI agents. These examples show how to define agents, connect to various models (including Amazon Bedrock), and use MCP tools or custom Python functions.
### 4. `4-strands-dice/`
A demonstration agent that interacts with the MCP dice server. This agent uses Strands Agents and is designed to work with the MCP server deployed from the previous steps. It uses Amazon Bedrock by default, so AWS credentials are required.
---
## What You'll Learn
- How to build and deploy MCP-compliant servers on AWS Lambda
- How to use AWS SAM for serverless deployments
- How to create and run AI agents using the Strands Agents SDK
- How to connect agents to MCP servers and leverage cloud-hosted models (e.g., Amazon Bedrock)
- Best practices for integrating authentication, session management, and cloud resources
---
## Prerequisites
- **AWS Account & Credentials:** You must have an AWS account and configure your credentials (see [AWS CLI setup](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html)).
- **Python 3.12+**
- **AWS CLI** and **AWS SAM CLI** (for serverless deployments)
---
## Security Notice
This repository contains concept/demo code. Authentication and authorization mechanisms are simplified for demonstration purposes. **Do not use as-is for production workloads.** Review and implement appropriate security controls before deploying in any real environment.
---
## Getting Started
Each subdirectory contains its own README with setup and usage instructions. Start with `1-mcp-lambda-basic/` for the simplest example, or jump to `2-mcp-lambda-dice-sam/` for a full serverless deployment.
---
## Learn More
- [Strands Agents Website](https://strandsagents.com/)
- [Strands Agents GitHub](https://github.com/strandsagents/strands-agents)
- [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)
- [AWS Lambda](https://aws.amazon.com/lambda/)
- [AWS SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html)
---
Enjoy exploring, learning, and building!
---
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.
git
A Model Context Protocol server for Git automation and interaction.