An AWS Labs Model Context Protocol (MCP) server for Cost Analysis of the AWS services
Project description
Cost Analysis MCP Server (DEPRECATED)
MCP server for generating upfront AWS service cost estimates and providing cost insights. (DEPRECATED). Please use the AWS Pricing MCP Server for AWS service pricing related tools.
Important Note: This server provides estimated pricing based on AWS pricing APIs and web pages. These estimates are for pre-deployment planning purposes and do not reflect the actual expenses of deployed cloud services.
Features
Analyze and visualize AWS costs
- Get detailed breakdown of your AWS costs by service, region and tier
- Understand how costs are distributed across various services
- Provide pre-deployment cost estimates for infrastructure planning
- Support for analyzing both CDK and Terraform projects to identify AWS services
Query cost data with natural language
- Ask questions about your AWS costs in plain English, no complex query languages required
- Get instant answers fetched from pricing webpage and AWS Pricing API, for questions related to AWS services
- Retrieve estimated pricing information before actual cloud service deployment
Generate cost reports and insights
- Generate comprehensive cost estimates based on your IaC implementation
- Get cost optimization recommendations for potential cloud infrastructure
- Provide upfront pricing analysis to support informed decision-making
Prerequisites
- Install
uvfrom Astral or the GitHub README - Install Python using
uv python install 3.10 - Set up AWS credentials with access to AWS services
- You need an AWS account with appropriate permissions
- Configure AWS credentials with
aws configureor environment variables - Ensure your IAM role/user has permissions to access AWS Pricing API
Installation
(DEPRECATED). Please use the AWS Pricing MCP Server for AWS service pricing related tools.
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit ~/.aws/amazonq/mcp.json):
{
"mcpServers": {
"awslabs.cost-analysis-mcp-server": {
"command": "uvx",
"args": ["awslabs.cost-analysis-mcp-server@latest"],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR",
"AWS_PROFILE": "your-aws-profile"
},
"disabled": false,
"autoApprove": []
}
}
}
or docker after a successful docker build -t awslabs/cost-analysis-mcp-server .:
# fictitious `.env` file with AWS temporary credentials
AWS_ACCESS_KEY_ID=ASIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
AWS_SESSION_TOKEN=AQoEXAMPLEH4aoAH0gNCAPy...truncated...zrkuWJOgQs8IZZaIv2BXIa2R4Olgk
{
"mcpServers": {
"awslabs.cost-analysis-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"--env",
"FASTMCP_LOG_LEVEL=ERROR",
"--env-file",
"/full/path/to/file/above/.env",
"awslabs/cost-analysis-mcp-server:latest"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
NOTE: Your credentials will need to be kept refreshed from your host
AWS Authentication
The MCP server uses the AWS profile specified in the AWS_PROFILE environment variable. If not provided, it defaults to the "default" profile in your AWS configuration file.
"env": {
"AWS_PROFILE": "your-aws-profile"
}
Make sure the AWS profile has permissions to access the AWS Pricing API. The MCP server creates a boto3 session using the specified profile to authenticate with AWS services. Your AWS IAM credentials remain on your local machine and are strictly used for accessing AWS services.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file awslabs_cost_analysis_mcp_server-1.0.5.tar.gz.
File metadata
- Download URL: awslabs_cost_analysis_mcp_server-1.0.5.tar.gz
- Upload date:
- Size: 107.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb9b89294b72dde98cbd59818e8631ab7eb6e9e395897b8b2ee4b22506c4362e
|
|
| MD5 |
69bcfe8ac8a8740a9cee0e75ed71fde5
|
|
| BLAKE2b-256 |
67870a980e34e95bf3fac0940c37ced6b576cbd160e1e70e3620796e4168e35f
|
Provenance
The following attestation bundles were made for awslabs_cost_analysis_mcp_server-1.0.5.tar.gz:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_cost_analysis_mcp_server-1.0.5.tar.gz -
Subject digest:
eb9b89294b72dde98cbd59818e8631ab7eb6e9e395897b8b2ee4b22506c4362e - Sigstore transparency entry: 268963574
- Sigstore integration time:
-
Permalink:
awslabs/mcp@e0e899c5f159b655440fba7c6b796499a41a88be -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0e899c5f159b655440fba7c6b796499a41a88be -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file awslabs_cost_analysis_mcp_server-1.0.5-py3-none-any.whl.
File metadata
- Download URL: awslabs_cost_analysis_mcp_server-1.0.5-py3-none-any.whl
- Upload date:
- Size: 53.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bbd2d5cee013073d441fd095ed7c105a8afb1f738180fe7d54c3897b0449be1
|
|
| MD5 |
cb59dd7b30edd6ae644a8e96020b7b84
|
|
| BLAKE2b-256 |
c7c33b3594c5843b532eab3874a6c731aaa7dbbd6e9118d31e7290233cde1144
|
Provenance
The following attestation bundles were made for awslabs_cost_analysis_mcp_server-1.0.5-py3-none-any.whl:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_cost_analysis_mcp_server-1.0.5-py3-none-any.whl -
Subject digest:
1bbd2d5cee013073d441fd095ed7c105a8afb1f738180fe7d54c3897b0449be1 - Sigstore transparency entry: 268963594
- Sigstore integration time:
-
Permalink:
awslabs/mcp@e0e899c5f159b655440fba7c6b796499a41a88be -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0e899c5f159b655440fba7c6b796499a41a88be -
Trigger Event:
workflow_dispatch
-
Statement type: