AC

AWS Cost Explorer

Created 6 months ago

An MCP server for getting AWS spend data via Cost Explorer and Amazon Bedrock usage data.

development location documentation public AWS MCP

What is AWS Cost Explorer?

Optimize your AWS spend (including Amazon Bedrock spend) with this MCP server by examining spend across regions, services, instance types and foundation models ([demo video](https://www.youtube.com/watch?v=WuVOmYLRFmI&feature=youtu.be)).

Documentation

AWS Cost Explorer and Amazon Bedrock Model Invocation Logs MCP Server & Client

An MCP server for getting AWS spend data via Cost Explorer and Amazon Bedrock usage data via Model invocation logs in Amazon Cloud Watch through Anthropic's MCP (Model Control Protocol).

Overview

This tool provides a convenient way to analyze and visualize AWS cloud spending data using Anthropic's Claude model as an interactive interface. It functions as an MCP server that exposes AWS Cost Explorer API functionality to Claude Desktop, allowing you to ask questions about your AWS spend in natural language.

Features

  • Amazon EC2 Spend Analysis: View detailed breakdowns of EC2 spending for the last day
  • Amazon Bedrock Spend Analysis: View breakdown by region, users and models over the last 30 days
  • Service Spend Reports: Analyze spending across all AWS services for the last 30 days
  • Detailed Cost Breakdown: Get granular cost data by day, region, service, and instance type
  • Interactive Interface: Use Claude to query your cost data through natural language

Requirements

  • Python 3.12
  • AWS credentials with Cost Explorer access
  • Anthropic API access (for Claude integration)
  • [Optional] Amazon Bedrock access (for LangGraph Agent)
  • [Optional] Amazon EC2 for running a remote MCP server

Installation

  1. Install uv:
    # On macOS and Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
    # On Windows
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    
  2. Clone this repository:
    git clone https://github.com/aarora79/aws-cost-explorer-mcp.git
    cd aws-cost-explorer-mcp
    
  3. Set up the Python virtual environment and install dependencies:
    uv venv --python 3.12 && source .venv/bin/activate && uv pip install --requirement pyproject.toml
    
  4. Configure your AWS credentials:
    mkdir -p ~/.aws
    # Set up your credentials in ~/.aws/credentials and ~/.aws/config
    

License

MIT License

Server Config

{
  "mcpServers": {
    "aws-cost-explorer-server": {
      "command": "npx",
      "args": [
        "aws-cost-explorer"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: Yes
Global: Yes
Official: No

Project Info

Hosted Featured
Created At: May 23, 2025
Updated At: Aug 07, 2025
Author: aarora79
Category: community
License: MIT License
Tags:
development location documentation