Back to MCP Directory
Prometheus
Model Context Protocol moderate risk

Prometheus

Exposes Prometheus metrics to AI assistants via the Model Context Protocol, enabling PromQL queries and data analysis through a standardized interface.

Connections & Capabilities

Connects To

GitHubDocker

Capabilities

readexec

Quickstart

Config

{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "PROMETHEUS_URL",
        "ghcr.io/pab1it0/prometheus-mcp-server:latest"
      ],
      "env": {
        "PROMETHEUS_URL": "<your-prometheus-url>"
      }
    }
  }
}

Exposed MCP Tools (6)

safe
health_check

Verifies the server's health status for monitoring purposes.

Read-only endpoint with no side effects.

safe
execute_query

Executes a PromQL instant query against the Prometheus server.

Executes read-only queries; no data modification.

safe
execute_range_query

Executes a PromQL range query with specified start, end times, and step interval.

Executes read-only queries; no data modification.

safe
list_metrics

Lists all available metrics in the Prometheus server with pagination and filtering.

Read-only operation; no data modification.

safe
get_metric_metadata

Retrieves metadata for a specific metric from the Prometheus server.

Read-only operation; no data modification.

safe
get_targets

Retrieves information about all scrape targets configured in Prometheus.

Read-only operation; no data modification.

Safety Assessment

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.

  • Read-only access to Prometheus metrics by default
  • Configurable request timeout to prevent hanging requests
  • Supports authentication via username/password or token
  • Option to disable Prometheus UI links to reduce context tokens
  • Can be run in a sandboxed Docker container
  • Requires network access to the Prometheus server
  • Improperly configured PromQL queries could potentially overload the Prometheus server
  • Authentication credentials stored as environment variables
  • If `PROMETHEUS_URL_SSL_VERIFY` is set to False, TLS certificate validation is disabled