# Quick Start Guide
Get the MCP Gateway POC running in 5 minutes!
## Prerequisites Check
```bash
# Check Python version (need 3.11+)
python3 --version
# Check AWS CLI
aws --version
# Check SAM CLI
sam --version
```
## Quick Start Steps
### 1. Install Dependencies
```bash
pip install -r requirements.txt
```
### 2. Test Locally (No AWS Required)
```bash
# Test the gateway functionality
python test_gateway.py
# Run example usage
python examples/example_usage.py
```
### 3. Run REST API Server (Optional)
In one terminal:
```bash
python -m tools.rest_apis.rest_server
```
In another terminal, test it:
```bash
curl http://localhost:8000/health
```
### 4. Deploy to AWS (Optional)
**Option A: Using AWS SAM**
```bash
cd infrastructure
sam build
sam deploy --guided
```
**Option B: Using Terraform** (Recommended for production)
```bash
# See TERRAFORM_QUICKSTART.md for detailed instructions
cd terraform
cp terraform.tfvars.example terraform.tfvars
terraform init
terraform apply
```
**Note**: Tools are automatically registered when the Lambda function loads. No manual registration needed!
## What You Get
✅ **MCP Gateway**: Protocol translation layer
✅ **Example Tools**: Weather, Calculator, Data Lookup
✅ **REST API Server**: Example REST endpoints
✅ **Infrastructure**: AWS SAM templates
✅ **Test Scripts**: Ready-to-use test examples
## Key Files
- `gateway/gateway.py` - Main gateway implementation
- `gateway/lambda_handler.py` - AWS Lambda handler
- `tools/` - Example Lambda functions and REST APIs
- `infrastructure/template.yaml` - AWS deployment template
- `test_gateway.py` - Test script
## Next Steps
1. **Customize Tools**: Add your own Lambda functions or REST APIs
2. **Deploy**: Follow DEPLOYMENT.md for full AWS deployment
3. **Integrate**: Connect to Bedrock AgentCore
## Example: Register Your Own Tool
```python
from gateway.gateway import MCPGateway
gateway = MCPGateway()
# Register Lambda function
gateway.register_lambda_tool(
name="my_tool",
lambda_arn="arn:aws:lambda:us-east-1:123456789:function:MyFunction",
description="My custom tool",
input_schema={
"type": "object",
"properties": {
"input": {"type": "string"}
},
"required": ["input"]
}
)
# Register REST API
gateway.register_rest_tool(
name="my_api",
endpoint="https://api.example.com/endpoint",
description="My REST API tool",
input_schema={
"type": "object",
"properties": {
"query": {"type": "string"}
}
}
)
```
## Troubleshooting
**Import errors?**
```bash
pip install -r requirements.txt
```
**AWS errors?**
- Check AWS credentials: `aws configure list`
- Verify IAM permissions
**Port already in use?**
- Change port in rest_server.py or stop other services
## Learn More
- See `README.md` for full documentation
- See `TERRAFORM_QUICKSTART.md` for Terraform deployment (includes Python dependencies layer)
- See `DEPLOYMENT.md` for SAM deployment details
- See `examples/example_usage.py` for code examples