Skip to main content
Glama
Arshu200

AWS Pricing MCP Server

by Arshu200

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AWS_PROFILENoAWS profile to use for authentication. If not provided, defaults to 'default'.default
AWS_ACCESS_KEY_IDNoAWS access key ID for direct credential authentication.
AWS_SESSION_TOKENNoAWS session token for temporary credentials (optional).
FASTMCP_LOG_LEVELNoLog level for the MCP server.ERROR
AWS_SECRET_ACCESS_KEYNoAWS secret access key for direct credential authentication.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
analyze_cdk_projectA

Analyze a CDK project to identify AWS services used. This tool dynamically extracts service information from CDK constructs without relying on hardcoded service mappings.

analyze_terraform_projectB

Analyze a Terraform project to identify AWS services used. This tool dynamically extracts service information from Terraform resource declarations.

get_pricingA
Get detailed pricing information from AWS Price List API with optional filters.

Service codes for API often differ from web URLs.
(e.g., use "AmazonES" for OpenSearch, not "AmazonOpenSearchService").
List of service codes can be found with `curl 'https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/index.json' | jq -r '.offers| .[] | .offerCode'`
IMPORTANT GUIDELINES:
- When retrieving foundation model pricing, always use the latest models for comparison
- For database compatibility with services, only include confirmed supported databases
- Providing less information is better than giving incorrect information

**TOOL PURPOSE:**
Retrieve AWS pricing data for various analysis needs: cost optimization, regional comparisons, compliance reporting, budget planning, or general pricing research.

**YOUR APPROACH:**
Follow a systematic discovery workflow to ensure accurate, complete results regardless of your specific use case.

**MANDATORY WORKFLOW - ALWAYS FOLLOW:**

**Step 1: Build Precise Filters**
```python
# FOR COST OPTIMIZATION: Create matrix of ALL minimum qualifying combinations
filters = {
   "filters": [
       {"Field": "memory", "Value": "8 GiB", "Type": "TERM_MATCH"},
       {"Field": "instanceType", "Value": "m5.large", "Type": "TERM_MATCH"}
   ]
}
```

**Step 2: Execute Query**
```python
pricing = get_pricing('AmazonEC2', 'us-east-1', filters)
```

**COMMON USE CASES:**

**Cost Optimization (CRITICAL):**
- Build complete cross-product matrix of ALL qualifying attribute combinations
- Test every combination systematically: example: (min_memory × qualifying_storage × other_attributes)
- Start with minimum thresholds, test ALL possibilities - don't stop at first match
- Compare prices to find most cost-effective solution
- Prove optimality: Verify no cheaper option exists within requirements

**Regional Comparison:**
- Use identical filters across different regions
- Compare same instance types between us-east-1 vs eu-west-1
- Analyze pricing variations for capacity planning

**Compliance/Reporting:**
- Retrieve pricing for specific instance families or configurations
- Generate cost reports for budget planning
- Document pricing for procurement processes

**Research/Analysis:**
- Compare pricing across different service tiers
- Analyze cost implications of different configurations
- Investigate pricing patterns for forecasting

**CRITICAL REQUIREMENTS:**
- **USE SPECIFIC FILTERS**: Large services (EC2, RDS) require 2-3 filters minimum
- **VERIFY EXISTENCE**: Ensure all filter values exist in the service before querying
- **FOR "CHEAPEST" QUERIES**: Build complete matrix, test ALL qualifying combinations, prove optimality

**CONTEXT AND CONSTRAINTS:**
- **CURRENT PRICING ONLY:** Use get_price_list_file for historical data
- **NO SAVINGS PLANS/SPOT:** Only On-Demand and Reserved Instance pricing
- **REGION AUTO-FILTER:** 'region' parameter creates regionCode filter automatically

**REQUIRED INPUTS:**
- `service_code`: (e.g., 'AmazonEC2', 'AmazonS3')
- `region`: AWS region (e.g., 'us-east-1')
- `filters`: Built using discovered values (MANDATORY for large services)
- `max_allowed_characters`: Response limit (default: 100,000)

**ANTI-PATTERNS - AVOID THESE:**
❌ Using broad queries without specific filters on large services
❌ Assuming attribute values exist across different services/regions
❌ **Stopping at first qualifying option when seeking cheapest price**
❌ **Testing only "obvious" instance sizes - smaller may be cheaper**

**EXAMPLE USE CASES:**

**1. Cost Optimization Example:**
```python
# Find cheapest option meeting requirements
qualifying_memory = [m for m in memory_options if meets_requirement(m, "≥8GB")]
# Test combinations starting with minimum qualifying specs
```

**2. Regional Comparison Example:**
```python
# Compare same configuration across regions
filters = {"filters": [{"Field": "instanceType", "Value": "m5.large", "Type": "TERM_MATCH"}]}
us_pricing = get_pricing('AmazonEC2', 'us-east-1', filters)
eu_pricing = get_pricing('AmazonEC2', 'eu-west-1', filters)
```

