sample-cloud-spend-mcp-server

sample-cloud-spend-mcp-server

7

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

  1. Install uv
  2. Clone repository: aws-samples/sample-cloud-spend-mcp-server
  3. Setup Python environment and install dependencies
  4. 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