AWS Cost Explorer MCP server: 38 costly tools
AWS Cost Explorer's replacement server has 38 tools for billing questions, with a context cost that exceeds many larger connectors.
Last verified 1 September 2026 · from AWS Labs' repository, PyPI and the server's own tools/list response
This page is one of 90 in a directory of monitoring and developer tools. Each page checks what an AI coding agent can get out of the tool through its MCP server, the connector that lets the agent query the tool directly.
Summary
AWS publishes a billing and cost management MCP server with 38 tools, covering Cost Explorer, budgets, anomaly detection, Compute Optimizer, Storage Lens 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. 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.
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 38 tools group into four kinds. Reporting reads historical and forecast cost. Optimization reads recommendations from Compute Optimizer, Storage Lens and Cost Optimization Hub. Governance covers budgets and anomaly monitors. Pricing reads AWS's public price list, which needs no account data at all.
It is read-shaped throughout: nothing here changes an account, buys a reservation or edits a budget.
It covers cloud cost broadly, and reaches nothing in code review, release, production observability or agent observability.
| Part of the work | What AWS Cost Explorer has here | Can an agent reach it |
|---|---|---|
| Code, tests & review | None | No code-review product |
| CI & release | None | No CI product, and no build or test pipeline |
| Production observability | None | No telemetry. Cost data describes what resources were billed for, not how they behaved |
| Agent observability & evals | None | No traces, evaluations or prompt versioning for your own agents |
| AI cost management | Cost Explorer, budgets, anomalies, optimization, pricing | Yes. 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?
| Task | Tools | Works | Watch out for |
|---|---|---|---|
| Find where the bill went up | cost-explorer cost-comparison | Yes | Use 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 charge | cost-anomaly rec-details | Yes | Anomalies are AWS's own detections, so an absent anomaly is not proof of nothing unusual |
| Find what could be cheaper | cost-optimization compute-optimizer storage-lens | Yes | Compute Optimizer needs to have been enabled and to have collected enough history |
| Check reservation and savings-plan performance | ri-performance sp-performance | Yes | Reports utilization and coverage, not whether the commitment was a good idea |
| Price something before building it | aws-pricing bcm-pricing-calc | Yes | Public list pricing, so it ignores your negotiated rates and credits |
| Check budget status | budgets free-tier-usage | Yes | Reads budgets; it cannot create or change one |
| Explain why a service got slower | No | No telemetry of any kind. This is the bill, not the behavior |
38 tools registered, all on by default, all read-only
- Reporting3
cost-explorercost-comparisonfree-tier-usage- Anomalies and budgets3
cost-anomalybudgetsrec-details- Optimization4
cost-optimizationcompute-optimizercompute-optimizer-automationstorage-lens- Commitments2
ri-performancesp-performance- Pricing2
aws-pricingbcm-pricing-calc
Every tool reads; none changes an account. The groups above name the tools this page cites, not all 38; the rest come from the same tools/list response, counted on PyPI 0.0.33, 24 August 2026. PyPI carried 0.0.36 on 1 September 2026.
What connecting costs before the first question
A context window is the amount of text a model can hold at once, and connecting uses some of it before the agent asks anything. Every tool the server registers sends its name, description and input schema to the model when the session starts. The tool 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. 38 tools cost about 26,390 tokens. That is more than Grafana's default 65 tools cost, and more than GitHub's 44 cost.
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 on every session whether used or not.
| Tool set | Tools | Tokens (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, as registered | 38 | 26,390 to 32,764 | 26,006 to 32,695 | 33,821 to 47,206 | 13.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 input, charged once at connection.
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
Give it billing read access only
Every tool reads. An IAM role scoped to the Billing and Cost Management APIs costs nothing in capability, and it keeps the agent's reach to your bill.
- 2
Attach it for a session
At about 26,390 tokens this is among the heaviest connectors in the guide, so it is a poor default and a good investigation tool.
- 3
Set the region
Cost Explorer is a global service reached through a region, and
AWS_REGIONdecides which endpoint the SDK uses. - 4
Prefer a profile over inline keys
AWS_PROFILEkeeps 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.
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 makes it cost 26,390 tokens. 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 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 is enough, because nothing here writes.
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.
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.
{"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.
[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.
{"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.
{"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.
{"servers":{"aws-billing":{"command":"uvx",
"args":["awslabs.billing-cost-management-mcp-server@latest"],
"env":{"AWS_PROFILE":"your-profile","AWS_REGION":"us-east-1"}}}}The key is `servers`, not `mcpServers`. VS Code is the only client that uses that name, and copying a config from anywhere else fails silently.
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.
{"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.
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
Nothing here writes
All 38 tools read, so the connector cannot create a budget, buy a reservation or change a setting.
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-pricingreads 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
| Item | Value |
|---|---|
| Status | PyPI 0.0.36 · counted on 0.0.33 · shipped from the awslabs/mcp monorepo |
| Predecessor | cost-explorer-mcp-server, deprecated March 2026, removed April 2026 |
| Package | awslabs.billing-cost-management-mcp-server, run with uvx |
| Auth | AWS_PROFILE or a key pair, plus AWS_REGION |
| Permissions | Billing and Cost Management APIs, read access |
| Tools | 38, all on by default, all read-only |
| Context cost | About 26,390 tokens, 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 checked | What it shows |
|---|---|
| Package | awslabs.billing-cost-management-mcp-server 0.0.36 on PyPI, tools counted on 0.0.33 |
| Predecessor | cost-explorer-mcp-server, deprecated March 2026 and removed April 2026 |
| Tools | 38, all on by default |
| Average description length | 1,867 characters per tool |
| Writes | None. Every tool reads |
Package facts from PyPI, retrieved 24 August 2026. Tool counts and description lengths come from the server's own tools/list response. 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, which is a lot to leave attached.
- Operational risk
- Low. Every tool reads, so the credential is the only 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, from $10 per million spans.
See agent observabilityFrequently asked questions
How many tools does the AWS billing MCP server have?
38, all enabled on connection. Counted from the server's own tools/list response on PyPI 0.0.33, 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. That is charged on every session whether or not a tool is called.
Can it change anything in my account?
No. Every tool reads. It cannot create a budget, buy a reservation or change a setting.
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.