# Prometheus MCP server

> Enables AI agents to run PromQL queries, explain firing alerts, and discover metric series from a Prometheus instance.

- Repository: https://github.com/aniketatgithub/prom-mcp
- Page: https://hostedmcp.org/servers/aniketatgithub/prom-mcp
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.2.0

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `PROM_TOKEN` | no | yes | Bearer token for an auth-protected Prometheus. Leave empty if not needed. |
| `PROM_TOKEN` | no | yes | Bearer token for an auth-protected Prometheus. Leave empty if not needed. |
| `PROM_TOKEN` | no | yes | Bearer token for an auth-protected Prometheus. Leave empty if not needed. |
| `PROM_TOKEN` | no | yes | Bearer token for an auth-protected Prometheus. Leave empty if not needed. |
| `PROM_TIMEOUT` | no | no | Timeout for Prometheus requests, e.g. 15s or 30s. |
| `PROM_TIMEOUT` | no | no | Timeout for Prometheus requests, e.g. 15s or 30s. |
| `PROM_TIMEOUT` | no | no | Timeout for Prometheus requests, e.g. 15s or 30s. |
| `PROM_TIMEOUT` | no | no | Timeout for Prometheus requests, e.g. 15s or 30s. |
| `PROM_URL` | no | no | Base URL of your Prometheus server. |
| `PROM_URL` | no | no | Base URL of your Prometheus server. |
| `PROM_URL` | no | no | Base URL of your Prometheus server. |
| `PROM_URL` | no | no | Base URL of your Prometheus server. |

## Tools (5)

- `prom_query`: Run an instant PromQL query against Prometheus and return the series and values.
- `prom_alerts_explain`: List active Prometheus alerts joined with their rule expressions and annotations, explained for triage.
- `prom_query_range`: Run a range PromQL query over the last N minutes and summarize each series (points, first, last, min, max).
- `prom_label_values`: List the values of one label, optionally scoped by a series matcher. Use to learn real job/instance names before querying.
- `prom_series_discover`: Discover which series exist for a label matcher, e.g. up{job="node"}, before writing queries against them.

## FAQ

### Can an AI agent explain why a Prometheus alert is firing?

Yes, the prom_alerts_explain tool joins active alerts with the rule that fired them, including the expression, summary, and description.

### Which AI clients work with prom-mcp?

It works with any MCP client, including Claude Code, Cursor, Windsurf, Zed, and custom agents.

### Does prom-mcp need any API keys or cloud services?

No, it is a single local binary that communicates directly with your Prometheus instance.

### How do I connect to a remote or auth-protected Prometheus?

You can connect by setting the PROM_URL and PROM_TOKEN environment variables or using a JSON configuration file.
