🔌

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

Health Check: Visit https://spot-and-price.scshervi.people.aws.dev/health to verify the remote MCP server is running.

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

QUICKSTART.md

2-minute setup guide with step-by-step instructions

Download
README_MCP.md

Complete documentation with all tool parameters

Download
Configuration

Ready-to-use MCP configuration file

Download JSON

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"
      ]
    }
  }
}
Important:

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
"What's the cheapest way to get 8 H100 GPUs right now?"
Availability Check
"Show me spot placement scores for p5.48xlarge across all US regions"
Price Comparison
"Compare spot, on-demand, and capacity blocks pricing for g6.xlarge"
GPU Recommendations
"Recommend L4 GPU instances with 1-4 GPUs in eu-west-1"
Historical Analysis
"What's the spot price trend for p4d.24xlarge over the last 48 hours?"

Troubleshooting

Server Not Appearing?
  1. Verify uvx is installed: uvx --version
  2. Check the path in configuration points to your project directory
  3. Restart your AI tool after adding configuration
  4. Check logs by setting FASTMCP_LOG_LEVEL: "DEBUG"
AWS Credentials Error?
  1. Configure AWS CLI: aws configure
  2. Verify credentials: aws sts get-caller-identity
  3. 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