AWS Cost Explorer

AWS Cost Explorer

MCP server to fetch AWS spend and Bedrock usage data via Cost Explorer and CloudWatch

126
Stars
31
Forks
0
Releases

Overview

This MCP server exposes AWS Cost Explorer API functionality and Amazon Bedrock model invocation usage data to Claude Desktop and LangGraph-based agents via Anthropic's Model Context Protocol. It can run locally or as a remote MCP server on EC2, with HTTPS support through nginx for secure remote connections. The server ingests spend data (last day EC2 spend, last 30 days service spend, per-day breakdowns) and Bedrock usage (per region and per user/model) from CloudWatch logs and uses LangGraph/LangChain MCP adapters to expose these as tools. It supports cross-account access by assuming a designated IAM role, enabling cross-account spend queries. Prerequisites include Python 3.12, AWS credentials with Cost Explorer and CloudWatch access, and optional Bedrock access. Installation uses uv or Docker. Available tools include get_ec2_spend_last_day, get_detailed_breakdown_by_day, get_bedrock_daily_usage_stats, and get_bedrock_hourly_usage_stats. It also provides remote setup guidance and a demo video.

Details

Owner
aarora79
Language
Python
License
MIT License
Updated
2025-12-07

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.

Audience

DevelopersQuery AWS spend and Bedrock usage via MCP for insights.
Cost AnalystsAnalyze AWS costs across regions and services with natural language.

Tags

AWS Cost ExplorerBedrockCloudWatch LogsMCPClaudeLangGraphLangChain MCP AdaptersRemote MCP serverCost analysis