Skip to main content
Glama
aws-billing-mcp

aws-billing-mcp

by symeta

aws-billing-mcp

MCP server (stdio) — accesses Billing and Cost Management data for <目标AWS 账号> via the local AWS CLI, for MCP clients such as Quick Desktop to perform cost and usage analysis.

Prerequisites

  • Node.js ≥ 18 (v24 is installed on this machine)

  • AWS CLI v2, and the credentials of the default profile (or the profile specified by AWS_PROFILE) belong to <目标AWS 账号>

  • IAM permissions: ce:Get*, budgets:ViewBudget, sts:GetCallerIdentity

On the first tool invocation, the server uses sts get-caller-identity to verify that the current credentials indeed belong to <目标AWS 账号>. If they do not match, it immediately returns an error, preventing accidental queries against other accounts.

Related MCP server: AWS FinOps MCP Server

Installation

cd ~/aws-billing-mcp
npm install

Smoke Test

node test-client.mjs

It will list all tools, query the Top 5 costs for this month grouped by service, and run a month-end cost forecast.

Integrating with Quick Desktop

Add the following to Quick Desktop's MCP server configuration (Settings → Integrations/MCP servers, or its JSON configuration file):

{
  "mcpServers": {
    "aws-billing": {
      "command": "node",
      "args": ["~/aws-billing-mcp/index.mjs"],
      "env": {
        "AWS_PROFILE": "default"
      }
    }
  }
}

Note: node is installed via nvm (~/.nvm/versions/node/v24.8.0/bin/node). If Quick Desktop cannot find node or aws at startup, replace command with the absolute path to node, and add "PATH": "/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin" to env (include the directory containing aws).

Tool List

Tool

Description

get_cost_and_usage

Core query: cost/usage for any time period, supports grouping by SERVICE, USAGE_TYPE, REGION, TAG, etc. (up to 2), supports Cost Explorer filter expressions, automatic pagination

get_dimension_values

Enumerates the values that actually incur costs for a dimension (service names, regions, etc.), used to determine precise filter values

get_cost_forecast

Cost forecast for future time periods (includes 80% confidence interval)

get_cost_anomalies

Cost anomalies detected by Cost Anomaly Detection and their root causes

describe_budgets

Budgets under the account and actual/forecast execution status

get_cost_allocation_tags

Cost allocation tag key/value in billing data, used with TAG grouping

get_commitment_utilization

Utilization and coverage of Savings Plans / RI

Typical Analysis Questions (in Quick Desktop)

  • “How much did this account spend this month? Rank the Top 10 by service.”

  • “What is the daily Bedrock consumption trend for the last 30 days? Are there any abnormal spikes?”

  • “Forecast the total bill at the end of August.”

  • “Break down EC2 costs by usage type — which part is growing the fastest?”

Environment Variables

Variable

Default

Description

EXPECTED_ACCOUNT

<目标AWS 账号>

AWS account allowed to access; reject if credentials do not match

AWS_PROFILE

(system default)

AWS CLI profile to use

AWS_CLI_BIN

aws

Path to the AWS CLI executable

Available Tools

7 tools
describe_budgetsA

List AWS Budgets configured for the account, with limits, actual spend and forecast against each budget.

Inputs: no named parameters.

get_commitment_utilizationA

Get Savings Plans or Reserved Instance utilization and coverage for a time period. Returns an explanatory message if the account has no such commitments.

Inputs: end (required), start (required), commitment_type (required), report, +1 more.

get_cost_allocation_tagsA

List cost allocation tag values seen in billing data for a time period. Provide tag_key to list its values; omit it to list available tag keys. Use these keys with group_by type=TAG in get_cost_and_usage.

Inputs: end (required), start (required), tag_key.

get_cost_and_usageA

Query AWS cost and usage for account 135709585800 over a time period. Supports grouping (e.g. by SERVICE, USAGE_TYPE, REGION, LINKED_ACCOUNT, or a cost allocation TAG) and Cost Explorer filter expressions. Start date is inclusive, end date is exclusive. This is the primary tool for spend analysis: monthly trends, per-service breakdowns, daily spikes, etc.

Inputs: end (required), start (required), filter, metrics, +2 more.

get_cost_anomaliesA

List cost anomalies detected by AWS Cost Anomaly Detection in a date range, including root causes and impact. Returns an empty list if no anomaly monitors are configured.

Inputs: end (required), start (required), max_results.

get_cost_forecastA

Forecast future AWS spend for the account over a date range (must start today or later). Returns the mean forecast plus an 80% prediction interval.

Inputs: end (required), start (required), filter, metric, +1 more.

get_dimension_valuesA

List available values for a Cost Explorer dimension in a time period — e.g. which services, regions, usage types, or linked accounts actually incurred cost. Use this to discover exact value strings before filtering in get_cost_and_usage.

Inputs: end (required), start (required), dimension (required), search_string.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool serves a distinct purpose: querying cost/usage, discovering dimension values, forecasting, detecting anomalies, listing budgets, managing cost allocation tags, and checking commitment utilization. There is no overlap or ambiguity between them.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case, using retrieval verbs like get_ and describe_. The pattern is uniform across the set, making it predictable for an agent.

    Tool Count5/5

    With 7 tools, the server is well-scoped for its purpose of AWS billing and cost analysis. Each tool addresses a key aspect of cost management without being bloated or sparse.

    Completeness5/5

    The tool surface covers the core cost management workflows: historical analysis, forecasting, anomaly detection, budget tracking, tag discovery, and commitment utilization. There are no obvious dead ends or missing critical operations for a read-only billing server.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables users to query AWS cloud costs, run waste and savings audits, and check budget status in natural language across multiple accounts, profiles, and regions. Runs locally using existing AWS CLI credentials, keeping them on the user's machine while connecting to MCP-compatible AI clients.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables users to query and analyze AWS cloud costs, audit for waste, and monitor budgets through natural language in MCP-compatible AI assistants, while keeping AWS credentials local.
      -