← Back to directory
P

Prometheus MCP Server

Community
Give AI assistants the power to query your Prometheus metrics.
GitHub source repository ↗
★ 513 Stars Category · Dev Tools Very popular Source revision 4885f271ec1b
67FMRS · C
Reliability
11/20
Security and permissions
13/20
Maintenance
15/20
Documentation
14/20
Setup experience
14/20

This community-maintained server provides robust Prometheus integration, including querying, discovery, and authentication support. Installation is flexible with Docker and Helm. Risks involve data access exposure and require proper network and authentication configuration. Overall, it is suitable for developers and ops professionals looking to connect Prometheus metrics to AI assistants.

Read the FMRS scoring method →

A Model Context Protocol (MCP) server that provides access to Prometheus metrics and queries through standardized MCP interfaces. It enables AI assistants to execute PromQL instant and range queries, discover metrics and metadata, retrieve scrape targets, and supports multiple authentication methods including basic auth, bearer token, and mutual TLS. The server can be deployed via Docker or Helm, offers configurable tools, and includes features to save context tokens.

Tools

health_check
Health check endpoint for container monitoring and status verification.
execute_query
Execute a PromQL instant query against Prometheus.
execute_range_query
Execute a PromQL range query with start time, end time, and step interval.
list_metrics
List all available metrics in Prometheus with pagination and filtering support.
get_metric_metadata
Get metadata for one metric or bulk metadata with optional filtering.
get_targets
Get scrape targets, with server-side state/scrape_pool filtering and optional pagination.

Setup

  1. Ensure you have an accessible Prometheus server and an MCP client (e.g., Claude Desktop).
  2. Run with Docker: docker run -i --rm -e PROMETHEUS_URL=<your-prometheus-url> ghcr.io/pab1it0/prometheus-mcp-server:latest.
  3. Add the MCP server to your client configuration; an example is provided for Claude Desktop.
  4. If authentication is required, set PROMETHEUS_USERNAME/PASSWORD or PROMETHEUS_TOKEN.
  5. For Kubernetes, use the Helm chart: helm install prometheus-mcp-server oci://ghcr.io/pab1it0/charts/prometheus-mcp-server --version 1.1.1 --set prometheus.url="http://prometheus:9090".
claude_desktop_config.json
{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "PROMETHEUS_URL",
        "ghcr.io/pab1it0/prometheus-mcp-server:latest"
      ],
      "env": {
        "PROMETHEUS_URL": "<your-prometheus-url>"
      }
    }
  }
}

Fit and risk

Best for

  • DevOps teams looking to integrate Prometheus metric querying into AI workflows.
  • Users who want to query metrics directly in MCP clients like Claude Desktop.
  • Scenarios requiring lightweight deployment via Docker or Helm.

Not for

  • Users without Prometheus or MCP needs.
  • Organizations requiring official support or strict certification (this server is community-maintained).
  • High-throughput batch data extraction with low latency requirements (MCP interaction may not be suitable).

Required permissions

  • Network access to the Prometheus server specified by PROMETHEUS_URL.
  • Authentication credentials if Prometheus requires them (username/password or token).
  • Ability to send custom headers via PROMETHEUS_CUSTOM_HEADERS.
  • If using TLS, certificate files or SSL verification settings.

Risks and side effects

  • Exposing Prometheus query endpoints could increase data leakage risk; ensure network access is restricted.
  • Queries may hang if timeout is not set, but the server has a default 30-second timeout.
  • Incorrect configuration can lead to authentication failures or connection errors.
  • May consume significant context tokens in MCP clients; disabling links can mitigate.

Troubleshooting

  1. Verify PROMETHEUS_URL is correct and reachable from the environment.
  2. Check authentication variables (username/password or token) are set correctly.
  3. If SSL is enabled, ensure certificate paths or CA bundles are correct.
  4. Inspect server logs for error messages and validate JSON configuration.

Use cases

Let AI assistants directly query Prometheus metrics for real-time monitoring analysis.
Use natural language to have AI execute PromQL queries and explain results.
Quickly explore available metrics and their metadata in dev or ops scenarios.
Integrate into local or cloud environments for automated monitoring and alerting assistance.

Supported clients

Claude DesktopFull support