NewAgent Observability — find failures before customers do.
Back to directory
AWS Cost Explorer logo

AWS Cost Explorer MCP server: 46 costly tools

AWS Cost Explorer's replacement server has 46 tools for billing questions, with a context cost that exceeds many larger connectors.

Connector
Official, local
Coverage
Cost Explorer, budgets, anomalies, optimization, pricing
Tools
46, all on by default
Biggest risk for an agent
Over 26,390 tokens of tool definitions

Checked 1 September 2026 · from AWS Labs' repository, PyPI and the server's own tools/list response

One of 91 guides to monitoring and developer tools. Each covers what an AI coding agent can get out of the tool through MCP, the protocol that lets the agent query the tool directly.

Summary

AWS publishes a billing and cost management MCP server with 46 tools in version 0.0.39. They cover Cost Explorer, budgets, anomaly detection, Compute Optimizer, Storage Lens, Savings Plans and public pricing.

It replaced a narrower one. The standalone cost-explorer-mcp-server was deprecated in March 2026 and removed in April, with its capabilities folded into this package.

It is expensive for its size. On 0.0.33, its 38 tools cost about 26,390 tokens, roughly 13% of a 200,000-token window, because the descriptions carry usage guidance at 1,867 characters each. Version 0.0.39 adds eight tools, so the current figure is higher.

What is the AWS Cost Explorer MCP server?

It is AWS's server for the Model Context Protocol. What the agent gains is a way to query your AWS spend: what it cost, what it will cost, where it is anomalous and what could be cheaper.

The 46 tools group into four kinds. Reporting reads historical and forecast cost. Optimization reads recommendations from Compute Optimizer, Storage Lens, Cost Optimization Hub and Savings Plans. Governance covers budgets and anomaly monitors. Pricing reads AWS's public price list, which needs no account data at all.

It is read-shaped: nothing here buys a reservation, edits a budget or changes a setting. Two Savings Plans tools can start analysis jobs in Cost Explorer.

It covers cloud cost broadly, and reaches nothing in code review, release, production observability or agent observability.

Part of the workWhat AWS Cost Explorer has hereCan an agent reach it
Code, tests & reviewNoneNo code-review product
CI & releaseNoneNo CI product, and no build or test pipeline
Production observabilityNoneNo telemetry. Cost data describes what resources were billed for, not how they behaved
Agent observability & evalsNoneNo traces, evaluations or prompt versioning for your own agents
AI cost managementCost Explorer, budgets, anomalies, optimization, pricingYes. Core strength for cloud spend. Bedrock and SageMaker appear as services on the bill, so model spend is visible as infrastructure cost rather than per token

For an agent, that means AWS answers what your infrastructure cost and what would cost less, and nothing about why. An agent connected here can find the service whose spend jumped and the reservation that would have covered it. It cannot tell you the deploy that caused the jump, so this connector sits beside a release and telemetry one.

What can an AI agent do with AWS Cost Explorer?

TaskToolsWorksWatch out for
Find where the bill went upcost-explorer cost-comparisonYesUse unblended cost, the rate each account was actually charged rather than an average across the organization. The tool says so in its description.
Investigate an unexpected chargecost-anomaly rec-detailsYesAnomalies are AWS's own detections, so an absent anomaly is not proof of nothing unusual
Find what could be cheapercost-optimization compute-optimizer storage-lensYesCompute Optimizer needs to have been enabled and to have collected enough history
Check reservation and savings-plan performanceri-performance sp-performanceYesReports utilization and coverage, not whether the commitment was a good idea
Price something before building itaws-pricing bcm-pricing-calcYesPublic list pricing, so it ignores your negotiated rates and credits
Check budget statusbudgets free-tier-usageYesReads budgets; it cannot create or change one
Explain why a service got slowerNoNo telemetry of any kind. This is the bill, not the behavior

46 tools registered in 0.0.39, all on by default

Reporting3
cost-explorercost-comparisonfree-tier-usage
Anomalies and budgets5
cost-anomalybudgetsbudget-actionsbudget-notificationsrec-details
Optimization4
cost-optimizationcompute-optimizercompute-optimizer-automationstorage-lens
Commitments2
ri-performancesp-performance
Savings Plans3
sp-explorersp-recommendationsp-purchase-analyzer
Pricing2
aws-pricingbcm-pricing-calc

