Registry /
aws / awslabs-billing-cost-management-mcp-server
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
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("}")
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.