Prometheus MCP Server

MCP server for LLMs to interact with Prometheus

Local serverstdio

What is the Prometheus MCP server?

Prometheus MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MCP server for LLMs to interact with Prometheus.

What you get

The prompt used was: > querying my metrics is slow, can you help me figure out why?

What the assistant can call

Once Prometheus is connected, these are the calls the assistant has available:

  • Tools — The Prometheus HTTP API outputs JSON data, and the tools in this MCP server return that JSON to the LLM for processing as it's structured and well
  • Resources — The Resources tool exposed by this server
  • Binary — The Binary tool exposed by this server
  • Metrics — Once running, the server exposes Prometheus metrics on the configured listen address and telemetry path (:8080/metrics, by default). Please see

Setting it up

ghcr.io/tjhop/prometheus-mcp-server on a container image is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration and credentials

You will need one environment variable: PROMETHEUS_MCP_SERVER_PROMETHEUS_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Choosing this one

Among the monitoring and observability options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Prometheus's toolset — Tools, Resources, Binary and 1 more — is a fair guide to whether it matches your workflow. It is maintained by tjhop; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the prometheus mcp server does with a few real requests.

Available tools

ToolWhat it does
ToolsThe Prometheus HTTP API outputs JSON data, and the tools in this MCP server return that JSON to the LLM for processing as it's structured and well understood by LLMs.
ResourcesThe Resources tool exposed by this server.
BinaryThe Binary tool exposed by this server.
MetricsOnce running, the server exposes Prometheus metrics on the configured listen address and telemetry path (:8080/metrics, by default). Please see [Flags](#command-line-flags) for more information on how to change the liste

How to install the Prometheus MCP server

{
  "mcpServers": {
    "prometheus-mcp-server-tjhop": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "ghcr.io/tjhop/prometheus-mcp-server"],
      "env": {
        "PROMETHEUS_MCP_SERVER_PROMETHEUS_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
PROMETHEUS_MCP_SERVER_PROMETHEUS_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Prometheus to Tools.
  • Use Prometheus to Resources.
  • Use Prometheus to Binary.

Frequently asked questions

The server works with any service offering a Prometheus compatible API. Specific backends like Thanos can be selected via `--prometheus.backend`, which may add or remove tools (e.g., Thanos removes `config` and adds `list_stores`).