The groups above name 19 of the 46 tools. The rest cover Billing Conductor, billing views, cost categories, allocation tags, invoicing, credits, Enterprise Support, billing and procurement preferences, and session SQL. Counted from the tool registrations in the 0.0.39 package on 6 October 2026, a method that reproduces the 38 tools/list returned on 0.0.33. Two Savings Plans tools can start analysis jobs; none buys or changes a setting.

What the tool definitions cost in context

A client that loads every tool definition at the start of a session spends this much context before the first question. Claude Code defers definitions by default through tool search, and loads a tool's definition when the agent needs it. The method below gives the version and date measured.

A context window is the amount of text a model can hold at once. A client that loads every tool definition upfront sends each tool's name, description and input schema to the model when the session starts. That list is charged whether or not a single tool is called.

Rootly, Vantage, PagerDuty and Grafana with every category enabled are the only connectors here that cost more. On 0.0.33, 38 tools cost about 26,390 tokens. That is more than Grafana's default 65 tools cost on v1.1.0, and more than GitHub's 44 cost on v1.9.0.

The cause is description length, at 1,867 characters per tool. Those descriptions carry real usage guidance, including which cost metric to prefer and how to shape a query, which is useful and is charged whenever the client loads the tool list, used or not.

These figures were measured on 0.0.33 on 24 August 2026. Version 0.0.39 registers eight more tools, including three for Savings Plans, so its definitions cost more.

Tool setToolsTokens (GPT-5.6, GPT-5.5)Tokens (GPT-4, GPT-3.5)Tokens (Claude Haiku 4.5 to Opus 5)Share of a 200,000-token window
Every tool on 0.0.33, as registered3826,390 to 32,76426,006 to 32,69533,821 to 47,20613.0% to 23.6%

Encodings: GPT-5.6, GPT-5.5 o200k_base; GPT-4, GPT-3.5 cl100k_base; Claude Haiku 4.5 to Opus 5 count_tokens. Counted 24 August 2026 from tools/list on awslabs.billing-cost-management-mcp-server 0.0.33. It was run locally with placeholder credentials.

Registration is static, so no AWS account was involved. Figures cover name, description and input schema.

The two models in column one share the o200k_base encoding, so they get one count. The spread is formatting, about 24%. Reasoning tokens are output, spent per request. The tool list is billed as input whenever the client loads it.

The Claude figures are measured rather than encoded. Anthropic publishes no local tokenizer. So the definitions were sent to the API's count_tokens endpoint, and a no-tools baseline was subtracted. The range covers two tokenizer generations rather than two serializations. Haiku 4.5 and Opus 4.6 sit at the low end. Opus 5 and Sonnet 5 sit at the high end. The gap between them is close to two fifths.

AWS Cost Explorer MCP server limits: where answers come back incomplete

The limits below are properties of AWS billing data rather than of the connector.

The agent says: “This month has cost you this much.” Recent days are estimates.

AWS billing data settles over time. Usage arrives on a delay, credits and refunds apply later, and the final invoice can differ from what Cost Explorer showed. A figure for yesterday is an estimate presented in the same shape as a settled one.

Guard: Have the agent state the period it queried and treat the last few days as provisional.

The agent says: “There is nothing to optimize.” The service may not be collecting.

Compute Optimizer and Cost Optimization Hub produce recommendations only after they are enabled and have gathered enough history. An account that never enabled them returns an empty list, which is indistinguishable from a well-optimized account.

Guard: Confirm the optimization services are enabled before treating an empty result as a clean bill of health.

The agent says: “That instance costs this much.” That is public list pricing.

aws-pricing reads AWS's published price list, which is the same for everyone. Enterprise discounts, private pricing and credits are not in it, so a quoted figure can be well above what your account actually pays.

Guard: Use pricing tools for comparison between options, and Cost Explorer for what you actually paid.

How to configure AWS Cost Explorer MCP for agents

  1. 1

    Give it billing read access only

    The tools read billing data, apart from two that start Savings Plans analyses. An IAM role scoped to the Billing and Cost Management APIs keeps the agent's reach to your bill.

  2. 2

    Attach it for a session

    At about 26,390 tokens on 0.0.33, and more on 0.0.39, this is among the heaviest connectors in the guide, so it is a poor default and a good investigation tool.

  3. 3

    Set the region

    Cost Explorer is a global service reached through a region, and AWS_REGION decides which endpoint the SDK uses.

  4. 4

    Prefer a profile over inline keys

    AWS_PROFILE keeps credentials in the SDK's own store rather than in an MCP client's config file.

