AWS Cost Analysis
STDIOMCP server for generating AWS service cost estimates and providing cost insights.
MCP server for generating AWS service cost estimates and providing cost insights.
MCP server for generating upfront AWS service cost estimates and providing cost insights
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.
uv
from Astral or the GitHub READMEuv python install 3.10
aws configure
or environment variablesConfigure 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
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.