awslabs.prometheus-mcp-server
MCP server for interacting with AWS Managed Prometheus
pinned to #cdd87a8updated last month
Ask your AI client: “install mcps/awslabs-prometheus-mcp-server”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install mcps/awslabs-prometheus-mcp-servermetahub onboarded this repo on the author's behalf.
If you own github.com/awslabs/mcp on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
9,586
Last commit
last month
Latest release
published
- #aws
- #mcp
- #mcp-client
- #mcp-clients
- #mcp-host
- #mcp-server
- #mcp-servers
- #mcp-tools
- #modelcontextprotocol
Automated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.cdd87a8· last month
Behavioral checks haven't run yet: the sandbox couldn't execute this artifact (it may need credentials we don't provide, or an unsupported build). An environment limit, not a verdict.
Structural
7 passed1 warningName declared and well-formedwarn
Name "awslabs.prometheus-mcp-server" is not lowercase kebab-case.
Use lowercase letters, digits, and hyphens.
Repository is reachable
https://github.com/awslabs/mcp @ cdd87a8 — ★ 9,586 · Python · Apache-2.0 · last push today
Manifest detected
kind=mcp slug=awslabs-prometheus-mcp-server · path=src/prometheus-mcp-server · source=pyproject.toml
Slug is URL-safe
"awslabs-prometheus-mcp-server" matches /^[a-z0-9][a-z0-9-]{0,62}$/
Slug is unique within kind
No collision found for mcp/awslabs-prometheus-mcp-server
Version is semver
0.2.20
Manifest present and parseable
Manifest found at pyproject.toml.
Version is semver
Version 0.2.20.
Release history
1- releasecurrentcdd87a8warnlast month
Contents
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.
Reviews
No reviews yet. Be the first.
Related
Github Mcp Server
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Context7
Up-to-date code docs for any prompt
Playwright Mcp
Playwright Tools for MCP
mh install mcps/awslabs-prometheus-mcp-server