A model writing PromQL from memory gets the function names close and the semantics wrong. Embedding the official documentation and a set of guided workflows in the same server means it can look up the syntax and follow a known investigation path before querying. The destructive TSDB endpoints stay off unless you pass a flag whose name tells you exactly what you are agreeing to.
A Go server over the Prometheus HTTP API that returns the API's own JSON to the model. Alongside the API it embeds a pinned snapshot of the official Prometheus documentation and a set of guided runbooks for common tasks.
- Instant and range queries, exemplar queries, series lookup by matcher, label names and values, and metric metadata
- Target and alertmanager discovery, active alerts, and the alerting and recording rules currently loaded
- Server introspection: configuration, runtime flags, build and runtime info, health and readiness, TSDB cardinality statistics and WAL replay status
- The official Prometheus documentation listed, read and searched from inside the server
- Runbooks for system health checks, missing-data triage, error-rate investigation, high-cardinality work and rule review - offered as tools, as skill resources, and as MCP prompts
- Management endpoints for reload and shutdown, and the destructive TSDB admin tools behind an explicit dangerous flag
- An optional token-oriented output format and a response truncation limit for keeping replies small
A reachable Prometheus, given with the URL flag or its environment variable; the default points at localhost on port 9090. Run a release binary, the container image, a system package with its bundled systemd unit, or the Helm chart on Kubernetes. Transport is stdio by default or streamable HTTP on the listen address, which defaults to port 8080 and also serves health endpoints and the server's own metrics. Secured Prometheus instances are reached with a Prometheus HTTP config file; the MCP endpoint itself can be put behind basic auth or TLS with a web config file.
One command — docker run --rm -i ghcr.io/tjhop/prometheus-mcp-server:latest --prometheus.url "https://$yourPrometheus:9090"
