About Fastmcp Lambda
Fastmcp Lambda is an MCP server in the Cloud category: production-ready MCP server for AWS Lambda. Deploy FastMCP with Lambda Web Adapter using the included deployment script.
Install
git clone https://github.com/mishramohit437/fastmcp-lambdaThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Tools (5)
addAdd two numbers together
Parameters not published.
get_server_detailsReturns server environment details
Parameters not published.
greetGreet someone by name
Parameters not published.
hello_worldA simple hello world tool for testing
Parameters not published.
multiplyMultiply two numbers together
Parameters not published.
Ask AI
Ask AI about Fastmcp Lambda
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
MCP FastMCP Server
An MCP (Model Context Protocol) server built with FastMCP, optimized for AWS Lambda deployment using the Lambda Web Adapter.
Features
- Serverless Ready: Optimized for AWS Lambda with
stateless_http=True - Lambda Web Adapter: Uses AWS Lambda Web Adapter for seamless Lambda integration
- Streamable HTTP: Uses
streamable-httptransport for MCP over HTTP - Multiple Tools: Includes greeting, math operations, and server details tools
- Resources & Prompts: Includes sample resources and prompts
- One-Click Deployment: Automated deployment script for AWS Lambda
Quick Start
1. Clone and Deploy to AWS Lambda
# Clone the repository
git clone https://github.com/mishramohit437/fastmcp-lambda.git
cd fastmcp-lambda
# Configure AWS CLI (first time only)
aws configure
# Deploy to AWS Lambda
./deploy_lambda.sh
The script will:
- Build the Docker image
- Push to Amazon ECR
- Create Lambda function
- Create Function URL
- Output your MCP endpoint
2. Configure Claude Desktop
Add to your MCP configuration (mcp.json or claude_desktop_config.json):
{
"mcpServers": {
"fastmcp-lambda": {
"url": "YOUR_FUNCTION_URL/mcp",
"transport": "streamable-http"
}
}
}
Replace YOUR_FUNCTION_URL with the URL output by the deployment script.
Local Development
# Install dependencies
pip install fastmcp
# Run in stdio mode (for local Claude Desktop testing)
python -m mcp_fast_mcp.server --stdio
# Run in HTTP mode (for web testing)
python -m mcp_fast_mcp.server --port 8080
Using Docker
# Build and run with Docker Compose
docker-compose up --build
# Or build manually
docker build -t mcp-fast-mcp .
docker run -p 8080:8080 mcp-fast-mcp
Available Tools
| Tool | Description |
|---|---|
hello_world |
A simple hello world tool for testing |
get_server_details |
Returns server environment details |
greet |
Greet someone by name |
add |
Add two numbers together |
multiply |
Multiply two numbers together |
Resources
| Resource | Description |
|---|---|
greeting://hello |
A simple greeting resource |
Prompts
| Prompt | Description |
|---|---|
greet_prompt |
Generate a greeting prompt for a given name |
AWS Deployment
For detailed deployment instructions, see DEPLOYMENT.md.
Prerequisites
- AWS Account with appropriate permissions
- AWS CLI installed and configured
- Docker installed
Quick Deploy
# Make script executable (if needed)
chmod +x deploy_lambda.sh
# Deploy with default region (eu-north-1)
./deploy_lambda.sh
# Or specify your region
AWS_REGION=us-east-1 ./deploy_lambda.sh
Architecture
Client → Lambda Function URL → Lambda Web Adapter → FastMCP Server → Response
(HTTPS) (Container) (streamable-http)
Components:
- ECR: Container registry for Docker images
- Lambda: Serverless compute running FastMCP
- Function URL: Direct HTTPS endpoint
- IAM Role: Basic execution role with CloudWatch logs
Configuration
Key Settings
| Setting | Value | Description |
|---|---|---|
| PORT | 8080 | Server port (Lambda Web Adapter default) |
| Transport | streamable-http | MCP transport for Lambda compatibility |
| Stateless | True | Serverless optimization |
| Platform | linux/amd64 | Lambda architecture |
Environment Variables
| Variable | Default | Description |
|---|---|---|
| PORT | 8080 | Server port |
| HOST | 0.0.0.0 | Server host |
| AWS_REGION | eu-north-1 | AWS region for deployment |
Development
Project Structure
fastmcp-lambda/
├── mcp_fast_mcp/
│ ├── __init__.py
│ └── server.py # Main server with tools
├── Dockerfile # Lambda Web Adapter setup
├── deploy_lambda.sh # Deployment script
├── docker-compose.yml # Local Docker testing
├── DEPLOYMENT.md # Detailed AWS deployment guide
├── pyproject.toml # Project config
└── README.md # This file
Adding New Tools
@mcp.tool()
def your_tool(param: str) -> str:
"""Tool description."""
return f"Result: {param}"
Adding New Resources
@mcp.resource("your-resource://path")
def your_resource() -> str:
"""Resource description."""
return "Resource content"
Maintenance
Update the Deployment
# Make changes to your code
# Rebuild and redeploy
./deploy_lambda.sh
View Logs
# CloudWatch Logs (replace with your region)
aws logs tail /aws/lambda/mcp-fast-mcp --region us-east-1 --follow
Cost Estimation
| Service | Free Tier | Paid |
|---|---|---|
| Lambda Requests | 1M requests/month | $0.20 per 1M requests |
| Lambda Duration | 400K GB-seconds/month | $0.00001667/GB-second |
| Function URL | 1M requests/month | $0.20 per 1M requests |
Estimated cost for 10K requests/month: ~$0 (within free tier)
License
MIT
Links
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.