run-model-context-protocol-servers-with-aws-lambda

Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions

GitHub Stars

296

User Rating

Not Rated

Favorites

0

Views

30

Forks

34

Issues

4

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes

Installation

Installation

Prerequisites

Please specify required software and versions:
Python: 3.8 or higher
AWS CLI: Latest version

Installation Steps

1. Clone Repository

bash
git clone https://github.com/awslabs/run-model-context-protocol-servers-with-aws-lambda.git
cd run-model-context-protocol-servers-with-aws-lambda

2. Install Dependencies

bash
pip install -r requirements.txt

3. Configure AWS Lambda

Use AWS CLI to deploy the Lambda function.
bash
aws lambda create-function --function-name MyMCPFunction --runtime python3.8 --role  --handler lambda_function.lambda_handler --zip-file fileb://function.zip

Troubleshooting

Common Issues

Issue: Lambda function is not invoked correctly Solution: Check the IAM role permissions and ensure the necessary access rights are granted.

Additional Resources