mcp icon indicating copy to clipboard operation
mcp copied to clipboard

EC2 Pricing Not Returned – Outdated MCP CLI (awslabs-aws-pricing-mcp-server v1.0.12) Even with Latest MCP Python Release

Open Cryptotion opened this issue 4 months ago • 2 comments

Describe the bug

I'm using awslabs-aws-pricing-mcp-server for querying current EC2 instance pricing via the documented get_pricing tool. When submitting fully-populated request payloads, I receive no results for valid EC2 instance SKUs in current regions—even though I am using the payload structure exactly as documented.

The root problem appears to be that the latest published CLI tool is version 1.0.12, while the mcp Python library is already up to version 1.13.1. Many regions/SKUs are missing or non-functional in the older CLI. This effectively breaks pricing lookups for standard, on-demand EC2, even though my parameters match documentation examples.

MCP Tool Version(s):

  • CLI (via uv and pip): awslabs-aws-pricing-mcp-server v1.0.12
  • mcp Python library: 1.13.1 (auto-installed as dependency, not the CLI)

Expected Behavior

  • MCP server should return current EC2 instance pricing for correct region/instance/filter payload as per the docs.
  • The CLI tool should be published regularly—at least as often as the Python library—to ensure recent pricing data, service fixes, and compatibility.

Current Behavior

(Output with debug print) DEBUG: Final MCP pricing payload: {'service_code': 'AmazonEC2', 'region': 'ap-south-1', 'filters': {'instance_type': 'c5.xlarge', 'platform': 'Linux/UNIX', 'tenancy': 'Shared', 'preInstalledSw': 'NA', 'capacitystatus': 'Used'}} INFO:mcp.server.lowlevel.server:Processing request of type ListToolsRequest INFO:mcp.server.lowlevel.server:Processing request of type CallToolRequest MCPClientmanager destroyed with active connections bb-agent: It seems there was an issue retrieving the real-time pricing for the EC2 instance type c5.xlarge in the ap-south-1 region. Unfortunately, I can't provide the exact pricing at this moment.

Reproduction Steps

  1. Install CLI for MCP using uv or pip: uv tool install awslabs.aws-pricing-mcp-server or pip install awslabs-aws-pricing-mcp-server This always gives CLI v1.0.12.

  2. Run the MCP server and submit (via Python or agent):

{ "service_code": "AmazonEC2", "region": "ap-south-1", "filters": { "instance_type": "c5.xlarge", "platform": "Linux/UNIX", "tenancy": "Shared", "preInstalledSw": "NA", "capacitystatus": "Used" } }

  1. Observed result:
  • No pricing is returned for any on-demand EC2 instance in any region (returns empty, null, or generic not found).
  • S3 and basic services work for a subset of resources, but EC2 is consistently empty.

What I Tried

  • Upgraded all pip/uv packages to latest
  • Cleared MCP caches (rm -rf ~/.cache/mcp-price-list)
  • Verified all params are properly case-sensitive and passed under "filters"
  • Reinstalled via pip and uv: CLI always v1.0.12
  • Compared with documentation at https://github.com/awslabs/mcp/tree/main/src/aws-pricing-mcp-server

Possible Solution

  • Please publish the latest stable version of the awslabs-aws-pricing-mcp-server CLI to PyPI (and uv registry if possible) in sync with the latest mcp Python library, or provide a direct link/install instructions for the latest production-ready source.
  • (Optional) Please confirm that the official CLI payload and parameter documentation are still correct—if the required parameters or case have changed, please update the published docs.

Additional Information/Context

Many thanks for MCP! This would unlock pricing automation for us and others using newer AWS resources.

OS

macOS ARM64 (M1/M2), Python 3.12/3.13

Server

aws-pricing-mcp-server

Server Version

v1.0.12

Region experiencing the issue

ap-south-1

Other information

No response

Service quota

  • [x] I have reviewed the service quotas for this construct

Cryptotion avatar Sep 08 '25 10:09 Cryptotion

Hey @Cryptotion, thanks for reaching out and for the detailed bug report!

I was able to reproduce and resolve your issue. The good news is your AWS Pricing MCP v1.0.12 works perfectly fine - the problem is actually the filter format you're using.

The Issue

Your payload format is incorrect:

{
  "service_code": "AmazonEC2",
  "region": "ap-south-1",
  "filters": {
    "instance_type": "c5.xlarge",
    "platform": "Linux/UNIX",
    "tenancy": "Shared",
    "preInstalledSw": "NA",
    "capacitystatus": "Used"
  }
}

The MCP server expects this format:

{
  "service_code": "AmazonEC2",
  "region": "ap-south-1",
  "filters": [
    {"Field": "instanceType", "Value": "c5.xlarge", "Type": "EQUALS"},
    {"Field": "operatingSystem", "Value": "Linux", "Type": "EQUALS"},
    {"Field": "tenancy", "Value": "Shared", "Type": "EQUALS"},
    {"Field": "preInstalledSw", "Value": "NA", "Type": "EQUALS"},
    {"Field": "capacitystatus", "Value": "Used", "Type": "EQUALS"}
  ]
}

Key Changes

  1. filters must be an array, not an object
  2. Each filter needs Field, Value, Type properties (last is optional and defaults to EQUALS)
  3. platform: "Linux/UNIX"operatingSystem: "Linux" (I verified "platform" isn't a valid attribute)
  4. instance_typeinstanceType

Discovery Tools

To help with future queries, you can use these tools to discover valid attributes: • get_pricing_service_attributes - lists all available filter attributes for a service • get_pricing_attribute_values - shows valid values for specific attributes

This way you can verify attribute names and valid values before constructing your filters.

Verified Working

I just tested your exact query with the corrected format and got complete pricing data for c5.xlarge in ap-south-1 - On-Demand at $0.17/hour plus all Reserved Instance options.

No CLI upgrade needed - just the parameter format fix!

nspring00 avatar Sep 15 '25 12:09 nspring00

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] avatar Nov 28 '25 01:11 github-actions[bot]

Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] avatar Dec 05 '25 01:12 github-actions[bot]