prometheus
prometheus-mcp-server is an MCP server that exposes summarized service health signals derived from Prometheus metrics for LLM-based analysis.
claude mcp add --transport stdio polyglot-k-prometheus-mcp-server c:\경로\prometheus-mcp.exe \ --env PROMETHEUS_URL="http://localhost:9090"
How to use
This MCP server enables AI models like Claude or Gemini to connect to a Prometheus instance, query metrics, and inspect available metrics and related metadata. Core capabilities include health checks to verify connectivity to Prometheus, instantaneous and range PromQL queries, and administrative views for active targets, alerts, and configuration. After starting the server, you can use the MCP client tools to send PromQL queries, browse metrics, and perform basic administration tasks through the exposed MCP endpoints. The Docker and local executable options let you run the server in your preferred environment while pointing it at your Prometheus instance via the PROMETHEUS_URL setting.
How to install
Prerequisites:
- Go 1.23+ for local builds
- Docker for containerized runs
- An accessible Prometheus instance to connect to
- Install (local build)
- Ensure Go is installed and in your PATH
- Build the MCP server: make build This will generate prometheus-mcp.exe on Windows (or the corresponding binary on other platforms).
- Create the MCP configuration file (mcp_config.json) with the appropriate PROMETHEUS_URL and path to the binary, for example: { "mcpServers": { "prometheus-mcp": { "command": "c:\경로\prometheus-mcp.exe", "args": [], "env": { "PROMETHEUS_URL": "http://localhost:9090" } } } }
- Install (Docker)
- Pull and run the Docker image with the proper environment variable for Prometheus: mcp_config.json: { "mcpServers": { "prometheus-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "PROMETHEUS_URL=http://host.docker.internal:9090", "ghcr.io/polyglot-k/prometheus-mcp-server:latest" ] } } }
- Run
- For local build: run the generated executable with the mcp_config.json loaded by your MCP launcher
- For Docker: ensure Docker is running and your mcp_config.json references the docker-based command above
Additional notes
Tips and known considerations:
- The PROMETHEUS_URL environment variable must point to your Prometheus server (e.g., http://localhost:9090). In Docker, host.docker.internal is used to reach the host Prometheus from within the container.
- If you host Prometheus on a remote or non-default port, update PROMETHEUS_URL accordingly.
- The documentation links in the project provide deeper guidance on query usage, admin functions, and client-specific settings (Claude Desktop, VSCode, etc.).
- For Windows builds, ensure the path in mcp_config.json uses proper escaping for backslashes.
- If you see connectivity errors, verify Prometheus is reachable from the MCP host and that the Prometheus API is exposed.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go