← Back to directory
P

Prometheus MCP Server

Community
Give AI assistants the power to query your Prometheus metrics.
Category
Dev Tools #26 of 438
Stars
★ 518 Very popular
Transport
stdio (local process)
Runtime
Docker
Credentials
No credential needed
License
MIT
Last commit
Tools
6
67FMRS · C

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.

Strongest · Maintenance 15/20 Weakest · Reliability 11/20

Reliability
11/20
Security and permissions
13/20
Maintenance
15/20
Documentation
14/20
Setup experience
14/20
Why each score
Reliability 11/20
Evidence: The repo contains real CI workflows (GitHub Actions) and a pytest suite covering key server paths (tool registration, query handling, health checks), with README describing test commands (pytest --cov). The manifest declares five tools matching the README tool list. Deductions: this is a static review with no execution; error paths for HTTP/SSE transport and client TLS are not fully covered; stars and untested claims cannot substitute for runtime verification.
Security and permissions 13/20
Evidence: Credentials (PROMETHEUS_PASSWORD, PROMETHEUS_TOKEN) are marked as secrets in the manifest; basic auth, bearer token, mTLS and custom headers are supported; default bind is 127.0.0.1; all exposed tools are read-only queries with no destructive actions; no install example embeds real tokens. Deductions: PROMETHEUS_USERNAME is not marked secret (low sensitivity); custom headers can carry credentials but are not flagged; no explicit data-boundary/tenant isolation documentation; there is no confirmation mechanism for dangerous operations, though none exist in the current toolset.
Maintenance 15/20
Evidence: MIT license, non-archived; recent server release 1.6.2 and Helm chart 1.1.1; active CI with Codecov; CONTRIBUTING.md present; 9 open issues. Deductions: no evidence of a security-response channel; issue response timeliness not evaluated; dependency update policy not explicitly documented; maintenance score is based only on repository-visible facts.
Documentation 14/20
Evidence: README provides layered quick-start examples for multiple clients, a configuration options table, tool/feature lists, Docker/Helm install instructions and development/testing guidance; variables cover auth, timeout, transport modes. Deductions: no full reference for tool parameters such as pagination/metadata filter defaults; troubleshooting and token/cost limits are thin; limitations of URL/auth combinations are not systematically disclosed.
Setup experience 14/20
Evidence: Step-by-step configuration examples for Claude Desktop, Claude Code, VS Code/Cursor/Windsurf, Docker Desktop, manual Docker and Helm; a prebuilt OCI image and Dockerfile make the install path clear; required environment variables are explicit. Deductions: installation was not executed in this static review; complete client config examples for SSE/HTTP modes are missing; potential confusion from Helm chart version (1.1.1) vs server version (1.6.2); setup steps are only doc-verifiable.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessUses the network

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.

Setup

Before you start

Runtime:Docker

PROMETHEUS_URL required Prometheus server URL (e.g., http://localhost:9090); required, points to your own Prometheus instance.
PROMETHEUS_PASSWORD optionalsecret Prometheus basic auth password, optional, secret; use your Prometheus credentials.
PROMETHEUS_TOKEN optionalsecret Prometheus Bearer token, optional, secret, from your auth system.
Other optional settings (14)
PROMETHEUS_URL_SSL_VERIFY optional Set to False to disable SSL verification, for self-signed certificates.
PROMETHEUS_DISABLE_LINKS optional Set to True to disable Prometheus UI links in query results and save context tokens.
PROMETHEUS_REQUEST_TIMEOUT optional Request timeout in seconds (default 30) to prevent hanging requests.
PROMETHEUS_USERNAME optional Prometheus basic auth username, optional.
PROMETHEUS_CLIENT_CERT optional Path to client certificate file for mutual TLS, optional.
PROMETHEUS_CLIENT_KEY optional Path to client private key file for mutual TLS, optional.
REQUESTS_CA_BUNDLE optional Path to CA bundle for verifying the server's TLS certificate (standard requests library variable).
ORG_ID optional Organization ID for multi-tenant Prometheus setups, optional.
PROMETHEUS_MCP_SERVER_TRANSPORT optional Transport mode: stdio, http, or sse; defaults to stdio.
PROMETHEUS_MCP_BIND_HOST optional Bind host for HTTP/SSE transport, default 127.0.0.1.
PROMETHEUS_MCP_BIND_PORT optional Bind port for HTTP/SSE transport, default 8080.
PROMETHEUS_MCP_STATELESS_HTTP optional Set to True to enable stateless HTTP mode for multi-replica support.
PROMETHEUS_CUSTOM_HEADERS optional Custom request headers supplied as a JSON string.
TOOL_PREFIX optional Prefix for all tool names (e.g., staging yields staging_execute_query), useful for multiple instances.
  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>"
      }
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

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

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add prometheus -e 'PROMETHEUS_URL=<your-prometheus-url>' -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:latest

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After startup, tools like execute_query and list_metrics should appear in your MCP client's tool list; calling health_check or running a simple PromQL query (e.g., up) and getting a result confirms the connection works.

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.

Things to try

Once connected, you can ask your AI assistant things like:

  • List all available metrics in my Prometheus server
  • Run a range query for CPU usage over the last hour with a 1-minute step
  • Get the metadata for the http_requests_total metric
  • Show the current scrape targets and their states

Tools 6

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

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 Desktop

Listed from the project's documentation, not tested by this site.

Overview

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.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision 4c9b37796adf Data synced 2026-10-12 Read the FMRS scoring method