Prometheus MCP Server
The Prometheus MCP Server provides a robust interface for interacting with AWS Managed Prometheus, enabling users to execute PromQL queries, list metrics, and retrieve server information with AWS SigV4 authentication support.
This MCP server is designed to be fully compatible with Kiro, allowing seamless integration of Prometheus monitoring capabilities into your Kiro workflows. You can load the server directly into Kiro to leverage its powerful querying and metric analysis features through the familiar Kiro IDE and Kiro CLI interfaces.
Features
- Execute instant PromQL queries against AWS Managed Prometheus
- Execute range queries with start time, end time, and step interval
- List all available metrics in your Prometheus instance
- Get server configuration information
- AWS SigV4 authentication for secure access
- Automatic retries with exponential backoff
Installation
| Kiro | Cursor | VS Code |
|---|---|---|
Prerequisites
- Python 3.10 or higher
- AWS credentials configured with appropriate permissions
- AWS Managed Prometheus workspace
Configuration
The server is configured through the Kiro MCP configuration file as shown in the Usage section below.
Usage with Kiro
- Create a configuration file:
mkdir -p ~/.kiro/settings/
- Add the following to
~/.kiro/settings/mcp.json:
Basic Configuration
{
"mcpServers": {
"prometheus": {
"command": "uvx",
"args": [
"awslabs.prometheus-mcp-server@latest"
],
"env": {
"FASTMCP_LOG_LEVEL": "DEBUG"
}
}
}
}
Windows Installation
For Windows users, the MCP server configuration format is slightly different:
{
"mcpServers": {
"awslabs.prometheus-mcp-server": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "uv",
"args": [
"tool",
"run",
"--from",
"awslabs.prometheus-mcp-server@latest",
"awslabs.prometheus-mcp-server.exe"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR",
"AWS_PROFILE": "your-aws-profile",
"AWS_REGION": "us-east-1"
}
}
}
}
Configuration with Optional Arguments
{
"mcpServers": {
"prometheus": {
"command": "uvx",
"args": [
"awslabs.prometheus-mcp-server@latest",
"--url",
"https://aps-workspaces.<AWS Region>.amazonaws.com/workspaces/ws-<Workspace ID>",
"--region",
"<Your AWS Region>",
"--profile",
"<Your CLI Profile>"
],
"env": {
"FASTMCP_LOG_LEVEL": "DEBUG"
}
}
}
}
- In Kiro, you can now use the Prometheus MCP server to query your metrics.
Available Tools
-
GetAvailableWorkspaces
- List all available Prometheus workspaces in the specified region
- Parameters: region (optional)
- Returns: List of workspaces with IDs, aliases, and status
-
ExecuteQuery
- Execute instant PromQL queries against Prometheus
- Parameters: workspace_id (required), query (required), time (optional), region (optional)
-
ExecuteRangeQuery
- Execute PromQL queries over a time range
- Parameters: workspace_id (required), query, start time, end time, step interval, region (optional)
-
ListMetrics
- Retrieve all available metric names from Prometheus
- Parameters: workspace_id (required), region (optional)
- Returns: Sorted list of metric names
-
GetServerInfo
- Retrieve server configuration details
- Parameters: workspace_id (required), region (optional)
- Returns: URL, region, profile, and service information
Example Queries
# Get available workspaces
workspaces = await get_available_workspaces()
for ws in workspaces['workspaces']:
print(f"ID: {ws['workspace_id']}, Alias: {ws['alias']}, Status: {ws['status']}")
# Execute an instant query
result = await execute_query(
workspace_id="ws-12345678-abcd-1234-efgh-123456789012",
query="up"
)
# Execute a range query
data = await execute_range_query(
workspace_id="ws-12345678-abcd-1234-efgh-123456789012",
query="rate(node_cpu_seconds_total[5m])",
start="2023-01-01T00:00:00Z",
end="2023-01-01T01:00:00Z",
step="1m"
)
# List available metrics
metrics = await list_metrics(
workspace_id="ws-12345678-abcd-1234-efgh-123456789012"
)
# Get server information
info = await get_server_info(
workspace_id="ws-12345678-abcd-1234-efgh-123456789012"
)
Troubleshooting
Common issues and solutions:
-
AWS Credentials Not Found
- Check ~/.aws/credentials
- Set AWS_PROFILE environment variable
- Verify IAM permissions
-
Connection Errors
- Verify Prometheus URL is correct
- Check network connectivity
- Ensure AWS VPC access is configured correctly
-
Authentication Failures
- Verify AWS credentials are current
- Check system clock synchronization
- Ensure correct AWS region is specified
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Release files for awslabs.prometheus-mcp-server 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| awslabs_prometheus_mcp_server-0.3.1.tar.gz | 116.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awslabs_prometheus_mcp_server-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 137.6 kB
Release files / awslabs_prometheus_mcp_server-0.3.1.tar.gz
| Download URL | awslabs_prometheus_mcp_server-0.3.1.tar.gz |
|---|---|
| Size | 116.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
949c3446e61cc00e32726310d0b4888c68f179a37e10b22e5cac6882a2c78ff4
|
|
BLAKE2b-256 checksum How to use checksums |
be80b70d7caae8c4e2618fef6a0e1622b1cee0cf833566e04b6b610f70cb3ea3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / awslabs_prometheus_mcp_server-0.3.1-py3-none-any.whl
| Download URL | awslabs_prometheus_mcp_server-0.3.1-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
903ae60e36cf5b954926db981ac4f77a247fb730ad4485be3a43955b60703502
|
|
BLAKE2b-256 checksum How to use checksums |
ab8853f2722e444ad9ce859fd9656be67bb30261a27564fa247b70be4426f8f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency log