pab1it0/prometheus-mcp-server
A Model Context Protocol (MCP) server that enables AI agents and LLMs to query and analyze Prometheus metrics through standardized interfaces.
511 ★99 forksPythonUpdated 1d ago
What you need to know
A Python MCP server (MIT) that gives AI assistants access to a Prometheus server - executing PromQL instant and range queries, listing metrics, fetching metadata, and inspecting scrape targets through standardized MCP tools.
Install
Docker: docker run -i --rm -e PROMETHEUS_URL="http://your-prometheus:9090" ghcr.io/pab1it0/prometheus-mcp-server:latest Claude Code: claude mcp add prometheus --env PROMETHEUS_URL=http://your-prometheus:9090 -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:latest Helm: helm install prometheus-mcp-server oci://ghcr.io/pab1it0/charts/prometheus-mcp-server --version 1.1.1 --set prometheus.url="http://prometheus:9090" Also installable via Docker Desktop MCP Catalog/MCP Toolkit
Usage
- •Set PROMETHEUS_URL (required); optional auth via PROMETHEUS_USERNAME/PASSWORD, PROMETHEUS_TOKEN, or client certs (PROMETHEUS_CLIENT_CERT/KEY)
- •Configure transport via PROMETHEUS_MCP_SERVER_TRANSPORT (stdio default, or http/sse; bind host/port and stateless HTTP for multi-replica)
- •Use TOOL_PREFIX to run multiple instances against different environments (e.g. staging_execute_query)
- •Tools are configurable - you can disable tools you don't use to save context window
Key features
- ✓Tools: health_check, execute_query (PromQL instant), execute_range_query (range with start/end/step), list_metrics (pagination/filtering), get_metric_metadata, get_targets (server-side state/scrape_pool filtering)
- ✓Authentication: basic auth, bearer token, and mutual TLS
- ✓Docker containerization plus an official Helm chart for Kubernetes
- ✓Configurable tool list; PROMETHEUS_DISABLE_LINKS to save context tokens; request timeout default 30s (DDoS protection)
Best for
Letting AI coding assistants query and analyze Prometheus metrics directly from the chat/editor.
Caveats
- ⚠Requires a Prometheus server reachable from the environment
- ⚠Docker/Helm-first distribution; Python 3.10+ if running from source
- ⚠HTTP/SSE transport is opt-in via PROMETHEUS_MCP_SERVER_TRANSPORT; default is stdio
Platforms: Cross-platform (Docker) · Kubernetes (Helm)Clients: Claude Desktop · Claude Code · VS Code · Cursor · Windsurf · Docker Desktop
Documentation ↗Reviewed 2026-08-07
Topics
- Stars
- 511★
- Forks
- 99
- Language
- Python
- License
- MIT
- Created
- 2025-03-19
- Last push
- 2026-08-05