awslabs.cost-explorer-mcp-server 0.0.5__py3-none-any.whl → 0.0.7__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.7.dist-info}/METADATA +45 -16
- awslabs_cost_explorer_mcp_server-0.0.7.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.7.dist-info}/WHEEL +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.5.dist-info → awslabs_cost_explorer_mcp_server-0.0.7.dist-info}/entry_points.txt +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.5.dist-info → awslabs_cost_explorer_mcp_server-0.0.7.dist-info}/licenses/LICENSE +0 -0
- {awslabs_cost_explorer_mcp_server-0.0.5.dist-info → awslabs_cost_explorer_mcp_server-0.0.7.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.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.
|
|
24
|
+
Requires-Dist: boto3>=1.38.40
|
|
25
25
|
Requires-Dist: loguru>=0.7.0
|
|
26
|
-
Requires-Dist: mcp[cli]>=1.
|
|
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
|
-
|
|
78
|
+
| Cursor | VS Code |
|
|
79
|
+
|:------:|:-------:|
|
|
80
|
+
| [](https://cursor.com/install-mcp?name=awslabs.cost-explorer-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMuY29zdC1leHBsb3Jlci1tY3Atc2VydmVyQGxhdGVzdCIsImVudiI6eyJBV1NfUFJPRklMRSI6InlvdXItYXdzLXByb2ZpbGUiLCJBV1NfUkVHSU9OIjoidXMtZWFzdC0xIiwiRkFTVE1DUF9MT0dfTEVWRUwiOiJFUlJPUiJ9LCJkaXNhYmxlZCI6ZmFsc2UsImF1dG9BcHByb3ZlIjpbXX0%3D) | [](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
|
-
###
|
|
187
|
+
### Cost Analysis Examples
|
|
170
188
|
|
|
171
189
|
```
|
|
172
|
-
|
|
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
|
-
###
|
|
197
|
+
### Cost Comparison Examples
|
|
176
198
|
|
|
177
199
|
```
|
|
178
|
-
|
|
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
|
-
|
|
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
|
|
@@ -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.7.dist-info/METADATA,sha256=FQR3Yo7FVv4jbCfTeDvZwMsu13cAb3OLfcpQiwXEb8g,8834
|
|
13
|
+
awslabs_cost_explorer_mcp_server-0.0.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
awslabs_cost_explorer_mcp_server-0.0.7.dist-info/entry_points.txt,sha256=nkewGFi8GZCCtHhFofUmYii3OCeK_5qqgLXE4eUSFZg,98
|
|
15
|
+
awslabs_cost_explorer_mcp_server-0.0.7.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
16
|
+
awslabs_cost_explorer_mcp_server-0.0.7.dist-info/licenses/NOTICE,sha256=VL_gWrK0xFaHGFxxYj6BcZI30EkRxUH4Dv1u2Qsh3ao,92
|
|
17
|
+
awslabs_cost_explorer_mcp_server-0.0.7.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
|