Automatically recommend and generate AWS FIS experiment templates
FIS Recommender MCP Server
An MCP (Model Context Protocol) server that automatically recommends AWS Fault Injection Simulator (FIS) experiments based on DevOps Agent findings. Helps teams quickly design chaos engineering experiments to validate system resilience.
Features
- 🔍 Analyzes DevOps findings and suggests relevant FIS experiments
- 🎯 Maps issues to appropriate fault injection actions
- 📋 Generates complete FIS experiment templates
- ⚡ Integrates seamlessly with Kiro CLI and other MCP clients
Deployment Options
Option 1: MCP Server (for DevOps Agent)
Deploy MCP Server
# Install toolkit
pip install bedrock-agentcore-starter-toolkit
# Configure and deploy
agentcore configure -e server.py --protocol MCP
agentcore launch
Setup OAuth (Cognito)
chmod +x setup_cognito.sh
source setup_cognito.sh
Save the output (Client ID, Discovery URL, Bearer Token).
Register in DevOps Agent Console
- Go to AIDevOps → Your Agent → Settings → MCP Servers
- Add Server:
- Endpoint:
https://bedrock-agentcore.{REGION}.amazonaws.com/runtimes/{ENCODED_ARN}/invocations - Client ID: From step 2
- Exchange URL:
https://{COGNITO_DOMAIN}.auth.{REGION}.amazoncognito.com/oauth2/token - Authorization URL:
https://{COGNITO_DOMAIN}.auth.{REGION}.amazoncognito.com/oauth2/authorize - Scopes:
openid - PKCE: Enabled
- Endpoint:
Test
Ask DevOps Agent:
"Recommend FIS experiments for network latency issues"
See Setup Guide for complete deployment instructions.
Option 2: Lambda Client (for API Gateway, EventBridge)
chmod +x deploy_lambda.sh
./deploy_lambda.sh
# Test
aws lambda invoke --function-name fis-recommender-mcp-client --region {REGION} \
--payload '{"tool":"recommend_fis_experiments","arguments":{"finding":{"summary":"network latency"}}}' \
response.json && cat response.json
See Lambda Deploy Guide for detailed instructions.
Local Development
Clone the Repository
git clone https://github.com/pimisael/fis-recommender-mcp.git
cd fis-recommender-mcp
chmod +x server.py
Configure MCP Client
For Kiro CLI
Add to ~/.kiro/mcp-servers.json:
{
"mcpServers": {
"fis-recommender": {
"command": "python3",
"args": ["/absolute/path/to/fis-recommender-mcp/server.py"],
"env": {
"AWS_REGION": "us-east-1"
}
}
}
}
For Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"fis-recommender": {
"command": "python3",
"args": ["/absolute/path/to/fis-recommender-mcp/server.py"],
"env": {
"AWS_REGION": "us-east-1"
}
}
}
}
Usage Examples
Example 1: Network Latency Issue
Prompt:
I have a DevOps finding about network latency causing timeouts in my application.
Can you recommend FIS experiments to test this?
Finding details:
- ID: finding-001
- Summary: "High network latency between services causing request timeouts"
- Type: NETWORK_ISSUE
Response: The MCP server will recommend:
- Action:
aws:network:disrupt-connectivity - Duration: 10 minutes
- Target: Network interfaces
- Stop condition: CloudWatch alarm on error rate
Example 2: Database Availability
Prompt:
Recommend FIS experiments for this finding:
{
"id": "finding-db-001",
"summary": "Database connection failures during peak load",
"type": "DATABASE_ISSUE"
}
Response:
- Action:
aws:rds:reboot-db-instances - Duration: 2 minutes
- Target: RDS instances
- Tests application's database failover handling
Example 3: CPU Stress Testing
Prompt:
We had a CPU spike incident. Generate a FIS template to test our auto-scaling.
Finding: "CPU utilization reached 95% causing service degradation"
Response: Complete FIS experiment template with:
- EC2 instance stop action
- 3-minute duration
- CloudWatch alarm stop condition
- Target selection by tags
Example 4: Memory Pressure
Prompt:
Create FIS experiments to validate our memory monitoring:
- Finding ID: mem-leak-001
- Issue: Memory leak caused OOM errors
- Need to test alerting and recovery
Response:
- Action:
aws:ssm:send-command(memory stress) - Duration: 5 minutes
- SSM document for memory consumption
- Tests monitoring and auto-recovery
Standalone Testing
Run the example script to test without an MCP client:
python3 example.py
This will analyze sample findings and display recommendations.
Supported Finding Types
Network & Connectivity
| Finding Keyword | FIS Action | Duration | Use Case |
|---|---|---|---|
| network | aws:network:disrupt-connectivity | 5 min | Test network partition handling |
| latency | aws:network:disrupt-connectivity | 10 min | Validate timeout configurations |
| packet loss | aws:ecs:task-netwo |
Tools (1)
recommend_fis_experimentsAnalyzes DevOps findings to suggest relevant AWS FIS experiments and generate templates.Environment Variables
AWS_REGIONrequiredThe AWS region where the FIS experiments will be managed.Configuration
{"mcpServers": {"fis-recommender": {"command": "python3", "args": ["/absolute/path/to/fis-recommender-mcp/server.py"], "env": {"AWS_REGION": "us-east-1"}}}}