sample-cloud-spend-mcp-server
This project is an MCP server that provides an interface for analyzing AWS cloud spending data. It allows users to query cost and usage information using natural language with Anthropic's Claude. The server enables detailed spending reports and supports both local and remote configurations, including secure remote setup using Nginx.
Overview
This project is an MCP server designed to analyze AWS cloud spending data, integrating with Anthropic's Claude model for interaction. It enables analysis of AWS Cost Explorer and Amazon Bedrock usage data, providing features such as EC2 and service spend analysis, detailed cost breakdowns, and interactive natural language queries via Claude Desktop. It requires Python 3.12, AWS Cost Explorer access, and Anthropic API integration.
Features
- Amazon EC2 and Bedrock spend analysis
- Service spend reports
- Interactive cost data analysis
Requirements
- Python 3.12
- AWS credentials
- Anthropic API access
Installation
- Install
uv
- Clone repository: aws-samples/sample-cloud-spend-mcp-server
- Setup Python environment and install dependencies
- Configure AWS credentials
Usage
Prerequisites
- Setup model invocation logs in CloudWatch
Local setup
- Start server with
MCP_TRANSPORT=stdio
Remote setup
- Start server with
MCP_TRANSPORT=sse
Available Tools
- EC2 spend, detailed breakdowns, and usage stats queries
Example Queries
- "Help me understand my Bedrock spend over the last few weeks"
Docker Support
- Containerized deployment with Dockerfile
Secure "remote" MCP server
- Setup HTTPS with Nginx reverse-proxy