Paste this into your agent’s instructions

Billing data settles over time and optimization services return nothing when they were never enabled. Both look like ordinary answers, so the block makes the agent qualify them.

Terminal
When you answer using AWS billing MCP tools, state:
- The exact period you queried, and which cost metric.
  Unblended is the default unless you were asked otherwise.
- That recent days are estimates. Billing data settles, and a
  figure for this week is not the invoice.
- Whether the optimization services were returning data. An
  empty recommendation list may mean they were never enabled.
Never state that data does not exist. State that none was
returned under the constraints above.
Write your answer in ASD-STE100 Simplified Technical
English. Use short sentences with one idea in each.

Do you need the MCP server at all?

Often you do not. The AWS CLI covers Cost Explorer, Budgets and Pricing with the same credentials, and a coding agent already knows the CLI.

The connector's advantage is the guidance inside the tool descriptions, which is the same thing that made it cost 26,390 tokens on 0.0.33. An agent that reads which cost metric and which dimensions a tool wants composes a better query than one guessing at parameters.

At this size it is a connector to attach for a cost investigation rather than leave connected. Thirteen percent of the window, as measured on 0.0.33, is a lot to spend on a question you are not asking.

Connect it for a billing investigation. Use the CLI when you know the query and want the context back.

AWS Cost Explorer MCP server setup

The package runs with uvx and uses ordinary AWS credentials: a profile the SDK can find, or a key pair, plus a region.

The IAM identity needs access to the Billing and Cost Management APIs. Read access covers every tool except the two that start Savings Plans analyses.

Claude Code

No credentials appear here by design. AWS_PROFILE names a profile the AWS SDK already holds, so the secret stays in the SDK's own store rather than in an MCP config file.

