Loading...

Exposes Prometheus metrics to AI assistants via the Model Context Protocol, enabling PromQL queries and data analysis through a standardized interface.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
Exposes Prometheus metrics to AI assistants via the Model Context Protocol, enabling PromQL queries and data analysis through a standardized interface.
The Prometheus MCP server provides a relatively safe way to expose Prometheus metrics to AI assistants. However, it's crucial to properly configure authentication and monitor query performance to prevent potential security risks and performance issues. Disabling SSL verification is strongly discouraged.
Performance is primarily dependent on the Prometheus server's performance and the complexity of the PromQL queries. Network latency between the MCP server and the Prometheus server can also impact performance.
Cost considerations include the resources consumed by the Prometheus server and the MCP server. Complex PromQL queries can consume significant CPU and memory resources on the Prometheus server. Token usage by the AI assistant also contributes to cost.
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:latest"
],
"env": {
"PROMETHEUS_URL": "<your-prometheus-url>"
}
}
}
}PROMETHEUS_URLPROMETHEUS_USERNAMEPROMETHEUS_PASSWORDPROMETHEUS_TOKENORG_IDNO_UVhealth_checkVerifies the server's health status for monitoring purposes.
Read-only endpoint with no side effects.
execute_queryExecutes a PromQL instant query against the Prometheus server.
Executes read-only queries; no data modification.
execute_range_queryExecutes a PromQL range query with specified start, end times, and step interval.
Executes read-only queries; no data modification.
list_metricsLists all available metrics in the Prometheus server with pagination and filtering.
Read-only operation; no data modification.
get_metric_metadataRetrieves metadata for a specific metric from the Prometheus server.
Read-only operation; no data modification.
get_targetsRetrieves information about all scrape targets configured in Prometheus.
Read-only operation; no data modification.
Environment Variable
hybrid
The Prometheus MCP server provides a relatively safe way to expose Prometheus metrics to AI assistants. However, it's crucial to properly configure authentication and monitor query performance to prevent potential security risks and performance issues. Disabling SSL verification is strongly discouraged.
The server primarily provides read-only access to Prometheus metrics. Autonomy is limited by the capabilities of the exposed tools, which are focused on querying and discovery.
Production Tip
Set a `PROMETHEUS_REQUEST_TIMEOUT` to prevent long-running queries from consuming resources and potentially causing denial-of-service.
Basic authentication (username/password) and bearer token authentication are supported via environment variables.
The `PROMETHEUS_URL` environment variable must be set to the URL of your Prometheus server. Optionally, you can configure authentication and other settings using environment variables.
Setting `PROMETHEUS_DISABLE_LINKS` to True disables Prometheus UI links in query results, which can save context tokens when using AI assistants.
Set the `PROMETHEUS_REQUEST_TIMEOUT` environment variable to limit the execution time of PromQL queries.
Yes, you can run multiple instances. Use the `TOOL_PREFIX` environment variable to differentiate the tool names for each instance.
The `ORG_ID` variable is used for multi-tenant Prometheus setups to specify the organization ID.
Ensure that the `PROMETHEUS_URL` starts with `https://`. You may need to set `PROMETHEUS_URL_SSL_VERIFY` to `False` if you are using a self-signed certificate (not recommended for production).