sample-cloud-spend-mcp-server
by aws-samples
This MCP server retrieves AWS spend data via Cost Explorer and Amazon Bedrock usage data via CloudWatch logs, using Anthropic's MCP (Model Control Protocol). It allows users to analyze and visualize AWS cloud spending data using Anthropic's Claude model as an interactive interface.
Last updated: N/A
What is sample-cloud-spend-mcp-server?
This tool is an MCP server that exposes AWS Cost Explorer API functionality and Amazon Bedrock usage data to Claude Desktop, enabling natural language queries about AWS spend. It provides a convenient way to analyze and visualize AWS cloud spending data using Anthropic's Claude model as an interactive interface.
How to use sample-cloud-spend-mcp-server?
To use this server, first install the necessary dependencies and configure your AWS credentials. Then, run the server locally or remotely, configuring Claude Desktop to connect to the server. You can then ask questions about your AWS spend in natural language through Claude. Alternatively, you can use the provided Chainlit app or LangGraph Agent to interact with the server.
Key features of sample-cloud-spend-mcp-server
Amazon EC2 Spend Analysis
Amazon Bedrock Spend Analysis
Service Spend Reports
Detailed Cost Breakdown
Interactive Interface
Use cases of sample-cloud-spend-mcp-server
Analyzing AWS EC2 spending for the last day.
Analyzing Amazon Bedrock spending by region, users and models over the last 30 days.
Generating service spend reports for the last 30 days.
Obtaining granular cost data by day, region, service, and instance type.
FAQ from sample-cloud-spend-mcp-server
What AWS services are required to use this server?
What AWS services are required to use this server?
You need AWS credentials with access to Cost Explorer and, optionally, Amazon Bedrock. You also need access to CloudWatch for Bedrock model invocation logs.
How do I configure Claude Desktop to use this server?
How do I configure Claude Desktop to use this server?
You can configure Claude Desktop by adding the server configuration to the claude_desktop_config.json file, specifying the command and arguments to run the server, along with the necessary environment variables.
Can I run this server remotely?
Can I run this server remotely?
Yes, you can run the server on an Amazon EC2 instance and access it via an MCP client. You need to configure the security group to allow access to the server's port.
What kind of questions can I ask Claude once connected to this server?
What kind of questions can I ask Claude once connected to this server?
You can ask questions like "What was my EC2 spend yesterday?", "Show me my top 5 AWS services by cost for the last month", or "Analyze my spending by region for the past 14 days".
How do I secure my remote MCP server?
How do I secure my remote MCP server?
You can use nginx as a reverse proxy to provide an HTTPS endpoint for connecting to the MCP server. This involves configuring nginx with an SSL certificate and private key.