Registry / aws / awslabs-billing-cost-management-mcp-server

awslabs-billing-cost-management-mcp-server

JSON →
library0.0.24pypypiunverified

The AWS Billing and Cost Management Model Context Protocol (MCP) server provides tools to analyze historical spending, identify cost optimization opportunities, and estimate new workload costs by wrapping boto3 SDK functions. Released by AWS Labs, it is currently at version 0.0.17 and is actively maintained, with updates released as part of the broader `awslabs/mcp` repository development.

pip install awslabs-billing-cost-management-mcp-server
INSTALL
IMPORT
SIG · AWSLABS-BILLING-CO
A
awslabs-billing-cost-management-mcp-server
awspythonv0.0.24
Install
14.2s avg
Import
Disk
150MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.24 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 16.3s
py 3.11
✓ —
✓ 15.4s
py 3.12
✓ —
✓ 12.55s
py 3.13
✓ —
✓ 12.38s
py 3.9
✕ build_error
✕ build_error
150MB installed
● package 150MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Server
This library is primarily designed to be run as a server process and interacted with via the Model Context Protocol (MCP) by AI clients (e.g., Amazon Q Developer CLI), rather than being imported directly into user Python code for function calls. There is no standard direct import pattern for a 'Server' class for typical application integration.
The interaction model is client-server through the MCP protocol, not direct Python module imports.

This quickstart describes how to run the AWS Billing and Cost Management MCP server using `uvx` and provides an example configuration for an MCP client like Amazon Q Developer CLI. The server itself is designed to be run as a separate process, and AI clients then connect to it to leverage its capabilities via natural language queries. Ensure `uv` is installed and AWS credentials with appropriate permissions are configured.

import os # Prerequisites: Install uv (e.g., curl -LsSf https://astral.sh/uv/install.sh | sh) # Ensure AWS credentials are configured (e.g., via ~/.aws/credentials or environment variables) # Minimum IAM permissions for Cost Explorer (ce:*), Budgets (budgets:*), Compute Optimizer (compute-optimizer:*) # Example of running the server via uvx and configuring an MCP client (like Amazon Q Developer CLI) # This code snippet demonstrates how to run the server in a way that an MCP client can connect. # It's not a direct Python import/call, but a shell command typically executed to start the server. # Set environment variables for AWS credentials if not using default profile # os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', 'YOUR_AWS_ACCESS_KEY_ID') # os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', 'YOUR_AWS_SECRET_ACCESS_KEY') # os.environ['AWS_SESSION_TOKEN'] = os.environ.get('AWS_SESSION_TOKEN', '') # Optional for temporary credentials os.environ['AWS_REGION'] = os.environ.get('AWS_REGION', 'us-east-1') os.environ['AWS_PROFILE'] = os.environ.get('AWS_PROFILE', 'default') print("Starting AWS Billing and Cost Management MCP Server...") print("Run 'uvx awslabs.billing-cost-management-mcp-server@latest' in your terminal.") print("Then, configure your MCP client (e.g., Amazon Q Developer CLI) to connect.") print("Example client configuration for ~/.aws/amazonq/mcp.json:") print("{") print(" \"mcpServers\": {") print(" \"awslabs.billing-cost-management-mcp-server\": {") print(" \"command\": \"uvx\",") print(" \"args\": [ \"awslabs.billing-cost-management-mcp-server@latest\" ],") print(" \"env\": {") print(" \"AWS_PROFILE\": \"" + os.environ['AWS_PROFILE'] + "\",") print(" \"AWS_REGION\": \"" + os.environ['AWS_REGION'] + "\"") print(" },") print(" \"disabled\": false,") print(" \"autoApprove\": []") print(" }") print(" }") print("}")
Debug
Known issues
breakingThe `awslabs.cost-analysis-mcp-server` and `awslabs.cost-explorer-mcp-server` are deprecated. Users should migrate to `awslabs-billing-cost-management-mcp-server` for broader cost analysis capabilities, including Cost Explorer, Budgets, and Cost Anomaly Detection. [8, 9]
fix
Migrate your MCP client configurations to use `awslabs.billing-cost-management-mcp-server` instead of the deprecated servers. [8, 9]
affects: <=0.0.17
gotchaUsing the AWS Billing and Cost Management MCP server incurs AWS API charges. Each API call made by the server, by wrapping boto3 functions, results in charges to your AWS account. [6, 8]
fix
Be aware of AWS Cost Explorer API pricing and other relevant service API pricing. Monitor your AWS bill for API usage. [6, 8]
affects: All versions
bugThe `get_reservation_coverage` operation within the `ri_performance` tool can fail with a `ValidationException` if `group_by` is specified. The underlying AWS GetReservationCoverage API requires `Granularity` and `GroupBy` to be mutually exclusive, but the server currently sends both. [13, 14]
fix
Avoid using `group_by` when querying `get_reservation_coverage` with the `ri_performance` tool. Monitor the `awslabs/mcp` GitHub repository for updates and the resolution of issue #2933, as a pull request for this fix is pending. [14]
affects: <=0.0.17
Upgrade
Version history
0.0.24latest on PyPI · released Jun 4, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.10 or newer.
uvrequiredRecommended for installation and execution via `uvx`.
boto3requiredUnderlying AWS SDK for Python, wrapped by this server.
Agent activity
25 hits · last 30 days
node
24
OpenAI (training)
1
Resources
awslabs-billing-cost-management-mcp-server — pip install awslabs-billing-cost-management-mcp-server · libregistry