Get the FREE Ultimate OpenClaw Setup Guide →

prometheus

A Prometheus Model Context Protocol Server.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yshngg-prometheus-mcp-server docker run -i ghcr.io/yshngg/prometheus-mcp-server:latest

How to use

The Prometheus MCP Server provides a Go-based bridge that exposes the Prometheus HTTP API through MCP-compatible clients. It supports multiple transport methods (stdio, HTTP, and SSE) so you can interact with your Prometheus instance using natural language prompts and the MCP protocol. Core capabilities include instant queries, range queries, metadata and discovery endpoints, and management capabilities for targets, rules, and TSDB operations. This enables seamless conversational control over Prometheus observability tasks, along with full API compatibility with Prometheus v1 endpoints. To use it, run the server with your Prometheus URL and choose the desired transport. For example, run with the default stdio transport for desktop MCP clients, or use HTTP transport to expose an MCP endpoint for web-based integrations. Once running, you can issue natural language prompts that map to Prometheus API calls (e.g., asking for current CPU usage, querying a range of mem metrics, or listing available label values).

How to install

Prerequisites:

  • Docker (recommended) or a local Go toolchain if building from source
  • Access to a Prometheus server (v2.x) that your MCP client will query

Using Docker (recommended):

  1. Install Docker on your system.
  2. Pull and run the official image:
docker pull ghcr.io/yshngg/prometheus-mcp-server:latest
  1. Run with stdio transport (ideal for desktop MCP clients):
docker run --rm ghcr.io/yshngg/prometheus-mcp-server:latest --prom-addr="http://host.docker.internal:9090"
  1. Run with HTTP transport for web-based integrations (expose MCP port):
docker run --rm -p 8080:8080 ghcr.io/yshngg/prometheus-mcp-server:latest --prom-addr="http://host.docker.internal:9090" --transport=http --mcp-addr="0.0.0.0:8080"

From source (Go build):

  1. Install Go 1.23+ and set up your GOPATH if needed.
  2. Clone the repository and build:
git clone https://github.com/yshngg/prometheus-mcp-server.git
cd prometheus-mcp-server
make build
  1. Run the binary directly (example):
./prometheus-mcp-server --prom-addr="http://localhost:9090"

Additional notes

Tips and common considerations:

  • The MCP server is fully compatible with Prometheus v1 HTTP API endpoints, so any MCP client can map queries to Prometheus endpoints as described in the API Compatibility section.
  • Transport selection determines how MCP clients connect: stdio for desktop workflows, HTTP for web-based or remote clients, and SSE for streaming scenarios (note: SSE is deprecated in favor of HTTP in newer workflows).
  • When running via Docker, you may need to adjust the --prom-addr value to point to your Prometheus instance from inside the container (e.g., use host.docker.internal on Docker Desktop or a reachable Prometheus host inside your network).
  • Ensure the Prometheus URL is reachable from the MCP server process; if Prometheus is behind a firewall or in a different network, configure network routing accordingly.
  • For production deployments, consider using the Docker image with a persistent MCP address binding and secure transport (HTTPS) if exposing the MCP endpoint publicly.

Related MCP Servers

Sponsor this space

Reach thousands of developers