Prometheus MCP Server

# prometheus-mcp-server ![Prometheus MCP Server](images/prometheus-mcp-server.jpg) A Model Context Protocol (MCP) server for interacting with

Local serverstdioTypeScript

What is the Prometheus MCP server?

If you already use Prometheus, the prometheus mcp server is the piece that lets your assistant work with it directly. # prometheus-mcp-server Prometheus MCP Server A Model Context Protocol (MCP) server for interacting with Prometheus metrics and data. This is a TypeScript-based MCP server that implements a Prometheus.

What the server does

  • Instant Queries — Execute PromQL queries at a specific time
  • Range Queries — Execute PromQL queries over a time period
  • Series Discovery — Find series by label matchers
  • Label Exploration — Get label names and values
  • Metadata Access — Get metadata for metrics
  • Target Information — Get information about scrape targets

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • mcp__instant_query — Execute an instant PromQL query
  • mcp__range_query — Execute a range PromQL query over a time period
  • mcp__get_series — Find series by label matchers
  • mcp__get_label_values — Get values for a specific label
  • mcp__get_metadata — Get metadata for metrics
  • mcp__get_targets — Get information about scrape targets
  • mcp__get_alerts — Get information about alerts
  • mcp__get_rules — Get information about recording and alerting rules
  • mcp__get_status — Get status information about the Prometheus server

Credentials and setup notes

Configuration is passed through the environment: PROMETHEUS_BASE_URL. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Installation

Installation goes through your MCP client rather than a global install: point it at prometheus-mcp-server on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Where it fits

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 — mcp__instant_query, mcp__range_query, mcp__get_series and 6 more — is a fair guide to whether it matches your workflow. It is maintained by weetime; 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.

Worth knowing first

  • 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.
  • With 9 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Prometheus.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
mcp__instant_queryExecute an instant PromQL query
mcp__range_queryExecute a range PromQL query over a time period
mcp__get_seriesFind series by label matchers
mcp__get_label_valuesGet values for a specific label
mcp__get_metadataGet metadata for metrics
mcp__get_targetsGet information about scrape targets
mcp__get_alertsGet information about alerts
mcp__get_rulesGet information about recording and alerting rules
mcp__get_statusGet status information about the Prometheus server

How to install the Prometheus MCP server

{
  "mcpServers": {
    "prometheus-mcp-server-weetime": {
      "command": "npx",
      "args": ["-y", "prometheus-mcp-server"],
      "env": {
        "PROMETHEUS_BASE_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
PROMETHEUS_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Prometheus to mcp instant query.
  • Use Prometheus to mcp range query.
  • Use Prometheus to mcp get series.

Frequently asked questions

Set the `PROMETHEUS_BASE_URL` environment variable to the desired Prometheus HTTP endpoint. The default is `http://localhost:9090`.