MCP Server Integration
Use this analyzer with AI agents and LLMs through the Model Context Protocol
Remote MCP Server (Recommended - Easiest!)
No Installation Required!
Connect directly to our hosted MCP server over HTTPS - no local installation needed! Perfect for team sharing, cloud deployments, and getting started in 30 seconds.
Connection URL
https://spot-and-price.scshervi.people.aws.dev/mcp/sse
Configuration for Remote Access
Add this to your MCP configuration file (Claude Code, Claude Desktop, or other MCP-compatible tools):
{
"mcpServers": {
"ec2-spot-analyzer-remote": {
"url": "https://spot-and-price.scshervi.people.aws.dev/mcp/sse"
}
}
}
No Installation
Connect directly without Python or dependencies
Team Sharing
Multiple users can access the same server
24/7 Availability
Always online, deployed on AWS
Available MCP Tools
8 powerful tools for spot instance analysis:
get_spot_placement_scores
Get spot placement scores indicating instance availability likelihood
Use case: Check spot instance availability by availability zone
get_spot_price_history
Retrieve historical spot pricing data
Use case: Track price trends and volatility over time
analyze_spot_instances
Comprehensive analysis combining placement scores and price history
Use case: Complete spot instance analysis with statistical summaries
compare_pricing_options
Compare spot, on-demand, and capacity blocks pricing
Use case: Cost optimization and pricing model comparison
get_capacity_blocks_info
Get EC2 Capacity Blocks for ML information and pricing
Use case: Access reserved GPU capacity pricing
get_gpu_instance_recommendations
Get recommended GPU instances based on requirements
Use case: Find best GPU instances by type and count
get_comprehensive_availability
Get comprehensive availability matrix for GPU instances across all regions and purchasing options
Use case: Check availability of On-Demand, Spot, and Capacity Blocks across 22 regions
Documentation & Resources
Quick Start (2 minutes)
Step 1: Add Configuration to Your AI Tool
Add this to your MCP-compatible tool's configuration file. Common locations:
- Claude Code:
~/.config/claude-code/mcp.json - Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json - Claude Desktop (Windows):
%APPDATA%/Claude/claude_desktop_config.json - Other MCP clients: Check your tool's documentation for the MCP config location
{
"mcpServers": {
"ec2-spot-analyzer": {
"command": "uvx",
"args": [
"--from",
"/path/to/your/project/directory",
"ec2-spot-analyzer-mcp-server"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR",
"AWS_PROFILE": "default",
"AWS_REGION": "us-east-1"
},
"disabled": false,
"autoApprove": [
"get_spot_placement_scores",
"get_spot_price_history",
"analyze_spot_instances",
"compare_pricing_options",
"get_capacity_blocks_info",
"get_gpu_instance_recommendations",
"get_comprehensive_availability"
]
}
}
}
Replace /path/to/your/project/directory with the absolute path to where you cloned or extracted this project on your system.
Step 2: Restart Your AI Application
After adding the configuration, restart your MCP-compatible AI tool for changes to take effect.
Step 3: Try It Out!
Ask your AI assistant questions like:
- "Find the cheapest H100 instances in us-west-2"
- "Compare spot pricing for p5.48xlarge across regions"
- "What are the spot placement scores for g6.xlarge?"
- "Show me GPU instance recommendations with 4-8 GPUs"
Example Queries
Cost Optimization
Availability Check
Price Comparison
GPU Recommendations
Historical Analysis
Troubleshooting
Server Not Appearing?
- Verify
uvxis installed:uvx --version - Check the path in configuration points to your project directory
- Restart your AI tool after adding configuration
- Check logs by setting
FASTMCP_LOG_LEVEL: "DEBUG"
AWS Credentials Error?
- Configure AWS CLI:
aws configure - Verify credentials:
aws sts get-caller-identity - Check IAM permissions for EC2 and Pricing API
Test Server Directly
cd "/path/to/your/project/directory"
uvx --from "." ec2-spot-analyzer-mcp-server
Why Use MCP Integration?
AI-Powered Analysis
Let AI agents query spot pricing and availability using natural language
Automated Workflows
Build automated cost optimization pipelines with AI assistance
Intelligent Recommendations
Get smart GPU instance recommendations based on your requirements
Real-Time Insights
Query live pricing data through conversational interfaces