A Sample For Understanding Cloud Spend MCP Server

MCP for AWS Cost Explorer and CloudWatch logs

Local serverstdioPython

What is the A Sample For Understanding Cloud Spend MCP server?

MCP for AWS Cost Explorer and CloudWatch logs. Exposed over MCP by the a sample for understanding cloud spend mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

subgraph "Claude Desktop" Host --> MCPClient[MCP Client] end

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.

  • 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

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Its toolset

Everything the assistant can do here goes through one of these:

  • Prerequisites — The Prerequisites tool exposed by this server

Configuration

You will need 6 environment variables: AWS_PROFILE, AWS_REGION, BEDROCK_LOG_GROUP_NAME, MCP_TRANSPORT, MCP_SERVER_URL, MCP_SERVER_PORT. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • 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

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the a sample for understanding cloud spend mcp server does with a few real requests.

When to reach for it

Plenty of cloud and infrastructure servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. A Sample For Understanding Cloud Spend's toolset — Prerequisites — is a fair guide to whether it matches your workflow. It is maintained by aws-samples; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
PrerequisitesThe Prerequisites tool exposed by this server.

How to install the A Sample For Understanding Cloud Spend MCP server

{
  "mcpServers": {
    "aws-cost-explorer": {
      "command": "docker",
      "args": [ "run", "-i", "--rm", "-e", "AWS_PROFILE", "-e", "AWS_REGION", "-e", "BEDROCK_LOG_GROUP_NAME", "-e", "MCP_TRANSPORT", "aws-cost-explorer-mcp:latest" ],
      "env": {
        "AWS_PROFILE": "YOUR_AWS_PROFILE_NAME",
        "AWS_REGION": "us-east-1",
        "BEDROCK_LOG_GROUP_NAME": "YOUR_CLOUDWATCH_BEDROCK_MODEL_INVOCATION_LOG_GROUP_NAME",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • 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
VariableDescriptionRequired
AWS_PROFILEConfiguration value read at startup.Optional
AWS_REGIONConfiguration value read at startup.Optional
BEDROCK_LOG_GROUP_NAMEConfiguration value read at startup.Optional
MCP_TRANSPORTConfiguration value read at startup.Optional
MCP_SERVER_URLEndpoint or connection string the server talks to.Yes
MCP_SERVER_PORTConfiguration value read at startup.Optional

Example prompts to try

  • Use A Sample For Understanding Cloud Spend to Prerequisites.

Frequently asked questions

Python 3.12, AWS credentials with Cost Explorer access, and Anthropic API access. Optionally, Amazon Bedrock access (for LangGraph Agent) and an EC2 instance for remote deployment.