awslabs.cost-explorer-mcp-server 0.0.5__py3-none-any.whl → 0.0.6__py3-none-any.whl
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.
- awslabs/cost_explorer_mcp_server/comparison_handler.py +719 -0
- awslabs/cost_explorer_mcp_server/constants.py +106 -0
- awslabs/cost_explorer_mcp_server/cost_usage_handler.py +385 -0
- awslabs/cost_explorer_mcp_server/forecasting_handler.py +234 -0
- awslabs/cost_explorer_mcp_server/helpers.py +381 -59
- awslabs/cost_explorer_mcp_server/metadata_handler.py +88 -0
- awslabs/cost_explorer_mcp_server/models.py +70 -0
- awslabs/cost_explorer_mcp_server/server.py +51 -476
- awslabs/cost_explorer_mcp_server/utility_handler.py +50 -0
- {awslabs_cost_explorer_mcp_server-0.0.5.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/METADATA +41 -14
- awslabs_cost_explorer_mcp_server-0.0.6.dist-info/RECORD +17 -0
- awslabs_cost_explorer_mcp_server-0.0.5.dist-info/RECORD +0 -10
- {awslabs_cost_explorer_mcp_server-0.0.5.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/WHEEL +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.5.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/entry_points.txt +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.5.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/licenses/LICENSE +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.5.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/licenses/NOTICE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.cost-explorer-mcp-server
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
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,7 +21,7 @@ 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.
|
|
24
|
+
Requires-Dist: boto3>=1.38.40
|
|
25
25
|
Requires-Dist: loguru>=0.7.0
|
|
26
26
|
Requires-Dist: mcp[cli]>=1.6.0
|
|
27
27
|
Requires-Dist: pandas>=2.2.3
|
|
@@ -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
|
|
|
@@ -149,6 +160,9 @@ The following IAM permissions are required for this MCP server:
|
|
|
149
160
|
- ce:GetCostAndUsage
|
|
150
161
|
- ce:GetDimensionValues
|
|
151
162
|
- ce:GetTags
|
|
163
|
+
- ce:GetCostForecast
|
|
164
|
+
- ce:GetCostAndUsageComparisons
|
|
165
|
+
- ce:GetCostComparisonDrivers
|
|
152
166
|
|
|
153
167
|
|
|
154
168
|
|
|
@@ -160,26 +174,39 @@ The Cost Explorer MCP Server provides the following tools:
|
|
|
160
174
|
2. `get_dimension_values` - Get available values for a specific dimension (e.g., SERVICE, REGION)
|
|
161
175
|
3. `get_tag_values` - Get available values for a specific tag key
|
|
162
176
|
4. `get_cost_and_usage` - Retrieve AWS cost and usage data with filtering and grouping options
|
|
177
|
+
5. `get_cost_and_usage_comparisons` - Compare costs between two time periods to identify changes and trends
|
|
178
|
+
6. `get_cost_comparison_drivers` - Analyze what drove cost changes between periods (top 10 most significant drivers)
|
|
179
|
+
7. `get_cost_forecast` - Generate cost forecasts based on historical usage patterns
|
|
163
180
|
|
|
164
181
|
## Example Usage
|
|
165
182
|
|
|
166
|
-
Here are some examples of how to use the Cost Explorer MCP Server:
|
|
167
|
-
|
|
183
|
+
Here are some examples of how to use the Cost Explorer MCP Server through natural language queries:
|
|
168
184
|
|
|
169
|
-
###
|
|
185
|
+
### Cost Analysis Examples
|
|
170
186
|
|
|
171
187
|
```
|
|
172
|
-
|
|
188
|
+
Show me my AWS costs for the last 3 months grouped by service in us-east-1 region
|
|
189
|
+
Break down my S3 costs by storage class for Q1 2025
|
|
190
|
+
Show me costs for production resources tagged with Environment=prod
|
|
191
|
+
What were my costs for reserved instances vs on-demand in May?
|
|
192
|
+
What was my EC2 instance usage by instance type?
|
|
173
193
|
```
|
|
174
194
|
|
|
175
|
-
###
|
|
195
|
+
### Cost Comparison Examples
|
|
176
196
|
|
|
177
197
|
```
|
|
178
|
-
|
|
198
|
+
Compare my AWS costs between April and May 2025
|
|
199
|
+
How did my EC2 costs change from last month to this month?
|
|
200
|
+
Why did my AWS bill increase in June compared to May?
|
|
201
|
+
What caused the spike in my S3 costs last month?
|
|
179
202
|
```
|
|
180
203
|
|
|
204
|
+
### Forecasting Examples
|
|
205
|
+
|
|
181
206
|
```
|
|
182
|
-
|
|
207
|
+
Forecast my AWS costs for next month
|
|
208
|
+
Predict my EC2 spending for the next quarter
|
|
209
|
+
What will my total AWS bill be for the rest of 2025?
|
|
183
210
|
```
|
|
184
211
|
|
|
185
212
|
## License
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
awslabs/__init__.py,sha256=XlNvbbm4JS0QaAK93MUCbMITZLOSkWkBilYvLI3rBpU,667
|
|
2
|
+
awslabs/cost_explorer_mcp_server/__init__.py,sha256=jj08M9QRfjYVfiV85UhDzpEO4Vseafpeekg31d2DhfM,785
|
|
3
|
+
awslabs/cost_explorer_mcp_server/comparison_handler.py,sha256=hrj6Hr0VNl6F_pUzSMjInMHlrfgo-CEu0wrI8wCmmnQ,32204
|
|
4
|
+
awslabs/cost_explorer_mcp_server/constants.py,sha256=UubGjszHgx_y2_ctrRV0kQVU8fkRK1Tb1HulPno7hKo,4467
|
|
5
|
+
awslabs/cost_explorer_mcp_server/cost_usage_handler.py,sha256=w60Fd-9goTdupEVmLVapHxOe2itpnWznVCvmQz-UTtU,16889
|
|
6
|
+
awslabs/cost_explorer_mcp_server/forecasting_handler.py,sha256=sEkFSqIbvX9kC3I-nM5bzWkCQSUqIEWKjIz3LNJZK9A,9509
|
|
7
|
+
awslabs/cost_explorer_mcp_server/helpers.py,sha256=EWODLEAiSVzbe_Q4v1ofH7-JPBC85BNQHAWXwp6UqA0,26908
|
|
8
|
+
awslabs/cost_explorer_mcp_server/metadata_handler.py,sha256=CEFTJKKkNFpxWX5HlFvNWZUIIXl5zoLdisMYSqWz37k,3249
|
|
9
|
+
awslabs/cost_explorer_mcp_server/models.py,sha256=orjB06HFrMVRJIkFwAwIgtda3FpyPVwwTQsno99hia8,2753
|
|
10
|
+
awslabs/cost_explorer_mcp_server/server.py,sha256=BzAF1FP3VrdKURl0lG-2M_TDgfcpdi4jGsNrq1bV440,3842
|
|
11
|
+
awslabs/cost_explorer_mcp_server/utility_handler.py,sha256=ecFbAg8gyJRdRy-r2vMFOwSEAI_RMeuqlMvF-J0GtLM,1568
|
|
12
|
+
awslabs_cost_explorer_mcp_server-0.0.6.dist-info/METADATA,sha256=jMDv7iPQdP4pU9Pf5R3ul-4fBaX2v4EEsD2pwagZOmE,8231
|
|
13
|
+
awslabs_cost_explorer_mcp_server-0.0.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
awslabs_cost_explorer_mcp_server-0.0.6.dist-info/entry_points.txt,sha256=nkewGFi8GZCCtHhFofUmYii3OCeK_5qqgLXE4eUSFZg,98
|
|
15
|
+
awslabs_cost_explorer_mcp_server-0.0.6.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
16
|
+
awslabs_cost_explorer_mcp_server-0.0.6.dist-info/licenses/NOTICE,sha256=VL_gWrK0xFaHGFxxYj6BcZI30EkRxUH4Dv1u2Qsh3ao,92
|
|
17
|
+
awslabs_cost_explorer_mcp_server-0.0.6.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
awslabs/__init__.py,sha256=XlNvbbm4JS0QaAK93MUCbMITZLOSkWkBilYvLI3rBpU,667
|
|
2
|
-
awslabs/cost_explorer_mcp_server/__init__.py,sha256=jj08M9QRfjYVfiV85UhDzpEO4Vseafpeekg31d2DhfM,785
|
|
3
|
-
awslabs/cost_explorer_mcp_server/helpers.py,sha256=p1iMZ_OlKY0bpgT2HR2oEfpeAAERmqQLBFVkVPyIUOE,14418
|
|
4
|
-
awslabs/cost_explorer_mcp_server/server.py,sha256=MEoZpUb104v06VZXnw1CYTpubMnyWveMuCwDvfOMD5g,21806
|
|
5
|
-
awslabs_cost_explorer_mcp_server-0.0.5.dist-info/METADATA,sha256=f7u_oUsGy-ePY3Wm_JH7S8gngvB7kkBCEEYf49Ycq_c,6745
|
|
6
|
-
awslabs_cost_explorer_mcp_server-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
-
awslabs_cost_explorer_mcp_server-0.0.5.dist-info/entry_points.txt,sha256=nkewGFi8GZCCtHhFofUmYii3OCeK_5qqgLXE4eUSFZg,98
|
|
8
|
-
awslabs_cost_explorer_mcp_server-0.0.5.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
9
|
-
awslabs_cost_explorer_mcp_server-0.0.5.dist-info/licenses/NOTICE,sha256=VL_gWrK0xFaHGFxxYj6BcZI30EkRxUH4Dv1u2Qsh3ao,92
|
|
10
|
-
awslabs_cost_explorer_mcp_server-0.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|