awslabs.prometheus-mcp-server 0.1.1__py3-none-any.whl → 0.2.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.prometheus-mcp-server
3
- Version: 0.1.1
3
+ Version: 0.2.2
4
4
  Summary: MCP server for interacting with AWS Managed Prometheus
5
5
  Project-URL: homepage, https://awslabs.github.io/mcp/
6
6
  Project-URL: docs, https://awslabs.github.io/mcp/servers/prometheus-mcp-server/
@@ -24,7 +24,7 @@ Requires-Python: >=3.10
24
24
  Requires-Dist: boto3>=1.38.7
25
25
  Requires-Dist: httpx>=0.28.1
26
26
  Requires-Dist: loguru>=0.7.0
27
- Requires-Dist: mcp[cli]>=1.7.0
27
+ Requires-Dist: mcp[cli]>=1.11.0
28
28
  Requires-Dist: pydantic>=2.0.0
29
29
  Requires-Dist: python-dotenv>=1.0.0
30
30
  Requires-Dist: requests>=2.32.3
@@ -47,6 +47,10 @@ This MCP server is designed to be fully compatible with Amazon Q developer CLI,
47
47
 
48
48
  ## Installation
49
49
 
50
+ | Cursor | VS Code |
51
+ |:------:|:-------:|
52
+ | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=awslabs.prometheus-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMucHJvbWV0aGV1cy1tY3Atc2VydmVyQGxhdGVzdCAtLXVybCBodHRwczovL2Fwcy13b3Jrc3BhY2VzLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tL3dvcmtzcGFjZXMvd3MtPFdvcmtzcGFjZSBJRD4gLS1yZWdpb24gPFlvdXIgQVdTIFJlZ2lvbj4gLS1wcm9maWxlIDxZb3VyIENMSSBQcm9maWxlIFtkZWZhdWx0XSBpZiBubyBwcm9maWxlIGlzIHVzZWQ%2BIiwiZW52Ijp7IkZBU1RNQ1BfTE9HX0xFVkVMIjoiREVCVUciLCJBV1NfUFJPRklMRSI6IjxZb3VyIENMSSBQcm9maWxlIFtkZWZhdWx0XSBpZiBubyBwcm9maWxlIGlzIHVzZWQ%2BIn19) | [![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=Prometheus%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.prometheus-mcp-server%40latest%22%2C%22--url%22%2C%22https%3A%2F%2Faps-workspaces.us-east-1.amazonaws.com%2Fworkspaces%2Fws-%3CWorkspace%20ID%3E%22%2C%22--region%22%2C%22%3CYour%20AWS%20Region%3E%22%2C%22--profile%22%2C%22%3CYour%20CLI%20Profile%20%5Bdefault%5D%20if%20no%20profile%20is%20used%3E%22%5D%2C%22env%22%3A%7B%22FASTMCP_LOG_LEVEL%22%3A%22DEBUG%22%2C%22AWS_PROFILE%22%3A%22%3CYour%20CLI%20Profile%20%5Bdefault%5D%20if%20no%20profile%20is%20used%3E%22%7D%7D) |
53
+
50
54
  ### Prerequisites
51
55
 
52
56
  - Python 3.10 or higher
@@ -69,23 +73,41 @@ mkdir -p ~/.aws/amazonq/
69
73
  ```
70
74
 
71
75
  2. Add the following to `~/.aws/amazonq/mcp.json`:
76
+
77
+ ### Basic Configuration
78
+ ```json
79
+ {
80
+ "mcpServers": {
81
+ "prometheus": {
82
+ "command": "uvx",
83
+ "args": [
84
+ "awslabs.prometheus-mcp-server@latest"
85
+ ],
86
+ "env": {
87
+ "FASTMCP_LOG_LEVEL": "DEBUG"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### Configuration with Optional Arguments
72
95
  ```json
73
96
  {
74
97
  "mcpServers": {
75
- "awslabs.prometheus-mcp-server": {
98
+ "prometheus": {
76
99
  "command": "uvx",
77
100
  "args": [
78
101
  "awslabs.prometheus-mcp-server@latest",
79
102
  "--url",
80
- "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-<Workspace ID>",
103
+ "https://aps-workspaces.<AWS Region>.amazonaws.com/workspaces/ws-<Workspace ID>",
81
104
  "--region",
82
105
  "<Your AWS Region>",
83
106
  "--profile",
84
- "<Your CLI Profile [default] if no profile is used>"
107
+ "<Your CLI Profile>"
85
108
  ],
86
109
  "env": {
87
- "FASTMCP_LOG_LEVEL": "DEBUG",
88
- "AWS_PROFILE": "<Your CLI Profile [default] if no profile is used>"
110
+ "FASTMCP_LOG_LEVEL": "DEBUG"
89
111
  }
90
112
  }
91
113
  }
@@ -96,30 +118,46 @@ mkdir -p ~/.aws/amazonq/
96
118
 
97
119
  ## Available Tools
98
120
 
99
- 1. **execute_query**
121
+ 1. **GetAvailableWorkspaces**
122
+ - List all available Prometheus workspaces in the specified region
123
+ - Parameters: region (optional)
124
+ - Returns: List of workspaces with IDs, aliases, and status
125
+
126
+ 2. **ExecuteQuery**
100
127
  - Execute instant PromQL queries against Prometheus
101
- - Parameters: query (required), time (optional)
128
+ - Parameters: workspace_id (required), query (required), time (optional), region (optional)
102
129
 
103
- 2. **execute_range_query**
130
+ 3. **ExecuteRangeQuery**
104
131
  - Execute PromQL queries over a time range
105
- - Parameters: query, start time, end time, step interval
132
+ - Parameters: workspace_id (required), query, start time, end time, step interval, region (optional)
106
133
 
107
- 3. **list_metrics**
134
+ 4. **ListMetrics**
108
135
  - Retrieve all available metric names from Prometheus
136
+ - Parameters: workspace_id (required), region (optional)
109
137
  - Returns: Sorted list of metric names
110
138
 
111
- 4. **get_server_info**
139
+ 5. **GetServerInfo**
112
140
  - Retrieve server configuration details
141
+ - Parameters: workspace_id (required), region (optional)
113
142
  - Returns: URL, region, profile, and service information
114
143
 
115
144
  ## Example Queries
116
145
 
117
146
  ```python
147
+ # Get available workspaces
148
+ workspaces = await get_available_workspaces()
149
+ for ws in workspaces['workspaces']:
150
+ print(f"ID: {ws['workspace_id']}, Alias: {ws['alias']}, Status: {ws['status']}")
151
+
118
152
  # Execute an instant query
119
- result = await execute_query("up")
153
+ result = await execute_query(
154
+ workspace_id="ws-12345678-abcd-1234-efgh-123456789012",
155
+ query="up"
156
+ )
120
157
 
121
158
  # Execute a range query
122
159
  data = await execute_range_query(
160
+ workspace_id="ws-12345678-abcd-1234-efgh-123456789012",
123
161
  query="rate(node_cpu_seconds_total[5m])",
124
162
  start="2023-01-01T00:00:00Z",
125
163
  end="2023-01-01T01:00:00Z",
@@ -127,10 +165,14 @@ data = await execute_range_query(
127
165
  )
128
166
 
129
167
  # List available metrics
130
- metrics = await list_metrics()
168
+ metrics = await list_metrics(
169
+ workspace_id="ws-12345678-abcd-1234-efgh-123456789012"
170
+ )
131
171
 
132
172
  # Get server information
133
- info = await get_server_info()
173
+ info = await get_server_info(
174
+ workspace_id="ws-12345678-abcd-1234-efgh-123456789012"
175
+ )
134
176
  ```
135
177
 
136
178
  ## Troubleshooting
@@ -0,0 +1,11 @@
1
+ awslabs/__init__.py,sha256=O4wlFva3THWmjfaXfJAwi29mxJSKIhM0jcebVfd3S5U,615
2
+ awslabs/prometheus_mcp_server/__init__.py,sha256=5IA_Tu-_9Y_SEzlcDrt9JQhlDIOXR86l3Z45K5YgNuo,676
3
+ awslabs/prometheus_mcp_server/consts.py,sha256=ZkZsypCBRvVuT17llXmD9GFqtC5Qi-6wrEBQuaIsq9M,1875
4
+ awslabs/prometheus_mcp_server/models.py,sha256=dfF9iUUtvmNiVWdKR-2RhkBIWqnBf33u_wM-6BWiPss,1837
5
+ awslabs/prometheus_mcp_server/server.py,sha256=-Gp0iWkCdGuf59W6qNXA5LKX4tsX24vE_XLmWS6GqEw,42086
6
+ awslabs_prometheus_mcp_server-0.2.2.dist-info/METADATA,sha256=t1NhQH_iw595vIi3saBKh6BqmZbJujJnph76x55hdSQ,7438
7
+ awslabs_prometheus_mcp_server-0.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ awslabs_prometheus_mcp_server-0.2.2.dist-info/entry_points.txt,sha256=vOT5qHrh2r_C0eht0Iu42IOBCeWaBlZ6bud_-0jbuFg,92
9
+ awslabs_prometheus_mcp_server-0.2.2.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
10
+ awslabs_prometheus_mcp_server-0.2.2.dist-info/licenses/NOTICE,sha256=4WcOZNSeVgbIVslS5AjRYmqYyv5S3xHylu2kSEXgXeQ,30
11
+ awslabs_prometheus_mcp_server-0.2.2.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- awslabs/__init__.py,sha256=O4wlFva3THWmjfaXfJAwi29mxJSKIhM0jcebVfd3S5U,615
2
- awslabs/prometheus_mcp_server/__init__.py,sha256=s1zDdDhGr3NBV69b-JNnE1zkUYfOQSCTZaEU7zIA1wU,676
3
- awslabs/prometheus_mcp_server/consts.py,sha256=ZkZsypCBRvVuT17llXmD9GFqtC5Qi-6wrEBQuaIsq9M,1875
4
- awslabs/prometheus_mcp_server/models.py,sha256=yU7Ta7Ei0DItUJY4t3QDFwSNk8xkBQ-Hwynej_IC080,4231
5
- awslabs/prometheus_mcp_server/server.py,sha256=ev74dNSwsTGRnidrqRPW5sWd2giyy5W1heRxLq9WrcE,23294
6
- awslabs_prometheus_mcp_server-0.1.1.dist-info/METADATA,sha256=U45KUHnYFUbpBuOmkIri-6h_Hbg0ji55ISxITt1dYiw,5038
7
- awslabs_prometheus_mcp_server-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- awslabs_prometheus_mcp_server-0.1.1.dist-info/entry_points.txt,sha256=vOT5qHrh2r_C0eht0Iu42IOBCeWaBlZ6bud_-0jbuFg,92
9
- awslabs_prometheus_mcp_server-0.1.1.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
10
- awslabs_prometheus_mcp_server-0.1.1.dist-info/licenses/NOTICE,sha256=4WcOZNSeVgbIVslS5AjRYmqYyv5S3xHylu2kSEXgXeQ,30
11
- awslabs_prometheus_mcp_server-0.1.1.dist-info/RECORD,,