Prometheus MCP Server

The official Prometheus MCP server: PromQL queries, metrics, rules and alerts plus built-in runbooks for troubleshooting.

  • 135 ★ on the repository
  • Last commit
MCP serverOfficial

Extended access

Why this level

  • `quit` and `reload` can stop Prometheus or reload its configuration.
  • With the TSDB admin flag the agent can delete series and take data snapshots.
All reasons and checks

prometheus/prometheus-mcp

Install

Manual install

PROMETHEUS_MCP_PROMETHEUS_URL="https://$yourPrometheus:9090" /path/to/prometheus-mcp

Take the binary from the Releases page; the README also covers Docker, Helm and systemd.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • `quit` and `reload` can stop Prometheus or reload its configuration.
  • With the TSDB admin flag the agent can delete series and take data snapshots.

This is third-party code. Review the repository files before installing.

What it does

The official Prometheus project MCP server connects an agent to a running Prometheus instance through its HTTP API. The agent runs instant and range PromQL queries, lists metrics, labels and series, and reads configuration, flags, scrape targets, rules and active alerts. Beyond the API, the server serves the official Prometheus documentation and seven built-in runbooks packaged as Agent Skills: health checks, top resource consumers, error-rate analysis, high-cardinality optimization, rule review, missing-data triage and configuration tuning. Responses can be compressed with TOON or truncated. Transport is stdio or HTTP, and Thanos has its own toolset.

Who it is for. SRE engineers and Prometheus owners who analyze metrics and alerts through an agent instead of typing PromQL by hand.

Good fit when

  • Metric queries are slow and the agent hunts for high-cardinality metrics.
  • The error rate grew after a release and you need the service behind it.
  • The agent drafts SLO recording rules from the real metrics of a server.
  • Scrape targets vanished from the list and the cause is traced through configuration and target status.

Not a fit when

  • Metrics live in a system without a Prometheus-compatible API.
  • The agent must not reach Prometheus management endpoints.
  • Responses with many series would not fit in context and truncation is not configured.

Example request

Check Prometheus health: show scrape targets with errors, active alerts and the ten metrics with the highest cardinality.

MCP

Transport
stdio, http
Authentication
not required

Environment variables

PROMETHEUS_MCP_PROMETHEUS_URL required
Prometheus server URL.

Limitations

The management tools `quit` and `reload` are registered by default and work when the management API is enabled on Prometheus itself. Trim the set with `--mcp.tools`. TSDB admin tools (`delete_series`, `clean_tombstones`, `snapshot`) are off and need `--dangerous.enable-tsdb-admin-tools`. An unprotected HTTP transport lets anyone who reaches `/mcp` query Prometheus, and the `Authorization` header is forwarded without validation. Compatible systems such as Thanos lack some endpoints and those tools return 404.

How to disable. Remove the server entry from the client settings and stop the `prometheus-mcp` process or container. Nothing remains on Prometheus itself.

FAQ

Which tools run queries?

`query` and `range_query` are enough. Discovery uses `metric_metadata`, `label_names`, `label_values` and `series`, which are always loaded.

How do I cut token usage?

Enable response truncation and the TOON format. The README does not promise a saving because it depends on the data shape, so compare both formats on your own queries.

How do I connect a protected Prometheus?

Pass a Prometheus HTTP config file with `--http.config`. If the file is unreadable or invalid, the server exits at startup instead of running unauthenticated.

What is a runbook here?

Built-in guides in Agent Skills format for common tasks such as health checks, error analysis and cardinality. Read them with `runbooks_list` and `runbooks_read` or as prompts.

Does it work with Thanos?

Yes, `--prometheus.backend` selects the Thanos set. Incompatible tools such as `config` and `reload` are removed and `list_stores` is added.

Discussion

No questions or reviews yet.

An MCP server for Prometheus: the agent runs PromQL queries, discovers metrics and checks scrape targets

MCP serverExtended access522Repository stars

Grafana MCP Server

Grafana MCP server

Official

Grafana's official MCP server: dashboards, Prometheus and Loki queries, alerts and incidents straight from the agent

MCP serverBroad access3.6KRepository stars
Official

The official Nightingale MCP server: an agent reads alerts and metrics and manages alert rules and dashboards of the monitoring system

MCP serverBroad access42Repository stars
Official

Datadog's official managed MCP server: logs, metrics, traces and incidents right in your agent

MCP serverExtended access47Repository stars

The MCP server exposes Zabbix API calls, documentation and method discovery with read-only and method-filter controls.

MCP serverBroad access260Repository stars

Independent Datadog MCP server: an agent reads incidents, monitors, logs, metrics, traces and RUM and schedules downtimes.

MCP serverExtended access143Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Prometheus MCP Server (this card)yesnot required135
Prometheus MCP Servernonot required522a community server for reading metrics; this is the official project release with runbooks, docs and a Thanos mode
Grafana MCP ServeryesAPI key3,644works through Grafana and its data sources; Prometheus MCP calls the Prometheus HTTP API directly

README in short

The server returns the HTTP API JSON as is and can compress it into TOON. Prometheus documentation and guides are embedded and read through the server.

README badge

Report a problem

Foxx AIPrometheus MCP Server
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.