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?

prometheus-mcp-server !Prometheus MCP Server A Model Context Protocol (MCP) server for interacting with Prometheus metrics and

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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

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`.