**3. Research/Analysis Example:**
```python
# Compare different memory tiers for same instance family
memory_tiers = ["4 GiB", "8 GiB", "16 GiB"]
for memory in memory_tiers:
   filters = {"filters": [{"Field": "memory", "Value": memory, "Type": "TERM_MATCH"}]}
   pricing = get_pricing('AmazonEC2', 'us-east-1', filters)
```

**FILTERING STRATEGY:**
- **Large Services (EC2, RDS)**: ALWAYS use 2-3 specific filters to prevent 200+ record responses
- **Small Services**: May work with single filter or no filters
- **Multi-Region Analysis**: Use identical filters across regions for accurate comparison
- **Requirement-Based**: Systematically discover ALL options meeting criteria
- **Cost Optimization**: Start with minimum qualifying thresholds, use minimum-threshold filtering, test all qualifying combinations

**SUCCESS CRITERIA:**
✅ Applied appropriate filters for the service size
✅ For cost optimization: tested all qualifying combinations and proved optimality
get_bedrock_patternsA

Get architecture patterns for Amazon Bedrock applications, including component relationships and cost considerations

generate_cost_reportA

Generate a detailed cost analysis report based on pricing data for one or more AWS services.

This tool requires AWS pricing data and provides options for adding detailed cost information.

IMPORTANT REQUIREMENTS:

  • ALWAYS include detailed unit pricing information (e.g., "$0.0008 per 1K input tokens")

  • ALWAYS show calculation breakdowns (unit price × usage = total cost)

  • ALWAYS specify the pricing model (e.g., "ON DEMAND")

  • ALWAYS list all assumptions and exclusions explicitly

Output Format Options:

  • 'markdown' (default): Generates a well-formatted markdown report

  • 'csv': Generates a CSV format report with sections for service information, unit pricing, cost calculations, etc.

Example usage:

{
  // Required parameters
  "pricing_data": {
    // This should contain pricing data retrieved from get_pricing
    "status": "success",
    "service_name": "bedrock",
    "data": "... pricing information ...",
    "message": "Retrieved pricing for bedrock from AWS Pricing url"
  },
  "service_name": "Amazon Bedrock",

  // Core parameters (commonly used)
  "related_services": ["Lambda", "S3"],
  "pricing_model": "ON DEMAND",
  "assumptions": [
    "Standard ON DEMAND pricing model",
    "No caching or optimization applied",
    "Average request size of 4KB"
  ],
  "exclusions": [
    "Data transfer costs between regions",
    "Custom model training costs",
    "Development and maintenance costs"
  ],
  "output_file": "cost_analysis_report.md",  // or "cost_analysis_report.csv" for CSV format
  "format": "markdown",  // or "csv" for CSV format

  // Advanced parameter for complex scenarios
  "detailed_cost_data": {
    "services": {
      "Amazon Bedrock Foundation Models": {
        "usage": "Processing 1M input tokens and 500K output tokens with Claude 3.5 Haiku",
        "estimated_cost": "$80.00",
        "free_tier_info": "No free tier for Bedrock foundation models",
        "unit_pricing": {
          "input_tokens": "$0.0008 per 1K tokens",
          "output_tokens": "$0.0016 per 1K tokens"
        },
        "usage_quantities": {
          "input_tokens": "1,000,000 tokens",
          "output_tokens": "500,000 tokens"
        },
        "calculation_details": "$0.0008/1K × 1,000K input tokens + $0.0016/1K × 500K output tokens = $80.00"
      },
      "AWS Lambda": {
        "usage": "6,000 requests per month with 512 MB memory",
        "estimated_cost": "$0.38",
        "free_tier_info": "First 12 months: 1M requests/month free",
        "unit_pricing": {
          "requests": "$0.20 per 1M requests",
          "compute": "$0.0000166667 per GB-second"
        },
        "usage_quantities": {
          "requests": "6,000 requests",
          "compute": "6,000 requests × 1s × 0.5GB = 3,000 GB-seconds"
        },
        "calculation_details": "$0.20/1M × 0.006M requests + $0.0000166667 × 3,000 GB-seconds = $0.38"
      }
    }
  },

  // Recommendations parameter - can be provided directly or generated
  "recommendations": {
    "immediate": [
      "Optimize prompt engineering to reduce token usage for Claude 3.5 Haiku",
      "Configure Knowledge Base OCUs based on actual query patterns",
      "Implement response caching for common queries to reduce token usage"
    ],
    "best_practices": [
      "Monitor OCU utilization metrics and adjust capacity as needed",
      "Use prompt caching for repeated context across API calls",
      "Consider provisioned throughput for predictable workloads"
    ]
  }
}

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arshu200/MCP-Pricing'

If you have feedback or need assistance with the MCP directory API, please join our Discord server