Terminal
claude mcp add-json "aws-billing" '{"command":"uvx",
  "args":["awslabs.billing-cost-management-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}'

Cursor

In ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in one. It carries no credentials for the same reason: the profile points at what the AWS SDK already has.

Terminal
{"mcpServers":{"aws-billing":{"command":"uvx",
  "args":["awslabs.billing-cost-management-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}

Codex CLI

Codex reads TOML, so the JSON blocks above will not transfer. No credentials here either; the profile resolves through the AWS SDK.

Terminal
[mcp_servers.aws-billing]
command = "uvx"
args = ["awslabs.billing-cost-management-mcp-server@latest"]
env = { AWS_PROFILE = "your-profile", AWS_REGION = "us-east-1" }

Every other client

Each block below is the configuration for one client, with the file path and the key that client expects.

Claude Desktop

macOS ~/Library/Application Support/Claude/claude_desktop_config.json. Windows %APPDATA%\Claude\claude_desktop_config.json. There is no CLI. Edit through Settings, Developer, Edit Config.

Quit and restart fully for changes to load. Paths in args must be absolute. Logs at ~/Library/Logs/Claude/mcp.log.

No credentials appear in the file. The AWS profile named here is resolved from your local AWS configuration.

Terminal
{"mcpServers":{"aws-billing":{"command":"uvx",
  "args":["awslabs.billing-cost-management-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}
Gemini CLI

~/.gemini/settings.json globally, or .gemini/settings.json per project. Key mcpServers. CLI: gemini mcp add.

No credentials appear in the file. The AWS profile named here is resolved from your local AWS configuration.

Terminal
{"mcpServers":{"aws-billing":{"command":"uvx",
  "args":["awslabs.billing-cost-management-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}
VS Code Copilot

.vscode/mcp.json per workspace, or your user profile. CLI: code --add-mcp.

No credentials appear in the file. The AWS profile named here is resolved from your local AWS configuration.

Terminal
{"servers":{"aws-billing":{"command":"uvx",
  "args":["awslabs.billing-cost-management-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}

`.vscode/mcp.json` takes the key `servers`. VS Code also reads mcpServers from a portable .mcp.json at the project root or ~/.copilot/mcp-config.json. Its docs recommend the portable files for new servers.

Windsurf

~/.codeium/windsurf/mcp_config.json, which is the path Windsurf documents. Key mcpServers, the same JSON shape as Cursor, carrying the same AWS profile.

Zed

~/.config/zed/settings.json, carrying the same AWS profile as the blocks above.

The key is `context_servers`. Zed does not call them MCP servers in config, so searching its settings for mcp finds nothing.

Google Antigravity

~/.gemini/config/mcp_config.json globally, or .agents/mcp_config.json per project. Key mcpServers. There is no CLI. Use the /mcp overlay in the editor. Supports stdio, streamable HTTP, SSE and websocket.

No credentials appear in the file. The AWS profile named here is resolved from your local AWS configuration.

Terminal
{"mcpServers":{"aws-billing":{"command":"uvx",
  "args":["awslabs.billing-cost-management-mcp-server@latest"],
  "env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}
Amp (Sourcegraph)

~/.config/amp/settings.json or .amp/settings.json, carrying the same AWS profile. The amp mcp CLI covers approve, doctor and oauth.

The key is `amp.mcpServers`, namespaced. A bare mcpServers block is ignored.

Cline

~/.cline/mcp.json per the docs. The source also reads ~/.cline/data/settings/cline_mcp_settings.json. Key mcpServers, standard JSON shape, carrying the same AWS profile. Supports stdio, streamable HTTP and SSE.

Goose (Block)

~/.config/goose/config.yaml, carrying the same AWS profile.

YAML, and servers are called `extensions`. Goose does not use the MCP vocabulary in config at all. Add one interactively with goose configure, or per session with goose session --with-extension.

Kiro (AWS)

.kiro/settings/mcp.json per workspace, or ~/.kiro/settings/mcp.json globally. Key mcpServers, standard JSON shape, carrying the same AWS profile.

Warp

~/.warp/.mcp.json or .warp/.mcp.json. Key mcpServers, standard shape, carrying the same AWS profile. Also addable through the /agent-add-mcp skill.

JetBrains Junie

.junie/mcp/mcp.json per project, or ~/.junie/mcp/mcp.json. Key mcpServers, carrying the same AWS profile. Use /mcp in the CLI to manage.

Roo Code

.roo/mcp.json per project. The global file is mcp_settings.json, opened from the Roo Code MCP settings view with Edit Global MCP. Key mcpServers, carrying the same AWS profile.

Continue

.continue/mcpServers/*.yaml, one file per server, carrying the same AWS profile.

YAML, and `mcpServers` is a list, not an object. Every JSON client keys servers by name. Continue takes an array, so a converted config will not parse.

Trae

.trae/mcp.json per project, or paste into the UI under Raw Config (JSON). Key mcpServers, standard shape, carrying the same AWS profile.

Devin

Devin has no config file to edit. Servers are added through a web form in the settings UI, and Devin's documentation states you do not need to write or paste JSON. The block below is the shape those fields describe, shown for reference. Either route uses the same AWS profile.

Explicit keys

Where a profile is not available. Scope the key to billing read access.

Terminal
AWS_REGION=us-east-1 \
AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<secret> \
uvx awslabs.billing-cost-management-mcp-server

Read-only access, permissions and security

  • The tools cannot buy or edit

    The connector cannot create a budget, buy a reservation or change a setting. On 0.0.39, sp-recommendation and sp-purchase-analyzer can start analysis jobs in Cost Explorer.

  • Billing data is commercially sensitive

    Spend by service, by account and by tag describes your architecture and your scale to anyone reading the conversation.

  • Scope the IAM identity to billing

    The tools need Billing and Cost Management APIs and nothing else, so a general-purpose role gives the agent far more reach than it uses.

  • Prefer a profile to inline keys

    Credentials then live in the AWS SDK's store rather than in an MCP client's configuration file.

Troubleshooting

Access denied on every tool
The IAM identity is missing Billing and Cost Management permissions. These are separate from general AWS access and often not granted by default.
No optimization recommendations
Compute Optimizer and Cost Optimization Hub return data only after being enabled and collecting history. An empty list is not evidence of an efficient account.
The figure does not match the invoice
Recent billing data is provisional. Usage arrives on a delay and credits apply later, so a figure for the last few days is an estimate.
Pricing looks higher than what you pay
aws-pricing reads the public price list. Enterprise discounts, private pricing and credits are not in it. Use Cost Explorer for actuals.

AWS Cost Explorer MCP server: Reference

ItemValue
StatusPyPI 0.0.39, 30 September 2026 · tools counted on 0.0.33 and 0.0.39 · shipped from the awslabs/mcp monorepo
Predecessorcost-explorer-mcp-server, deprecated March 2026, removed April 2026
Packageawslabs.billing-cost-management-mcp-server, run with uvx
AuthAWS_PROFILE or a key pair, plus AWS_REGION
PermissionsBilling and Cost Management APIs, read access
Tools46 on 0.0.39, all on by default · 38 on 0.0.33
Context costAbout 26,390 tokens on 0.0.33, fifth-heaviest measured here, behind Rootly, Vantage, PagerDuty and Grafana

What engineers report

This server ships inside the awslabs monorepo, so the useful signals are packaging and history rather than opinions.

What was checkedWhat it shows
Packageawslabs.billing-cost-management-mcp-server 0.0.39 on PyPI, tools counted on 0.0.33 and 0.0.39
Predecessorcost-explorer-mcp-server, deprecated March 2026 and removed April 2026
Tools46, all on by default
Average description length1,867 characters per tool
WritesTwo tools start Savings Plans analyses; none buys or edits

Package facts from PyPI, retrieved 6 October 2026. Description lengths and the 0.0.33 count come from the server's own tools/list response on 24 August 2026. The 0.0.39 count comes from the package's tool registrations. The predecessor's removal is recorded in the awslabs monorepo.

Should you connect an agent to AWS Cost Explorer?

Yes. Best for short, deliberate cost investigations, with credentials scoped to billing read access.

Strongest fit
Teams investigating an AWS bill who want an agent to move between spend, anomalies and optimization recommendations in one conversation.
Main advantage
Breadth across billing, and descriptions that teach an agent how to query cost data correctly.
Main weakness
The fifth-heaviest connector here at about 26,390 tokens on 0.0.33, which is a lot to leave attached.
Operational risk
Low. The tools read billing data or start analyses, so the credential is the main exposure.

From Oodle

One platform for agent traces and infrastructure

Agent traces usually sit in a different product from the rest of your telemetry, so when a slow database makes an agent slow the symptom is in one tool and the cause is in another. Oodle keeps both in one query surface.

See agent observability

Frequently asked questions

How many tools does the AWS billing MCP server have?

46 on version 0.0.39, all enabled on connection, counted from the package's tool registrations on 6 October 2026. Version 0.0.33 returned 38 from the server's own tools/list response on 24 August 2026.

What happened to the Cost Explorer MCP server?

It was deprecated in March 2026 and removed in April 2026. Its capabilities moved into the billing and cost management server, which covers budgets, anomalies, optimization and invoicing as well.

Why does it cost so much context?

Descriptions average 1,867 characters because they carry usage guidance, such as which cost metric to prefer. A client that loads every definition upfront pays that on every session, whether or not a tool is called.

Can it change anything in my account?

It cannot create a budget, buy a reservation or change a setting. Two Savings Plans tools can start analysis jobs in Cost Explorer, which change nothing on the bill.

Does it show what my AI models cost?

Only as infrastructure. Bedrock and SageMaker appear as services on the bill, so you see spend per service rather than per token or per prompt.

Changelog

  • 30 September 2026. awslabs.billing-cost-management-mcp-server 0.0.39 published to PyPI, registering 46 tools. The additions since 0.0.33 include sp-explorer, sp-recommendation and sp-purchase-analyzer.
  • 1 September 2026. awslabs/mcp 2026.08.20260831234710 released. The billing server reached PyPI 0.0.36 the same day.
  • 14 August 2026. Bundle 2026.08.20260813230114 released.
  • 31 March 2025. First release of the awslabs/mcp repository, tag 0.0.0. Four releases shipped that day. The billing server itself arrived later.
  • 21 March 2025. awslabs/mcp created on GitHub.

Sources

Every number on the page traces to one of these

  1. Package version from PyPI, retrieved 6 October 2026
  2. Predecessor deprecation and removal from the awslabs monorepo
  3. Tool counts and description lengths from the server's own tools/list response on 0.0.33, 24 August 2026
  4. Tool count on 0.0.39 from the tool registrations in the published package, read 6 October 2026

AWS Cost Explorer’s own MCP documentation

Also AI and cloud cost:

For what the spend is actually doing: