awslabs.cost-explorer-mcp-server 0.0.5__tar.gz → 0.0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/CHANGELOG.md +19 -0
  2. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/Dockerfile +34 -31
  3. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/PKG-INFO +45 -16
  4. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/README.md +42 -13
  5. awslabs_cost_explorer_mcp_server-0.0.7/awslabs/cost_explorer_mcp_server/comparison_handler.py +719 -0
  6. awslabs_cost_explorer_mcp_server-0.0.7/awslabs/cost_explorer_mcp_server/constants.py +106 -0
  7. awslabs_cost_explorer_mcp_server-0.0.5/awslabs/cost_explorer_mcp_server/server.py → awslabs_cost_explorer_mcp_server-0.0.7/awslabs/cost_explorer_mcp_server/cost_usage_handler.py +20 -152
  8. awslabs_cost_explorer_mcp_server-0.0.7/awslabs/cost_explorer_mcp_server/forecasting_handler.py +234 -0
  9. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/awslabs/cost_explorer_mcp_server/helpers.py +381 -59
  10. awslabs_cost_explorer_mcp_server-0.0.7/awslabs/cost_explorer_mcp_server/metadata_handler.py +88 -0
  11. awslabs_cost_explorer_mcp_server-0.0.7/awslabs/cost_explorer_mcp_server/models.py +70 -0
  12. awslabs_cost_explorer_mcp_server-0.0.7/awslabs/cost_explorer_mcp_server/server.py +92 -0
  13. awslabs_cost_explorer_mcp_server-0.0.7/awslabs/cost_explorer_mcp_server/utility_handler.py +50 -0
  14. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/docker-healthcheck.sh +7 -8
  15. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/pyproject.toml +3 -3
  16. awslabs_cost_explorer_mcp_server-0.0.7/tests/test_comparison_handler.py +1507 -0
  17. awslabs_cost_explorer_mcp_server-0.0.7/tests/test_cost_usage_handler.py +1283 -0
  18. awslabs_cost_explorer_mcp_server-0.0.7/tests/test_forecasting_handler.py +483 -0
  19. awslabs_cost_explorer_mcp_server-0.0.7/tests/test_helpers.py +1195 -0
  20. awslabs_cost_explorer_mcp_server-0.0.7/tests/test_metadata_handler.py +230 -0
  21. awslabs_cost_explorer_mcp_server-0.0.7/tests/test_models.py +135 -0
  22. awslabs_cost_explorer_mcp_server-0.0.7/tests/test_server.py +75 -0
  23. awslabs_cost_explorer_mcp_server-0.0.7/tests/test_utility_handler.py +52 -0
  24. awslabs_cost_explorer_mcp_server-0.0.7/uv-requirements.txt +26 -0
  25. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/uv.lock +758 -558
  26. awslabs_cost_explorer_mcp_server-0.0.5/tests/test_helpers.py +0 -919
  27. awslabs_cost_explorer_mcp_server-0.0.5/tests/test_server.py +0 -1378
  28. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/.gitignore +0 -0
  29. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/.python-version +0 -0
  30. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/LICENSE +0 -0
  31. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/NOTICE +0 -0
  32. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/awslabs/__init__.py +0 -0
  33. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/awslabs/cost_explorer_mcp_server/__init__.py +0 -0
  34. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/tests/__init__.py +0 -0
  35. {awslabs_cost_explorer_mcp_server-0.0.5 → awslabs_cost_explorer_mcp_server-0.0.7}/tests/conftest.py +0 -0
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.6.0] - 2025-06-20
9
+
10
+ ### Added
11
+ - **NEW AWS Cost Comparison Feature Integration**
12
+ - `get_cost_and_usage_comparisons` - Leverage AWS Cost Explorer's new Cost Comparison feature to compare costs between two time periods
13
+ - `get_cost_comparison_drivers` - Automatically analyze the top 10 most significant cost change drivers using AWS's new API
14
+ - Reduces manual cost analysis time from hours to seconds using AWS's built-in intelligence
15
+ - Provides detailed breakdowns of cost drivers, including usage and discount changes
16
+ **Cost Forecasting Capabilities**
17
+ - `get_cost_forecast` - Generate cost forecasts based on historical usage patterns with confidence intervals (80% or 95%)
18
+ - Support for daily and monthly forecast granularity for budget planning
19
+ **Modular Architecture**
20
+ - Refactored codebase into modular handler architecture for better maintainability
21
+ - Separate handlers for cost usage, comparison, forecasting, metadata, and utility functions
22
+ **Enhanced Testing**
23
+ - Comprehensive test coverage for comparison features
24
+ - Fixed duplicate test method definitions
25
+ - Improved test reliability and error handling
26
+
8
27
  ## [0.5.0] - 2025-06-16
9
28
 
10
29
  ### Added
@@ -12,7 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- FROM public.ecr.aws/sam/build-python3.10@sha256:d821662474d65f3cf2fc97dba2fa807a3adb580d02895fc4545527812550ea65 AS uv
15
+ # dependabot should continue to update this to the latest hash.
16
+ FROM public.ecr.aws/docker/library/python:3.13.5-alpine3.21@sha256:c9a09c45a4bcc618c7f7128585b8dd0d41d0c31a8a107db4c8255ffe0b69375d AS uv
16
17
 
17
18
  # Install the project into `/app`
18
19
  WORKDIR /app
@@ -30,56 +31,58 @@ ENV UV_PYTHON_PREFERENCE=only-system
30
31
  ENV UV_FROZEN=true
31
32
 
32
33
  # Copy the required files first
33
- COPY pyproject.toml uv.lock ./
34
+ COPY pyproject.toml uv.lock uv-requirements.txt ./
35
+
36
+ # Python optimization and uv configuration
37
+ ENV PIP_NO_CACHE_DIR=1 \
38
+ PIP_DISABLE_PIP_VERSION_CHECK=1
39
+
40
+ # Install system dependencies and Python package manager
41
+ RUN apk update && \
42
+ apk add --no-cache --virtual .build-deps \
43
+ build-base \
44
+ gcc \
45
+ musl-dev \
46
+ libffi-dev \
47
+ openssl-dev \
48
+ cargo
34
49
 
35
50
  # Install the project's dependencies using the lockfile and settings
36
51
  RUN --mount=type=cache,target=/root/.cache/uv \
37
- pip install uv && \
38
- uv sync --frozen --no-install-project --no-dev --no-editable
52
+ pip install --require-hashes --requirement uv-requirements.txt --no-cache-dir && \
53
+ uv sync --python 3.13 --frozen --no-install-project --no-dev --no-editable
39
54
 
40
55
  # Then, add the rest of the project source code and install it
41
56
  # Installing separately from its dependencies allows optimal layer caching
42
57
  COPY . /app
43
58
  RUN --mount=type=cache,target=/root/.cache/uv \
44
- uv sync --frozen --no-dev --no-editable
59
+ uv sync --python 3.13 --frozen --no-dev --no-editable
45
60
 
46
61
  # Make the directory just in case it doesn't exist
47
62
  RUN mkdir -p /root/.local
48
63
 
49
- FROM public.ecr.aws/sam/build-python3.10@sha256:d821662474d65f3cf2fc97dba2fa807a3adb580d02895fc4545527812550ea65
64
+ FROM public.ecr.aws/docker/library/python:3.13.5-alpine3.21@sha256:c9a09c45a4bcc618c7f7128585b8dd0d41d0c31a8a107db4c8255ffe0b69375d
50
65
 
51
66
  # Place executables in the environment at the front of the path and include other binaries
52
- ENV PATH="/app/.venv/bin:$PATH:/usr/sbin"
53
-
54
- # Set environment variables
55
- ENV PYTHONUNBUFFERED=1 \
56
- PYTHONDONTWRITEBYTECODE=1 \
57
- FASTMCP_LOG_LEVEL=INFO
58
-
59
- # Install lsof for the healthcheck
60
- # Install other tools as needed for the MCP server
61
- # Add non-root user and ability to change directory into /root
62
- RUN yum update -y && \
63
- yum install -y lsof && \
64
- yum clean all -y && \
65
- rm -rf /var/cache/yum && \
66
- groupadd --force --system app && \
67
- useradd app -g app -d /app && \
68
- chmod o+x /root
69
-
70
- # Get the project from the uv layer
71
- COPY --from=uv --chown=app:app /root/.local /root/.local
67
+ ENV PATH="/app/.venv/bin:$PATH" \
68
+ PYTHONUNBUFFERED=1
69
+
70
+ # Install runtime dependencies and create application user
71
+ RUN apk update && \
72
+ apk add --no-cache ca-certificates && \
73
+ update-ca-certificates && \
74
+ addgroup -S app && \
75
+ adduser -S app -G app -h /app
76
+
77
+ # Copy application artifacts from build stage
72
78
  COPY --from=uv --chown=app:app /app/.venv /app/.venv
73
79
 
74
80
  # Get healthcheck script
75
81
  COPY ./docker-healthcheck.sh /usr/local/bin/docker-healthcheck.sh
76
- RUN chmod +x /usr/local/bin/docker-healthcheck.sh
77
82
 
78
83
  # Run as non-root
79
84
  USER app
80
85
 
81
- # Health check
82
- HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "docker-healthcheck.sh" ]
83
-
84
- # Use entrypoint instead of CMD
86
+ # When running the container, add --db-path and a bind mount to the host's db file
87
+ HEALTHCHECK --interval=60s --timeout=10s --start-period=10s --retries=3 CMD ["docker-healthcheck.sh"]
85
88
  ENTRYPOINT ["awslabs.cost-explorer-mcp-server"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.cost-explorer-mcp-server
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: MCP server for analyzing AWS costs and usage data through the AWS Cost Explorer API
5
5
  Project-URL: Homepage, https://awslabs.github.io/mcp/
6
6
  Project-URL: Documentation, https://awslabs.github.io/mcp/servers/cost-explorer-mcp-server/
@@ -21,9 +21,9 @@ Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3.13
23
23
  Requires-Python: >=3.10
24
- Requires-Dist: boto3>=1.36.20
24
+ Requires-Dist: boto3>=1.38.40
25
25
  Requires-Dist: loguru>=0.7.0
26
- Requires-Dist: mcp[cli]>=1.6.0
26
+ Requires-Dist: mcp[cli]>=1.11.0
27
27
  Requires-Dist: pandas>=2.2.3
28
28
  Requires-Dist: pydantic>=2.10.6
29
29
  Description-Content-Type: text/markdown
@@ -41,17 +41,28 @@ MCP server for analyzing AWS costs and usage data through the AWS Cost Explorer
41
41
  - Query historical cost data for specific time periods
42
42
  - Filter costs by various dimensions, tags, and cost categories
43
43
 
44
+
45
+ ### Compare costs between time periods
46
+
47
+ - **NEW AWS Feature**: Leverage AWS Cost Explorer's new [Cost Comparison feature](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-cost-comparison.html)
48
+ - Compare costs between two time periods to identify changes and trends
49
+ - Analyze cost drivers to understand what caused cost increases or decreases
50
+ - Get detailed insights into the top 10 most significant cost change drivers automatically
51
+ - Identify specific usage types, discount changes, and infrastructure changes affecting costs
52
+
53
+ ### Forecast future costs
54
+
55
+ - Generate cost forecasts based on historical usage patterns
56
+ - Get predictions with confidence intervals (80% or 95%)
57
+ - Support for daily and monthly forecast granularity
58
+ - Plan budgets and anticipate future AWS spending
59
+
44
60
  ### Query cost data with natural language
45
61
 
46
62
  - Ask questions about your AWS costs in plain English
47
63
  - Get instant answers about your AWS spending patterns
48
64
  - Retrieve historical cost data with simple queries
49
65
 
50
- ### Generate cost reports and insights
51
-
52
- - Generate comprehensive cost reports based on your AWS Cost Explorer data
53
- - Get cost breakdowns by various dimensions (service, region, account, etc.)
54
- - Analyze usage patterns and spending trends
55
66
 
56
67
  ## Prerequisites
57
68
 
@@ -64,7 +75,9 @@ MCP server for analyzing AWS costs and usage data through the AWS Cost Explorer
64
75
 
65
76
  ## Installation
66
77
 
67
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=awslabs.cost-explorer-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuY29zdC1leHBsb3Jlci1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJGQVNUTUNQX0xPR19MRVZFTCI6IkVSUk9SIiwiQVdTX1BST0ZJTEUiOiJ5b3VyLWF3cy1wcm9maWxlIn0sImRpc2FibGVkIjpmYWxzZSwiYXV0b0FwcHJvdmUiOltdfQ%3D%3D)
78
+ | Cursor | VS Code |
79
+ |:------:|:-------:|
80
+ | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=awslabs.cost-explorer-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuY29zdC1leHBsb3Jlci1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJBV1NfUFJPRklMRSI6InlvdXItYXdzLXByb2ZpbGUiLCJBV1NfUkVHSU9OIjoidXMtZWFzdC0xIiwiRkFTVE1DUF9MT0dfTEVWRUwiOiJFUlJPUiJ9LCJkaXNhYmxlZCI6ZmFsc2UsImF1dG9BcHByb3ZlIjpbXX0%3D) | [![Install on VS Code](https://img.shields.io/badge/Install_on-VS_Code-FF9900?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=Cost%20Explorer%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.cost-explorer-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22AWS_PROFILE%22%3A%22your-aws-profile%22%2C%22AWS_REGION%22%3A%22us-east-1%22%2C%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
68
81
 
69
82
  Here are some ways you can work with MCP across AWS, and we'll be adding support to more products including Amazon Q Developer CLI soon: (e.g. for Amazon Q Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
70
83
 
@@ -149,6 +162,9 @@ The following IAM permissions are required for this MCP server:
149
162
  - ce:GetCostAndUsage
150
163
  - ce:GetDimensionValues
151
164
  - ce:GetTags
165
+ - ce:GetCostForecast
166
+ - ce:GetCostAndUsageComparisons
167
+ - ce:GetCostComparisonDrivers
152
168
 
153
169
 
154
170
 
@@ -160,26 +176,39 @@ The Cost Explorer MCP Server provides the following tools:
160
176
  2. `get_dimension_values` - Get available values for a specific dimension (e.g., SERVICE, REGION)
161
177
  3. `get_tag_values` - Get available values for a specific tag key
162
178
  4. `get_cost_and_usage` - Retrieve AWS cost and usage data with filtering and grouping options
179
+ 5. `get_cost_and_usage_comparisons` - Compare costs between two time periods to identify changes and trends
180
+ 6. `get_cost_comparison_drivers` - Analyze what drove cost changes between periods (top 10 most significant drivers)
181
+ 7. `get_cost_forecast` - Generate cost forecasts based on historical usage patterns
163
182
 
164
183
  ## Example Usage
165
184
 
166
- Here are some examples of how to use the Cost Explorer MCP Server:
167
-
185
+ Here are some examples of how to use the Cost Explorer MCP Server through natural language queries:
168
186
 
169
- ### Get dimension values
187
+ ### Cost Analysis Examples
170
188
 
171
189
  ```
172
- What AWS services did I use last month?
190
+ Show me my AWS costs for the last 3 months grouped by service in us-east-1 region
191
+ Break down my S3 costs by storage class for Q1 2025
192
+ Show me costs for production resources tagged with Environment=prod
193
+ What were my costs for reserved instances vs on-demand in May?
194
+ What was my EC2 instance usage by instance type?
173
195
  ```
174
196
 
175
- ### Generate a cost report
197
+ ### Cost Comparison Examples
176
198
 
177
199
  ```
178
- Show me my AWS costs for the last 3 months grouped by service in us-east-1 region
200
+ Compare my AWS costs between April and May 2025
201
+ How did my EC2 costs change from last month to this month?
202
+ Why did my AWS bill increase in June compared to May?
203
+ What caused the spike in my S3 costs last month?
179
204
  ```
180
205
 
206
+ ### Forecasting Examples
207
+
181
208
  ```
182
- What were my EC2 costs excluding us-east-2 for January 2025?
209
+ Forecast my AWS costs for next month
210
+ Predict my EC2 spending for the next quarter
211
+ What will my total AWS bill be for the rest of 2025?
183
212
  ```
184
213
 
185
214
  ## License
@@ -11,17 +11,28 @@ MCP server for analyzing AWS costs and usage data through the AWS Cost Explorer
11
11
  - Query historical cost data for specific time periods
12
12
  - Filter costs by various dimensions, tags, and cost categories
13
13
 
14
+
15
+ ### Compare costs between time periods
16
+
17
+ - **NEW AWS Feature**: Leverage AWS Cost Explorer's new [Cost Comparison feature](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-cost-comparison.html)
18
+ - Compare costs between two time periods to identify changes and trends
19
+ - Analyze cost drivers to understand what caused cost increases or decreases
20
+ - Get detailed insights into the top 10 most significant cost change drivers automatically
21
+ - Identify specific usage types, discount changes, and infrastructure changes affecting costs
22
+
23
+ ### Forecast future costs
24
+
25
+ - Generate cost forecasts based on historical usage patterns
26
+ - Get predictions with confidence intervals (80% or 95%)
27
+ - Support for daily and monthly forecast granularity
28
+ - Plan budgets and anticipate future AWS spending
29
+
14
30
  ### Query cost data with natural language
15
31
 
16
32
  - Ask questions about your AWS costs in plain English
17
33
  - Get instant answers about your AWS spending patterns
18
34
  - Retrieve historical cost data with simple queries
19
35
 
20
- ### Generate cost reports and insights
21
-
22
- - Generate comprehensive cost reports based on your AWS Cost Explorer data
23
- - Get cost breakdowns by various dimensions (service, region, account, etc.)
24
- - Analyze usage patterns and spending trends
25
36
 
26
37
  ## Prerequisites
27
38
 
@@ -34,7 +45,9 @@ MCP server for analyzing AWS costs and usage data through the AWS Cost Explorer
34
45
 
35
46
  ## Installation
36
47
 
37
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=awslabs.cost-explorer-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuY29zdC1leHBsb3Jlci1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJGQVNUTUNQX0xPR19MRVZFTCI6IkVSUk9SIiwiQVdTX1BST0ZJTEUiOiJ5b3VyLWF3cy1wcm9maWxlIn0sImRpc2FibGVkIjpmYWxzZSwiYXV0b0FwcHJvdmUiOltdfQ%3D%3D)
48
+ | Cursor | VS Code |
49
+ |:------:|:-------:|
50
+ | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=awslabs.cost-explorer-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuY29zdC1leHBsb3Jlci1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJBV1NfUFJPRklMRSI6InlvdXItYXdzLXByb2ZpbGUiLCJBV1NfUkVHSU9OIjoidXMtZWFzdC0xIiwiRkFTVE1DUF9MT0dfTEVWRUwiOiJFUlJPUiJ9LCJkaXNhYmxlZCI6ZmFsc2UsImF1dG9BcHByb3ZlIjpbXX0%3D) | [![Install on VS Code](https://img.shields.io/badge/Install_on-VS_Code-FF9900?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=Cost%20Explorer%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.cost-explorer-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22AWS_PROFILE%22%3A%22your-aws-profile%22%2C%22AWS_REGION%22%3A%22us-east-1%22%2C%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
38
51
 
39
52
  Here are some ways you can work with MCP across AWS, and we'll be adding support to more products including Amazon Q Developer CLI soon: (e.g. for Amazon Q Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
40
53
 
@@ -119,6 +132,9 @@ The following IAM permissions are required for this MCP server:
119
132
  - ce:GetCostAndUsage
120
133
  - ce:GetDimensionValues
121
134
  - ce:GetTags
135
+ - ce:GetCostForecast
136
+ - ce:GetCostAndUsageComparisons
137
+ - ce:GetCostComparisonDrivers
122
138
 
123
139
 
124
140
 
@@ -130,26 +146,39 @@ The Cost Explorer MCP Server provides the following tools:
130
146
  2. `get_dimension_values` - Get available values for a specific dimension (e.g., SERVICE, REGION)
131
147
  3. `get_tag_values` - Get available values for a specific tag key
132
148
  4. `get_cost_and_usage` - Retrieve AWS cost and usage data with filtering and grouping options
149
+ 5. `get_cost_and_usage_comparisons` - Compare costs between two time periods to identify changes and trends
150
+ 6. `get_cost_comparison_drivers` - Analyze what drove cost changes between periods (top 10 most significant drivers)
151
+ 7. `get_cost_forecast` - Generate cost forecasts based on historical usage patterns
133
152
 
134
153
  ## Example Usage
135
154
 
136
- Here are some examples of how to use the Cost Explorer MCP Server:
137
-
155
+ Here are some examples of how to use the Cost Explorer MCP Server through natural language queries:
138
156
 
139
- ### Get dimension values
157
+ ### Cost Analysis Examples
140
158
 
141
159
  ```
142
- What AWS services did I use last month?
160
+ Show me my AWS costs for the last 3 months grouped by service in us-east-1 region
161
+ Break down my S3 costs by storage class for Q1 2025
162
+ Show me costs for production resources tagged with Environment=prod
163
+ What were my costs for reserved instances vs on-demand in May?
164
+ What was my EC2 instance usage by instance type?
143
165
  ```
144
166
 
145
- ### Generate a cost report
167
+ ### Cost Comparison Examples
146
168
 
147
169
  ```
148
- Show me my AWS costs for the last 3 months grouped by service in us-east-1 region
170
+ Compare my AWS costs between April and May 2025
171
+ How did my EC2 costs change from last month to this month?
172
+ Why did my AWS bill increase in June compared to May?
173
+ What caused the spike in my S3 costs last month?
149
174
  ```
150
175
 
176
+ ### Forecasting Examples
177
+
151
178
  ```
152
- What were my EC2 costs excluding us-east-2 for January 2025?
179
+ Forecast my AWS costs for next month
180
+ Predict my EC2 spending for the next quarter
181
+ What will my total AWS bill be for the rest of 2025?
153
182
  ```
154
183
 
155
184
  ## License