Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A Prometheus Model Context Protocol Server.

README.md

Prometheus MCP Server

![codecov](https://codecov.io/gh/yshngg/prometheus-mcp-server)

A Go-based MCP server that exposes Prometheus query capabilities via the Model Context Protocol.

Installation

go install github.com/yshngg/prometheus-mcp-server@latest

Or pull the Docker image:

docker pull ghcr.io/yshngg/prometheus-mcp-server:latest

Usage

prometheus-mcp-server --prom-addr="http://localhost:9090"

Flags

| Flag | Default | Description | | ------------- | ----------------------- | ------------------------------------------------------- | | -prom-addr | http://localhost:9090 | Prometheus server URL | | -mcp-addr | localhost:8080 | MCP server listen address | | -transport | stdio | stdio or http | | -auth-token | ` | Bearer token for MCP endpoint authentication (optional) | | -version` | | Print version |

Environment Variables

All flags can be set via environment variables: PROM_ADDR, MCP_ADDR, TRANSPORT, AUTH_TOKEN.

MCP Client Configuration

Add the following config to your MCP client:

{
  "mcpServers": {
    "prometheus": {
      "command": "prometheus-mcp-server",
      "args": ["--prom-addr", "http://localhost:9090"]
    }
  }
}

[!NOTE] Install the binary via go install github.com/yshngg/prometheus-mcp-server@latest or pull the Docker image with docker pull ghcr.io/yshngg/prometheus-mcp-server:latest.

If you don't have the binary installed, use Docker:

{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "ghcr.io/yshngg/prometheus-mcp-server:latest",
        "--prom-addr",
        "http://host.docker.internal:9090"
      ]
    }
  }
}

Client-specific configuration

<details> <summary>Claude Desktop</summary>

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "prometheus": {
      "command": "prometheus-mcp-server",
      "args": ["--prom-addr", "http://localhost:9090"]
    }
  }
}

With Docker:

{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "ghcr.io/yshngg/prometheus-mcp-server:latest",
        "--prom-addr",
        "http://host.docker.internal:9090"
      ]
    }
  }
}

</details>

<details> <summary>OpenCode</summary>

Add to opencode.json (<a href="https://opencode.ai/docs/mcp-servers">guide</a>):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "prometheus": {
      "type": "local",
      "command": [
        "prometheus-mcp-server",
        "--prom-addr",
        "http://localhost:9090"
      ]
    }
  }
}

</details>

<details> <summary>HTTP Transport</summary>

Run the server with HTTP transport:

prometheus-mcp-server --transport=http --mcp-addr="localhost:8080"

Then configure your client to use http://localhost:8080/mcp.

For authenticated access, set AUTH_TOKEN:

AUTH_TOKEN=my-token prometheus-mcp-server --transport=http

Your client must then include Authorization: Bearer my-token in requests to /mcp.

</details>

Tools

Expression: instant_query, range_query

Metadata: find_series_by_labels, list_label_names, list_label_values, target_metadata_query, metric_metadata_query

Discovery: target_discovery, alert_query, rule_query, alertmanager_discovery

TSDB Admin: tsdb_snapshot, delete_series, clean_tombstones

Management: health_check, readiness_check, reload, quit

Resources

The server exposes Prometheus data as URI-addressable resources under the prom:/// scheme:

| URI | Description | | -------------------------- | ------------------------------------- | | prom:///config | Currently loaded configuration (YAML) | | prom:///flags | Command-line flag values | | prom:///runtime-info | Runtime information | | prom:///build-info | Build information | | prom:///tsdb-stats | TSDB cardinality statistics | | prom:///wal-replay-stats | WAL replay state |

Resource Templates

URI templates for dynamic data access:

| Template | Description | | ------------------------------------- | ----------------------------------- | | prom:///api/v1/query?query={promql} | Instant PromQL query result | | prom:///api/v1/label/{name}/values | Label values for a given label name |

Prompts

| Name | Arguments | Description | | ----------------------- | ------------------- | ------------------------------------------------- | | all-available-metrics | prefix (optional) | Lists all metric names in the Prometheus instance |

License

Apache License 2.0

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Observability servers.