Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Billing and cost management.
| Attribute | Details |
|---|---|
| Docker Image | mcp/billing-cost-management-mcp-server |
| Author | awslabs |
| Repository | https://github.com/awslabs/mcp |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/awslabs/mcp/blob/636aca8e109b5559006044f035bb89c16e9e5410/src/billing-cost-management-mcp-server/Dockerfile |
| Commit | 636aca8e109b5559006044f035bb89c16e9e5410 |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/billing-cost-management-mcp-server --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | Apache License 2.0 |
| Tools provided by this Server | Short Description |
|---|---|
aws-pricing | Comprehensive AWS pricing analysis tool that provides access to AWS service pricing information and cost analysis capabilities. |
bcm-pricing-calc | Allows working with workload estimates using the AWS Billing and Cost Management Pricing Calculator API. |
budgets | Retrieves AWS budget information using the AWS Budgets API. |
compute-optimizer | Retrieves recommendations from AWS Compute Optimizer. |
cost-anomaly | Retrieves AWS cost anomalies using the Cost Explorer GetAnomalies API. |
cost-comparison | Retrieves AWS cost comparisons between two one-month periods. |
cost-explorer | Retrieves AWS cost and usage data using the Cost Explorer API. |
cost-optimization | Retrieves cost optimization recommendations from AWS Cost Optimization Hub. |
describe-cost-category-definition | Returns the full definition of a cost category using the DescribeCostCategoryDefinition API. |
free-tier-usage | Retrieves AWS Free Tier usage information using the Free Tier Usage API. |
get-billing-group-cost-report | Retrieves the margin summary report for a specific billing group, which includes the AWS cost and charged amount (pro forma cost) broken down by attributes such as AWS service name or billing period. |
get-billing-view | Returns the metadata associated to the specified billing view ARN. |
get-resource-policy | Returns the resource-based policy document attached to the resource in JSON format. |
list-account-associations | Lists linked accounts associated with the payer account from AWS Billing Conductor. |
list-billing-group-cost-reports | Retrieves a summary report of actual AWS charges and calculated AWS charges based on the associated pricing plan of a billing group. |
list-billing-groups | Retrieves a list of billing groups from AWS Billing Conductor. |
list-billing-views | Lists the billing views available for a given time period. |
list-cost-allocation-tag-backfill-history | Retrieves the history of cost allocation tag backfill requests using the ListCostAllocationTagBackfillHistory API. |
list-cost-allocation-tags | Lists cost allocation tags in the account using the ListCostAllocationTags API. |
list-cost-category-definitions | Lists all cost category definitions in the account using the ListCostCategoryDefinitions API. |
list-custom-line-item-versions | Retrieves a list of versions for a specific custom line item from AWS Billing Conductor. |
list-custom-line-items | Retrieves a list of custom line items (FFLIs) from AWS Billing Conductor. |
list-pricing-plans | Retrieves a list of pricing plans from AWS Billing Conductor. |
list-pricing-plans-for-rule | Lists the pricing plans associated with a specific pricing rule. |
list-pricing-rules | Retrieves a list of pricing rules from AWS Billing Conductor. |
list-pricing-rules-for-plan | Lists the pricing rules associated with a specific pricing plan. |
list-resources-associated-to-custom-line-item | Lists the resources associated to a custom line item from AWS Billing Conductor. |
list-source-views-for-billing-view | Lists the source views (managed AWS billing views) that a custom billing view is built from. |
rec-details | Get detailed cost optimization recommendation with integrated data from multiple AWS services. |
ri-performance | Retrieves AWS Reserved Instance (RI) coverage and utilization data using the Cost Explorer API. |
session-sql | Execute SQL queries on the persistent session database. |
sp-performance | Tool that retrieves AWS Savings Plans coverage and utilization data using the Cost Explorer API. |
storage-lens | Query S3 Storage Lens metrics data using Athena SQL. |
aws-pricingComprehensive AWS pricing analysis tool that provides access to AWS service pricing information and cost analysis capabilities.
This tool supports four main operations:
USE THE OPERATIONS IN THIS ORDER:
IMPORTANT GUIDELINES:
operation|string|The pricing operation to perform ('get_service_codes', 'get_service_attributes', 'get_attribute_values', 'get_pricing_from_api')
attribute_name|stringoptional|Attribute name (e.g., 'instanceType', 'location', 'storageClass'). Required for get_attribute_values operation.
filters|stringoptional|Optional filters for pricing queries as a JSON string. Format: '{"instanceType": "t3.medium", "location": "US East (N. Virginia)"}'
max_results|stringoptional|Maximum number of results to return (optional)
service_code|stringoptional|AWS service code (e.g., 'AmazonEC2', 'AmazonS3', 'AmazonES'). Required for get_service_attributes, get_attribute_values, and get_pricing_from_api operations.bcm-pricing-calcAllows working with workload estimates using the AWS Billing and Cost Management Pricing Calculator API.
IMPORTANT USAGE GUIDELINES:
USE THIS TOOL FOR:
list_workload_estimates - list of available workload estimates Required: operation="list_workload_estimates" Optional: created_after, created_before, expires_after, expires_before, status_filter, name_filter, name_match_option, next_token, max_results Returns: List of all workload estimates for the account.
get_workload_estimate - get details of a workload estimate Required: operation="get_workload_estimate", identifier Returns: Details of a specific workload estimate.
list_workload_estimate_usage - list of modeled usage lines within a workload estimate Required: operation="get_workload_estimate", identifier Optional: usage_account_id_filter, service_code_filter, usage_type_filter, operation_filter, location_filter, usage_group_filter, next_token, max_results Returns: List of usage associated with a workload estimate.
get_preferences - get the rate preferences available to an account
Required: operation="get_preferences"
Returns: Retrieves the current preferences for AWS Billing and Cost Management Pricing Calculator.
Parameters|Type|Description
-|-|-
operation|string|
created_after|stringoptional|
created_before|stringoptional|
expires_after|stringoptional|
expires_before|stringoptional|
identifier|stringoptional|
location_filter|stringoptional|
max_pages|stringoptional|
max_results|stringoptional|
name_filter|stringoptional|
name_match_option|stringoptional|
next_token|stringoptional|
operation_filter|stringoptional|
service_code_filter|stringoptional|
status_filter|stringoptional|
usage_account_id_filter|stringoptional|
usage_group_filter|stringoptional|
usage_type_filter|stringoptional|
budgetsRetrieves AWS budget information using the AWS Budgets API.
This tool uses the DescribeBudgets API to retrieve all budgets for an account.
The API returns information about:
With this information, you can determine which budgets have been exceeded or are projected to exceed their limits.
The tool automatically retrieves the AWS account ID of the calling identity or uses the provided account_id.
| Parameters | Type | Description |
|---|---|---|
account_id | stringoptional | Optional AWS account ID. If not provided, it will be retrieved automatically. |
budget_name | stringoptional | Optional budget name filter. If provided, only returns information for the specified budget. |
max_results | integeroptional | Maximum number of results to return. Defaults to 100. |
compute-optimizerRetrieves recommendations from AWS Compute Optimizer.
IMPORTANT USAGE GUIDELINES:
USE THIS TOOL FOR:
DO NOT USE FOR: Cost optimization or idle detection (use cost-optimization-hub)
Note: Compute Optimizer is a regional service. Specify a region to get recommendations for resources in that region. If omitted, defaults to AWS_REGION env var or us-east-1.
This tool supports the following operations:
Each operation can be filtered by AWS account IDs, regions, finding types, and more.
Common finding types include:
operation|string|The operation to perform (e.g., 'get_ec2_instance_recommendations')
account_ids|stringoptional|Optional list of AWS account IDs as JSON array string
filters|stringoptional|Optional filter expression as JSON string
max_results|stringoptional|Maximum number of results to return (1-100)
next_token|stringoptional|Optional pagination token from a previous response
region|stringoptional|AWS region to query (e.g., 'us-west-2'). Defaults to AWS_REGION env var or us-east-1.cost-anomalyRetrieves AWS cost anomalies using the Cost Explorer GetAnomalies API.
This tool allows you to retrieve cost anomalies detected on your AWS account during a specified time period. Anomalies are available for up to 90 days.
You can filter anomalies by:
Note: Both start_date and end_date are INCLUSIVE. To get anomalies including today, use today's date as end_date.
Feedback status options:
end_date|string|End date in YYYY-MM-DD format (inclusive — use today's date to include today's anomalies). Required.
start_date|string|Start date in YYYY-MM-DD format (inclusive). Required.
feedback|stringoptional|Optional filter for anomalies by feedback status (YES, NO, PLANNED_ACTIVITY).
max_results|stringoptional|Optional maximum number of results to return.
monitor_arn|stringoptional|Optional ARN of a specific cost anomaly monitor to filter results.
total_impact_end|stringoptional|Optional end value for total impact filter (required when using BETWEEN operator).
total_impact_operator|stringoptional|Optional numeric operator for filtering by total impact (EQUAL, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, BETWEEN).
total_impact_start|stringoptional|Optional start value for total impact filter.cost-comparisonRetrieves AWS cost comparisons between two one-month periods.
Do not use this tool except for comparing the costs of one month to the costs of another month. This tool should not be used for week-over-week or quarter-over-quarter (e.g., comparing Q2 vs. Q1) analysis.
USE THIS TOOL ONLY FOR:
STRICT LIMITATIONS:
This tool supports two main operations:
Both operations require:
Supported metrics for comparison include:
You can group results by dimensions such as:
Note:
baseline_end_date|string|Baseline period end date in YYYY-MM-DD format (must be first day of next month)
baseline_start_date|string|Baseline period start date in YYYY-MM-DD format (must be first day of month)
comparison_end_date|string|Comparison period end date in YYYY-MM-DD format (must be first day of next month)
comparison_start_date|string|Comparison period start date in YYYY-MM-DD format (must be first day of month)
metric_for_comparison|string|The cost metric to compare (e.g., BlendedCost, UnblendedCost, AmortizedCost)
operation|string|The operation to perform: 'getCostAndUsageComparisons' or 'getCostComparisonDrivers'
billing_view_arn|stringoptional|Optional ARN of a specific billing view
filter|stringoptional|Optional filter to apply to the results as a JSON string
group_by|stringoptional|Optional grouping of results as a JSON string (e.g., '[{"Type": "DIMENSION", "Key": "SERVICE"}]')
max_results|stringoptional|Maximum number of results to return (default: 10, max: 2000 for comparisons, max: 10 for drivers)cost-explorerRetrieves AWS cost and usage data using the Cost Explorer API.
IMPORTANT USAGE GUIDELINES:
USE THIS TOOL FOR:
getCostAndUsageWithResources - Resource-level cost data (limited to last 14 days) Required: operation="getCostAndUsageWithResources", filter, granularity, start_date, end_date Optional: metrics, group_by, next_token, max_pages, billing_view_arn Notes: RESOURCE_ID must be included in either filter OR group_by parameters. This operation is limited to past 14 days of data from current date. Hourly granularity is only available for EC2-Instances resource-level data. All other resource-level data is available at daily granularity. Example: {"operation": "getCostAndUsageWithResources", "start_date": "2025-08-07", "end_date": "2025-08-21", "granularity": "DAILY", "filter": "{"Dimensions": {"Key": "SERVICE", "Values": ["Amazon Elastic Compute Cloud - Compute"]}}", "group_by": "[{"Type": "DIMENSION", "Key": "RESOURCE_ID"}]"} Returns: Cost data with resource-level granularity
getDimensionValues - List of available values for specified dimension Required: operation="getDimensionValues", dimension, start_date, end_date Optional: context, search_string, filter, max_results, billing_view_arn Example: {"operation": "getDimensionValues", "dimension": "SERVICE", "start_date": "2024-01-01", "end_date": "2024-02-01"} Returns: List of values for specified dimension with automatic pagination
getCostForecast - Future cost projections Required: operation="getCostForecast", metric, granularity, start_date, end_date Optional: filter, prediction_interval_level, billing_view_arn Example: {"operation": "getCostForecast", "metric": "UNBLENDED_COST", "granularity": "MONTHLY", "start_date": "2025-08-22", "end_date": "2025-11-22"} Notes: metric value for this operation should be in all caps Returns: Cost forecast for specified time period and granularity
getUsageForecast - Future usage projections Required: operation="getUsageForecast", metric, granularity, start_date, end_date, filter Optional: prediction_interval_level, billing_view_arn Example 1: {"operation": "getUsageForecast", "metric": "USAGE_QUANTITY", "granularity": "MONTHLY", "start_date": "2025-08-22", "end_date": "2025-11-22", "filter": "{"Dimensions": {"Key": "USAGE_TYPE_GROUP", "Values": ["EC2-Instance"]}}"} Example 2: {"operation": "getUsageForecast", "metric": "USAGE_QUANTITY", "granularity": "MONTHLY", "start_date": "2025-08-22", "end_date": "2025-11-22", "filter": "{"And": [{"Dimensions": {"Key": "SERVICE", "Values": ["Amazon Elastic Compute Cloud - Compute"]}}, {"Dimensions": {"Key": "USAGE_TYPE", "Values": ["BoxUsage:p4de.24xlarge"]}}]}"} Example 3: {"operation": "getUsageForecast", "metric": "USAGE_QUANTITY", "granularity": "MONTHLY", "start_date": "2025-08-22", "end_date": "2025-11-22", "filter": "{"Dimensions": {"Key": "USAGE_TYPE", "Values": ["BoxUsage:p4de.24xlarge", "Reservation:p4de.24xlarge", "UnusedBox:p4de.24xlarge"]}}", "group_by": "[{"Type": "DIMENSION", "Key": "REGION"}]"} Notes: Valid values for metric is: USAGE_QUANTITY, NORMALIZED_USAGE_AMOUNT. Valid values for granularity is: DAILY, MONTHLY. Filter is REQUIRED and must specify USAGE_TYPE or USAGE_TYPE_GROUP to define what usage units to forecast. Returns: Usage forecast for specified time period and granularity
getTagsOrValues - Available cost allocation tags or values Required: operation="getTagsOrValues" Optional: start_date, end_date, search_string, next_token, max_pages, billing_view_arn Example 1: {"operation": "getTagsOrValues"} Example 2: {"operation": "getTagsOrValues", "tag_key": "Environment"} Returns: List of available cost allocation tags with automatic pagination. If tag values for a particular key are needed, pass the tag key as a parameter.
getCostCategories - Available cost categories or values inside a category Required: operation="getCostCategories", start_date, end_date Optional: cost_category_name, search_string, next_token, max_pages, billing_view_arn Example 1 (list category names): {"operation": "getCostCategories", "start_date": "2024-01-01", "end_date": "2024-08-01"} Example 2 (list values inside a category): {"operation": "getCostCategories", "cost_category_name": "CostCenters", "start_date": "2024-01-01", "end_date": "2024-08-01"} Notes: Without cost_category_name the response contains CostCategoryNames. With cost_category_name set the response contains CostCategoryValues for that category. Pagination is automatic.
getSavingsPlansUtilization - Savings Plans utilization data Required: operation="getSavingsPlansUtilization", start_date, end_date Optional: granularity, filter Example: {"operation": "getSavingsPlansUtilization", "granularity": "MONTHLY"} Notes: This operation supports only DAILY and MONTHLY granularity Returns: Savings Plans utilization for the specified time period
DIMENSION REFERENCE:
BILLING VIEW SUPPORT: Most Cost Explorer operations support an optional billing_view_arn parameter that allows you to scope your query to a specific billing view. If not provided, the query defaults to the account's primary billing view. You can use the list-billing-views and get-billing-view tools upon request to discover available billing views and their ARNs.
Billing view types:
operation|string|The operation to perform
billing_view_arn|stringoptional|Optional ARN of a billing view to scope the query
cost_category_name|stringoptional|Cost category to get values for
dimension|stringoptional|Dimension to get values for (getDimensionValues)
end_date|stringoptional|End date for cost data in YYYY-MM-DD format (exclusive)
filter|stringoptional|Filter to apply to the results
granularity|stringoptional|Granularity of the returned data (DAILY, MONTHLY, etc.)
group_by|stringoptional|How to group the results
max_pages|stringoptional|Maximum number of pages to retrieve
max_results|stringoptional|Maximum number of results to return
metric|stringoptional|Metric for cost forecasts
metrics|stringoptional|Metrics to include in the response
next_token|stringoptional|Pagination token
prediction_interval_level|integeroptional|Confidence level for forecasts
search_string|stringoptional|Search string to filter dimension values
start_date|stringoptional|Start date for cost data in YYYY-MM-DD format
tag_key|stringoptional|Tag key to get values forcost-optimizationRetrieves cost optimization recommendations from AWS Cost Optimization Hub.
IMPORTANT USAGE GUIDELINES:
USE THIS TOOL FOR:
DO NOT USE FOR: Performance optimization (use compute-optimizer)
Supported Operations:
IMPORTANT: 'list_recommendation_summaries' operation REQUIRES a 'group_by' parameter. Valid 'group_by' values: AccountId, Region, ActionType, ResourceType, RestartNeeded, RollbackPossible, ImplementationEffort
CRITICAL PARAMETER REQUIREMENTS:
Available Filter Parameters (pass as JSON string):
Cost Optimization Hub provides recommendations across multiple AWS services, including:
Each recommendation includes:
operation|string|The operation to perform ('list_recommendations', 'get_recommendation', or 'list_recommendation_summaries')
filters|stringoptional|Optional filter expression as JSON string
group_by|stringoptional|Optional grouping parameter for list_recommendation_summaries
include_all_recommendations|stringoptional|Whether to include all recommendations
max_results|stringoptional|Maximum total results to return across all pages; None means all available results
resource_id|stringoptional|Resource ID for get_recommendation operation
resource_type|stringoptional|Resource type for get_recommendation operationdescribe-cost-category-definitionReturns the full definition of a cost category using the DescribeCostCategoryDefinition API.
Cost categories group AWS costs using rule-based expressions that match line items by dimensions (SERVICE, LINKED_ACCOUNT, USAGE_TYPE), resource tags, or other cost category values. Each matched line item is assigned a category value such as "Production" or "Development". Rules can be REGULAR (explicit match) or INHERITED_VALUE (dynamic value from a tag key or account name). A DefaultValue catches costs that do not match any rule.
The tool returns a CostCategory object containing:
Linked accounts can describe cost categories from their management account.
Required parameters:
Optional parameters:
Example 1 - Get current definition: {"cost_category_arn": "arn:aws:ce::123456789012:costcategory/abcd-1234"} Example 2 - Get historical version: {"cost_category_arn": "arn:aws:ce::123456789012:costcategory/abcd-1234", "effective_on": "2024-06-01T00:00:00Z"}
| Parameters | Type | Description |
|---|---|---|
cost_category_arn | string | ARN of the cost category to describe |
effective_on | stringoptional | Optional ISO 8601 datetime to retrieve a historical version |
free-tier-usageRetrieves AWS Free Tier usage information using the Free Tier Usage API.
This tool provides insights into your AWS Free Tier usage across services:
filter|stringoptional|Optional filter to apply to the results as a JSON string.
max_results|stringoptional|Maximum number of results to return per page (1-1000). Defaults to 100.
operation|stringoptional|The operation to perform: 'get_free_tier_usage'get-billing-group-cost-reportRetrieves the margin summary report for a specific billing group, which includes the AWS cost and charged amount (pro forma cost) broken down by attributes such as AWS service name or billing period.
This tool retrieve detailed cost reports for a single billing group, optionally broken down by product name and/or billing period.
The tool returns margin summary report results for the billing group:
You can customize the report by:
Example 1: {"arn": "arn:aws:billingconductor::123456789012:billinggroup/abc", "group_by": "["PRODUCT_NAME"]"} Example 2: {"arn": "arn:aws:billingconductor::123456789012:billinggroup/abc", "group_by": "["PRODUCT_NAME", "BILLING_PERIOD"]", "billing_period_range": "{"InclusiveStartBillingPeriod": "2025-01", "ExclusiveEndBillingPeriod": "2025-07"}"}
| Parameters | Type | Description |
|---|---|---|
arn | string | The ARN that uniquely identifies the billing group. |
billing_period_range | stringoptional | Optional JSON string specifying a time range (up to 12 months). |
group_by | stringoptional | Optional JSON string with attributes to group by ("PRODUCT_NAME", "BILLING_PERIOD"). |
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
next_token | stringoptional | Optional pagination token from a previous response. |
get-billing-viewReturns the metadata associated to the specified billing view ARN.
A billing view is an AWS resource that defines a segment of AWS cost management data. There are four types of billing views:
The tool returns information about:
Example: {"arn": "arn:aws:billing::123456789012:billingview/custom-view-abc123"}
| Parameters | Type | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) that can be used to uniquely identify |
| the billing view. Required. |
get-resource-policyReturns the resource-based policy document attached to the resource in JSON format.
Resource-based policies are used to control access to billing view resources. When a custom billing view is shared with other accounts (within or outside the organization) using AWS Resource Access Manager (AWS RAM), a resource-based policy is attached to the billing view resource defining the access permissions.
Use this tool to:
The tool returns:
Example: {"resource_arn": "arn:aws:billing::123456789012:billingview/custom-view-abc123"}
| Parameters | Type | Description |
|---|---|---|
resource_arn | string | The Amazon Resource Name (ARN) of the billing view resource |
| to which the policy is attached to. Required. |
list-account-associationsLists linked accounts associated with the payer account from AWS Billing Conductor.
This tool retrieve linked accounts for a given billing period. If no billing period is provided, the current billing period is used.
The tool returns information about each linked account:
You can filter account associations by:
The tool paginates through results up to max_pages pages (default 10). If more results are available after reaching the page limit, a next_token is returned. Pass the next_token back to this tool to continue fetching from where you left off.
Example 1: {"billing_period": "2025-01"} Example 2 (monitored only): {"filters": "{"Association": "MONITORED"}", "billing_period": "2025-01"} Example 3 (by account IDs): {"filters": "{"AccountIds": ["123456789012", "234567890123"]}"}
| Parameters | Type | Description |
|---|---|---|
billing_period | stringoptional | Optional billing period in YYYY-MM format (e.g., "2025-01"). |
| If not provided, the current billing period is used. | ||
filters | stringoptional | Optional JSON string containing filter criteria. Supported filters: |
max_pages|integeroptional|Maximum number of API pages to fetch. Defaults to 10.
next_token|stringoptional|Optional pagination token from a previous response.list-billing-group-cost-reportsRetrieves a summary report of actual AWS charges and calculated AWS charges based on the associated pricing plan of a billing group.
This tool retrieve cost reports for billing groups. If no billing period is provided, the current billing period is used.
The tool returns cost report information for each billing group:
You can filter cost reports by:
Example 1: {"billing_period": "2025-01"} Example 2 (with filter): {"filters": "{"BillingGroupArns": ["arn:aws:billingconductor::123456789012:billinggroup/abc"]}", "billing_period": "2025-01"}
| Parameters | Type | Description |
|---|---|---|
billing_period | stringoptional | Optional billing period in YYYY-MM format (e.g., "2025-01"). |
| If not provided, the current billing period is used. | ||
filters | stringoptional | Optional JSON string containing filter criteria. Supported filters: |
max_pages|integeroptional|Maximum number of API pages to fetch. Defaults to 10.
next_token|stringoptional|Optional pagination token from a previous response.list-billing-groupsRetrieves a list of billing groups from AWS Billing Conductor.
This tool retrieve billing groups for a given billing period. If no billing period is provided, the current billing period is used.
The tool returns information about:
You can filter billing groups by:
The tool paginates through results up to max_pages pages (default 10). If more results are available after reaching the page limit, a next_token is returned. Pass the next_token back to this tool to continue fetching from where you left off.
Example 1: {"billing_period": "2025-01"} Example 2 (with filter): {"filters": "{"Statuses": ["ACTIVE"], "BillingGroupTypes": ["STANDARD"]}", "billing_period": "2025-01"}
| Parameters | Type | Description |
|---|---|---|
billing_period | stringoptional | Optional billing period in YYYY-MM format (e.g., "2025-01"). |
| If not provided, the current billing period is used. | ||
filters | stringoptional | Optional JSON string containing filter criteria. Supported filters: |
max_pages|integeroptional|Maximum number of API pages to fetch. Defaults to 10.
next_token|stringoptional|Optional pagination token from a previous response.list-billing-viewsLists the billing views available for a given time period.
Every AWS account has a unique PRIMARY billing view that represents the billing data available by default. Accounts that use AWS Billing Conductor also have BILLING_GROUP billing views representing pro forma costs associated with each created billing group.
If activeTimeRange is provided, only billing views that were active during that time window are returned. Else, all billing views that ever existed are returned, including views for deleted billing groups and ended billing transfers.
The tool returns a list of billing views with information about:
You can filter billing views by:
The tool paginates through results up to max_pages pages (default 10). If more results are available after reaching the page limit, a next_token is returned. Pass the next_token back to this tool to continue fetching from where you left off.
Example 1: {} Example 2 (filter by type): {"billing_view_types": "["PRIMARY", "CUSTOM"]"} Example 3 (filter by owner): {"owner_account_id": "123456789012"} Example 4 (filter by name): {"names": "[{"searchOption": "STARTS_WITH", "searchValue": "MyView"}]"} Example 5 (with time range, date only): {"active_after_inclusive": "2024-01-01", "active_before_inclusive": "2024-01-31"} Example 6 (with time range, second precision): {"active_after_inclusive": "2024-01-01T00:00:00", "active_before_inclusive": "2024-01-31T23:59:59"} Example 7 (filter by ARNs): {"arns": "["arn:aws:billing::123456789012:billingview/custom-view-abc123"]"}
| Parameters | Type | Description |
|---|---|---|
active_after_inclusive | stringoptional | Optional inclusive start of the active time range in UTC. |
| Format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC). | ||
| Must be provided together with active_before_inclusive. | ||
| The time range must be within one calendar month. | ||
active_before_inclusive | stringoptional | Optional inclusive end of the active time range in UTC. |
| Format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC). | ||
| Must be provided together with active_after_inclusive. | ||
| The time range must be within one calendar month. | ||
arns | stringoptional | Optional JSON string containing a list of billing view ARNs to filter by. |
| Maximum 10 items. | ||
billing_view_types | stringoptional | Optional JSON string containing a list of billing view types. |
| Valid values: PRIMARY, BILLING_GROUP, CUSTOM, BILLING_TRANSFER, | ||
| BILLING_TRANSFER_SHOWBACK. | ||
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
max_results | stringoptional | Optional maximum number of billing views to retrieve per page. |
| Valid range: 1-100. Default is 100. | ||
names | stringoptional | Optional JSON string containing a list of StringSearch objects. |
| Each object has searchOption (valid value: STARTS_WITH) and searchValue | ||
| (1-128 characters). Fixed number of 1 item. | ||
next_token | stringoptional | Optional pagination token from a previous response. |
owner_account_id | stringoptional | Optional owner account ID to filter by (12-digit AWS account ID). |
source_account_id | stringoptional | Optional source account ID to filter by (12-digit AWS account ID). |
list-cost-allocation-tag-backfill-historyRetrieves the history of cost allocation tag backfill requests using the ListCostAllocationTagBackfillHistory API.
Backfill retroactively applies the current tag activation status to historical billing data. Without backfill, tag activation only affects future billing periods.
Backfill requests progress through these states:
Constraints: Only one backfill can run at a time. There is a 24-hour cooldown between requests. Maximum lookback is 12 months. BackfillFrom must be the first day of a month at 00:00:00 UTC.
The tool returns CostAllocationTagBackfillRequest objects containing:
You can control pagination with:
Example 1 - Get latest backfill request: {"max_results": 1} Example 2 - Get full backfill history: {"max_pages": 10}
| Parameters | Type | Description |
|---|---|---|
max_pages | stringoptional | Max pages to auto-paginate through |
max_results | stringoptional | Max results per page (1-1000) |
next_token | stringoptional | Pagination token from previous response |
list-cost-allocation-tagsLists cost allocation tags in the account using the ListCostAllocationTags API.
Cost allocation tags must be activated before they appear in Cost Explorer, CUR, and budgets. There are two types: AWSGenerated (auto-created by AWS services like aws:createdBy) and UserDefined (created by customers via resource tagging APIs).
The tool returns CostAllocationTag objects containing:
You can filter tags by:
Limits: 500 active cost allocation tag keys per payer account (adjustable via Service Quotas up to 1,000). Max 20 tags per UpdateCostAllocationTagsStatus request.
Example 1 - List active user-defined tags: {"status": "Active", "tag_type": "UserDefined"} Example 2 - Check specific tag keys: {"tag_keys": "["Environment", "Team"]"} Example 3 - List all tags with no filters: {}
| Parameters | Type | Description |
|---|---|---|
max_pages | stringoptional | Max pages to auto-paginate through |
max_results | stringoptional | Max results per page (1-1000, default 100) |
next_token | stringoptional | Pagination token from previous response |
status | stringoptional | Filter by tag status (Active, Inactive) |
tag_keys | stringoptional | JSON array of tag key strings to filter by (max 100) |
tag_type | stringoptional | Filter by tag type (AWSGenerated, UserDefined) |
list-cost-category-definitionsLists all cost category definitions in the account using the ListCostCategoryDefinitions API.
Returns lightweight references for each cost category, not full rule definitions. Use describe-cost-category-definition with the returned ARN to get the complete rule set.
The tool returns CostCategoryReference objects containing:
You can filter and paginate with:
Limits: 50 cost categories per management account, 500 rules per category (API), 100 rules per category (console), 10 split charge rules per category.
Example 1 - List all current categories: {} Example 2 - List categories active on a date: {"effective_on": "2024-06-01T00:00:00Z"} Example 3 - Filter by billing view support: {"supported_resource_types": "["billing:billingview"]"}
| Parameters | Type | Description |
|---|---|---|
effective_on | stringoptional | Optional ISO 8601 datetime to filter by active date |
max_pages | stringoptional | Max pages to auto-paginate through |
max_results | stringoptional | Max results per page (1-100, default 20) |
next_token | stringoptional | Pagination token from previous response |
supported_resource_types | stringoptional | Optional JSON array of resource type strings |
list-custom-line-item-versionsRetrieves a list of versions for a specific custom line item from AWS Billing Conductor.
This tool retrieve all versions of a custom line item. If no billing period is provided, the current billing period is used.
The tool returns information about each version including charge details, computation rule, billing periods, and timestamps.
You can filter versions by:
Example 1: {"arn": "arn:aws:billingconductor::123456789012:customlineitem/abcdef1234"} Example 2: {"arn": "...", "filters": "{"BillingPeriodRange": {"StartBillingPeriod": "2025-01", "EndBillingPeriod": "2025-06"}}"}
| Parameters | Type | Description |
|---|---|---|
arn | string | The ARN for the custom line item. Required. |
filters | stringoptional | Optional JSON string with filter criteria (BillingPeriodRange). |
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
next_token | stringoptional | Optional pagination token from a previous response. |
list-custom-line-itemsRetrieves a list of custom line items (FFLIs) from AWS Billing Conductor.
Custom line items let you allocate costs and discounts to designated AWS accounts within a billing group. Common use cases include allocating support fees, shared service costs, managed service fees, taxes, credits, and distributing RI/Savings Plans savings.
This tool retrieve custom line items for a given billing period. If no billing period is provided, the current billing period is used.
The tool returns information about:
You can filter custom line items by:
Example 1: {"billing_period": "2025-01"} Example 2 (with filter): {"filters": "{"Names": ["MyCustomLineItem"]}", "billing_period": "2025-01"}
| Parameters | Type | Description |
|---|---|---|
billing_period | stringoptional | Optional billing period in YYYY-MM format (e.g., "2025-01"). |
filters | stringoptional | Optional JSON string with filter criteria (AccountIds, Arns, BillingGroups, Names). |
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
next_token | stringoptional | Optional pagination token from a previous response. |
list-pricing-plansRetrieves a list of pricing plans from AWS Billing Conductor.
This tool retrieve pricing plans for a given billing period. If no billing period is provided, the current billing period is used.
The tool returns information about:
You can filter pricing plans by:
Example 1: {"billing_period": "2025-01"} Example 2: {"filters": "{"Arns": ["arn:aws:billingconductor::123456789012:pricingplan/abc"]}", "billing_period": "2025-01"}
| Parameters | Type | Description |
|---|---|---|
billing_period | stringoptional | Optional billing period in YYYY-MM format. |
filters | stringoptional | Optional JSON string with filter criteria (Arns). |
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
next_token | stringoptional | Optional pagination token from a previous response. |
list-pricing-plans-for-ruleLists the pricing plans associated with a specific pricing rule.
This tool retrieve pricing plans associated with a specific pricing rule If no billing period is provided, the current billing period is used.
The tool returns information about:
Example: {"pricing_rule_arn": "arn:aws:billingconductor::123456789012:pricingrule/abc"}
| Parameters | Type | Description |
|---|---|---|
pricing_rule_arn | string | The ARN of the pricing rule. Required. |
billing_period | stringoptional | Optional billing period in YYYY-MM format. |
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
max_results | stringoptional | Optional maximum number of results per page (1-100). |
next_token | stringoptional | Optional pagination token from a previous response. |
list-pricing-rulesRetrieves a list of pricing rules from AWS Billing Conductor.
This tool retrieve pricing rules for a given billing period.
The tool returns information about:
You can filter pricing rules by:
Example 1: {"billing_period": "2025-01"} Example 2: {"filters": "{"Arns": ["arn:aws:billingconductor::123456789012:pricingrule/abc"]}", "billing_period": "2025-01"}
| Parameters | Type | Description |
|---|---|---|
billing_period | stringoptional | Optional billing period in YYYY-MM format. |
filters | stringoptional | Optional JSON string with filter criteria (Arns). |
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
next_token | stringoptional | Optional pagination token from a previous response. |
list-pricing-rules-for-planLists the pricing rules associated with a specific pricing plan.
This tool retrieve pricing rules associated with a specific pricing plan If no billing period is provided, the current billing period is used.
The tool returns information about:
Example: {"pricing_plan_arn": "arn:aws:billingconductor::123456789012:pricingplan/abc"}
| Parameters | Type | Description |
|---|---|---|
pricing_plan_arn | string | The ARN of the pricing plan. Required. |
billing_period | stringoptional | Optional billing period in YYYY-MM format. |
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
max_results | stringoptional | Optional maximum number of results per page (1-100). |
next_token | stringoptional | Optional pagination token from a previous response. |
list-resources-associated-to-custom-line-itemLists the resources associated to a custom line item from AWS Billing Conductor.
This tool retrieve resources associated with a specific custom line item. If no billing period is provided, the current billing period is used.
The tool returns information about each associated resource:
You can filter associated resources by:
Example 1: {"arn": "arn:aws:billingconductor::123456789012:customlineitem/abcdef1234"} Example 2: {"arn": "...", "filters": "{"Relationship": "CHILD"}", "billing_period": "2025-01"}
| Parameters | Type | Description |
|---|---|---|
arn | string | The ARN of the custom line item. Required. |
billing_period | stringoptional | Optional billing period in YYYY-MM format. |
filters | stringoptional | Optional JSON string with filter criteria (Relationship). |
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
next_token | stringoptional | Optional pagination token from a previous response. |
list-source-views-for-billing-viewLists the source views (managed AWS billing views) that a custom billing view is built from.
A custom billing view is created as a "multi-source view" by combining cost management data from up to 20 source views. Source views are managed billing views (typically PRIMARY or other CUSTOM billing views) from the same or different AWS organizations. This enables consolidation of cost management data across multiple organizations into a single custom billing view.
Use this tool to:
The tool paginates through results up to max_pages pages (default 10). If more results are available after reaching the page limit, a next_token is returned. Pass the next_token back to this tool to continue fetching from where you left off.
Example 1: {"arn": "arn:aws:billing::123456789012:billingview/custom-view-abc123"} Example 2 (with max_results): {"arn": "arn:aws:billing::123456789012:billingview/custom-view-abc123", "max_results": 5} Example 3 (with next_token): {"arn": "arn:aws:billing::123456789012:billingview/custom-view-abc123", "next_token": "token123"}
| Parameters | Type | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) that can be used to uniquely identify |
| the billing view. Required. | ||
max_pages | integeroptional | Maximum number of API pages to fetch. Defaults to 10. |
max_results | stringoptional | Optional maximum number of entries a paginated response contains. |
| Valid range: 1-100. | ||
next_token | stringoptional | Optional pagination token from a previous response. |
rec-detailsGet detailed cost optimization recommendation with integrated data from multiple AWS services.
This tool combines data from:
It provides comprehensive analysis with utilization metrics, savings calculations, and implementation guidance.
RESPONSE FORMATTING INSTRUCTIONS: The tool may return both raw recommendation data and a formatting template. When presenting the recommendation:
recommendation_id|string|ID of the recommendation to retrieve details forri-performanceRetrieves AWS Reserved Instance (RI) coverage and utilization data using the Cost Explorer API.
This tool provides insights into your Reserved Instance (RI) and Savings Plans usage patterns through two main operations:
get_reservation_coverage: Shows how much of your eligible usage is covered by RIs
get_reservation_utilization: Shows how effectively you're using your purchased RIs
Supported dimensions for grouping reservation coverage:
Reservation utilization can only be grouped by SUBSCRIPTION_ID.
| Parameters | Type | Description |
|---|---|---|
operation | string | The operation to perform: 'get_reservation_coverage' or 'get_reservation_utilization' |
end_date | stringoptional | End date in YYYY-MM-DD format (exclusive). Defaults to today if not provided. |
filter | stringoptional | Optional filter to apply to the results as a JSON string, such as filtering by service, region, or instance type. |
granularity | stringoptional | Time granularity of the data (DAILY or MONTHLY). Defaults to DAILY. |
group_by | stringoptional | Optional grouping of results as a JSON string. For coverage, supports multiple dimensions. For utilization, only supports SUBSCRIPTION_ID. |
max_results | stringoptional | Maximum number of results to return per page. |
metrics | stringoptional | List of metrics to retrieve for coverage as a JSON string (e.g., '["HoursCoverage", "CostCoverage"]'). Defaults to all metrics. |
sort_by | stringoptional | Optional sorting configuration as a JSON string with key and direction (ASCENDING or DESCENDING). |
start_date | stringoptional | Start date in YYYY-MM-DD format (inclusive). Defaults to 30 days ago if not provided. |
session-sqlExecute SQL queries on the persistent session database.
This tool queries tables created by other tools (like cost_explorer_sql) within the current session. All tools share the same database, allowing cross-tool data analysis and joins.
Use this tool to:
Common queries:
query|string|SQL query to execute
data|stringoptional|Optional array of data rows to add to database before querying
schema|stringoptional|Optional column definitions for user data (e.g. ["service TEXT", "cost REAL"])
table_name|stringoptional|Optional name for user data table (auto-generated if not provided)sp-performanceTool that retrieves AWS Savings Plans coverage and utilization data using the Cost Explorer API.
This tool provides insights into your Savings Plans usage patterns through three main operations:
operation|string|The operation to perform: 'get_savings_plans_coverage', 'get_savings_plans_utilization', or 'get_savings_plans_utilization_details'
end_date|stringoptional|End date in YYYY-MM-DD format (exclusive). Defaults to today if not provided.
filter|stringoptional|Optional filter to apply to the results as a JSON string.
granularity|stringoptional|Time granularity of the data (DAILY or MONTHLY). Defaults to DAILY.
group_by|stringoptional|Optional grouping of results as a JSON string. For coverage, supports SERVICE, REGION, or INSTANCE_FAMILY.
max_results|stringoptional|Maximum number of results to return per page.
metrics|stringoptional|List of metrics to retrieve as a JSON string. For coverage, only 'SpendCoveredBySavingsPlans' is valid.
start_date|stringoptional|Start date in YYYY-MM-DD format (inclusive). Defaults to 30 days ago if not provided.storage-lensQuery S3 Storage Lens metrics data using Athena SQL.
IMPORTANT USAGE GUIDELINES:
This tool allows you to analyze S3 Storage Lens metrics data using SQL queries. Storage Lens provides metrics about your S3 storage, including:
STORAGE LENS EXPORT SCHEMA: The Storage Lens export data has the following standard columns:
IMPORTANT: Metrics are stored in rows, not columns. Each row represents one metric value for a specific combination of dimensions.
Environment variables:
Example queries:
Top 10 buckets by storage size: SELECT bucket_name, SUM(CAST(metric_value AS BIGINT)) as total_size FROM {table} WHERE metric_name = 'StorageBytes' GROUP BY bucket_name ORDER BY total_size DESC LIMIT 10
Storage distribution by storage class: SELECT storage_class, SUM(CAST(metric_value AS BIGINT)) as total_size FROM {table} WHERE metric_name = 'StorageBytes' GROUP BY storage_class ORDER BY total_size DESC
Buckets with incomplete multipart uploads: SELECT bucket_name, SUM(CAST(metric_value AS BIGINT)) as incomplete_bytes FROM {table} WHERE metric_name = 'IncompleteMultipartUploadStorageBytes' AND CAST(metric_value AS BIGINT) > 0 GROUP BY bucket_name ORDER BY incomplete_bytes DESC
Storage Distribution by Region and Storage Class: SELECT aws_region, storage_class, SUM(CAST(metric_value AS BIGINT)) as total_bytes FROM {table} WHERE metric_name = 'StorageBytes' GROUP BY aws_region, storage_class ORDER BY total_bytes DESC
Object Lifecycle Management Opportunities: SELECT aws_region, storage_class, SUM(CASE WHEN metric_name = 'NonCurrentVersionStorageBytes' THEN CAST(metric_value AS BIGINT) ELSE 0 END) as noncurrent_bytes, SUM(CASE WHEN metric_name = 'StorageBytes' THEN CAST(metric_value AS BIGINT) ELSE 0 END) as total_bytes FROM {table} WHERE metric_name IN ('NonCurrentVersionStorageBytes', 'StorageBytes') GROUP BY aws_region, storage_class HAVING SUM(CASE WHEN metric_name = 'NonCurrentVersionStorageBytes' THEN CAST(metric_value AS BIGINT) ELSE 0 END) > 0 ORDER BY noncurrent_bytes DESC
Lifecycle Rule Analysis:
SELECT
bucket_name,
SUM(CASE WHEN metric_name = 'TotalLifecycleRuleCount' THEN CAST(metric_value AS INTEGER) ELSE 0 END) as lifecycle_rule_count,
SUM(CASE WHEN metric_name = 'StorageBytes' THEN CAST(metric_value AS BIGINT) ELSE 0 END) as total_bytes
FROM {table}
WHERE metric_name IN ('TotalLifecycleRuleCount', 'StorageBytes')
GROUP BY bucket_name
ORDER BY lifecycle_rule_count ASC, total_bytes DESC
Parameters|Type|Description
-|-|-
query|string|SQL query to execute against the data (use {table} as a placeholder for the table name)
database_name|stringoptional|Athena database name (defaults to 'storage_lens_db')
manifest_location|stringoptional|S3 URI to manifest file or folder (overrides environment variable)
output_location|stringoptional|S3 location for Athena query results (overrides environment variable)
table_name|stringoptional|Athena table name (defaults to 'storage_lens_metrics')
{
"mcpServers": {
"awslabs-billing-cost-management": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"AWS_REGION",
"-e",
"AWS_PROFILE",
"-e",
"STORAGE_LENS_MANIFEST_LOCATION",
"mcp/billing-cost-management-mcp-server"
],
"env": {
"AWS_REGION": "us-east-1",
"AWS_PROFILE": "default",
"STORAGE_LENS_MANIFEST_LOCATION": "s3://bucket-name/storage-lens/manifests/"
}
}
}
}