awslabs.cost-explorer-mcp-server 0.0.4__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 +501 -68
- 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 +60 -463
- awslabs/cost_explorer_mcp_server/utility_handler.py +50 -0
- {awslabs_cost_explorer_mcp_server-0.0.4.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/METADATA +44 -14
- awslabs_cost_explorer_mcp_server-0.0.6.dist-info/RECORD +17 -0
- awslabs_cost_explorer_mcp_server-0.0.4.dist-info/RECORD +0 -10
- {awslabs_cost_explorer_mcp_server-0.0.4.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/WHEEL +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.4.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/entry_points.txt +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.4.dist-info → awslabs_cost_explorer_mcp_server-0.0.6.dist-info}/licenses/LICENSE +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.4.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,8 @@ 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
|
+
Requires-Dist: loguru>=0.7.0
|
|
25
26
|
Requires-Dist: mcp[cli]>=1.6.0
|
|
26
27
|
Requires-Dist: pandas>=2.2.3
|
|
27
28
|
Requires-Dist: pydantic>=2.10.6
|
|
@@ -40,17 +41,28 @@ MCP server for analyzing AWS costs and usage data through the AWS Cost Explorer
|
|
|
40
41
|
- Query historical cost data for specific time periods
|
|
41
42
|
- Filter costs by various dimensions, tags, and cost categories
|
|
42
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
|
+
|
|
43
60
|
### Query cost data with natural language
|
|
44
61
|
|
|
45
62
|
- Ask questions about your AWS costs in plain English
|
|
46
63
|
- Get instant answers about your AWS spending patterns
|
|
47
64
|
- Retrieve historical cost data with simple queries
|
|
48
65
|
|
|
49
|
-
### Generate cost reports and insights
|
|
50
|
-
|
|
51
|
-
- Generate comprehensive cost reports based on your AWS Cost Explorer data
|
|
52
|
-
- Get cost breakdowns by various dimensions (service, region, account, etc.)
|
|
53
|
-
- Analyze usage patterns and spending trends
|
|
54
66
|
|
|
55
67
|
## Prerequisites
|
|
56
68
|
|
|
@@ -63,6 +75,8 @@ MCP server for analyzing AWS costs and usage data through the AWS Cost Explorer
|
|
|
63
75
|
|
|
64
76
|
## Installation
|
|
65
77
|
|
|
78
|
+
[](https://cursor.com/install-mcp?name=awslabs.cost-explorer-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuY29zdC1leHBsb3Jlci1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJGQVNUTUNQX0xPR19MRVZFTCI6IkVSUk9SIiwiQVdTX1BST0ZJTEUiOiJ5b3VyLWF3cy1wcm9maWxlIn0sImRpc2FibGVkIjpmYWxzZSwiYXV0b0FwcHJvdmUiOltdfQ%3D%3D)
|
|
79
|
+
|
|
66
80
|
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`):
|
|
67
81
|
|
|
68
82
|
```json
|
|
@@ -146,6 +160,9 @@ The following IAM permissions are required for this MCP server:
|
|
|
146
160
|
- ce:GetCostAndUsage
|
|
147
161
|
- ce:GetDimensionValues
|
|
148
162
|
- ce:GetTags
|
|
163
|
+
- ce:GetCostForecast
|
|
164
|
+
- ce:GetCostAndUsageComparisons
|
|
165
|
+
- ce:GetCostComparisonDrivers
|
|
149
166
|
|
|
150
167
|
|
|
151
168
|
|
|
@@ -157,26 +174,39 @@ The Cost Explorer MCP Server provides the following tools:
|
|
|
157
174
|
2. `get_dimension_values` - Get available values for a specific dimension (e.g., SERVICE, REGION)
|
|
158
175
|
3. `get_tag_values` - Get available values for a specific tag key
|
|
159
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
|
|
160
180
|
|
|
161
181
|
## Example Usage
|
|
162
182
|
|
|
163
|
-
Here are some examples of how to use the Cost Explorer MCP Server:
|
|
164
|
-
|
|
183
|
+
Here are some examples of how to use the Cost Explorer MCP Server through natural language queries:
|
|
165
184
|
|
|
166
|
-
###
|
|
185
|
+
### Cost Analysis Examples
|
|
167
186
|
|
|
168
187
|
```
|
|
169
|
-
|
|
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?
|
|
170
193
|
```
|
|
171
194
|
|
|
172
|
-
###
|
|
195
|
+
### Cost Comparison Examples
|
|
173
196
|
|
|
174
197
|
```
|
|
175
|
-
|
|
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?
|
|
176
202
|
```
|
|
177
203
|
|
|
204
|
+
### Forecasting Examples
|
|
205
|
+
|
|
178
206
|
```
|
|
179
|
-
|
|
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?
|
|
180
210
|
```
|
|
181
211
|
|
|
182
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=8ldRc2TVFuE7-0Js4nQWw3v3e3Om48QgQgbTAXOecgI,10186
|
|
4
|
-
awslabs/cost_explorer_mcp_server/server.py,sha256=joYtlqmNnjGm162Qe71sz_weDNUujAGS6-RvdG5wpT4,21007
|
|
5
|
-
awslabs_cost_explorer_mcp_server-0.0.4.dist-info/METADATA,sha256=RrYXLshB_1ZL448HUxTxw7RZl1ktNgXbLkZXBtvJ4pY,6342
|
|
6
|
-
awslabs_cost_explorer_mcp_server-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
-
awslabs_cost_explorer_mcp_server-0.0.4.dist-info/entry_points.txt,sha256=nkewGFi8GZCCtHhFofUmYii3OCeK_5qqgLXE4eUSFZg,98
|
|
8
|
-
awslabs_cost_explorer_mcp_server-0.0.4.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
9
|
-
awslabs_cost_explorer_mcp_server-0.0.4.dist-info/licenses/NOTICE,sha256=VL_gWrK0xFaHGFxxYj6BcZI30EkRxUH4Dv1u2Qsh3ao,92
|
|
10
|
-
awslabs_cost_explorer_mcp_server-0.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|