Is the Prometheus MCP server safe? What it can reach
What the Prometheus MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.
The Prometheus project hosts an official MCP server, prometheus/prometheus-mcp, a Go binary that runs over stdio or HTTP and reads from your Prometheus API. Most tools only query. quit, reload and three TSDB admin tools can stop, reconfigure or delete data, and the admin three stay off unless you pass a dangerous flag.
Who maintains it
| Implementation | Kind | Status |
|---|---|---|
| prometheus/prometheus-mcp (official, Prometheus GitHub organization) | Official | active |
| pab1it0/prometheus-mcp-server (community, Python, query and discovery tools only) | Community | active |
It runs as a local process on your machine.
How it signs in
No sign-in of its own. It reaches Prometheus with the credentials from an HTTP config file (basic auth, bearer token or TLS), and over the HTTP transport it forwards an incoming Authorization header to Prometheus as is.
What its tools can do
| Kind | Tools |
|---|---|
| Read | alertmanagers, build_info, config, docs_list, docs_read, docs_search, exemplar_query, flags, healthy, label_names, label_values, list_alerts, list_rules, list_targets, metric_metadata, query, range_query, ready, runbooks_list, runbooks_read, runtime_info, series, targets_metadata, tsdb_stats, wal_replay_status |
| Write | none documented |
| Can’t be undone | quit, reload, clean_tombstones, delete_series, snapshot |
clean_tombstones, delete_series and snapshot load only when the server starts with --dangerous.enable-tsdb-admin-tools. The Thanos backend option removes several tools. The community pab1it0 server has only health_check, execute_query, execute_range_query, list_metrics, get_metric_metadata and get_targets.
Built-in limits
| Option | What it does |
|---|---|
--mcp.tools | An allowlist of tools to load. A small core set (docs, runbooks, query, range_query, metric_metadata, label and series tools) always loads. |
--dangerous.enable-tsdb-admin-tools | Off by default. Leave it off to keep clean_tombstones, delete_series and snapshot unavailable. |
--http.config | A Prometheus HTTP config file for basic auth, bearer token or TLS toward Prometheus. The server exits if the file is invalid. |
--web.config.file | A web config file that puts basic auth or TLS on the server’s own endpoints. |
--no-web.listen | Turns off the web listener on stdio. |
The risks
- quit asks Prometheus to shut down and reload re-reads its configuration and rules, so an injected instruction can take monitoring offline or apply a changed config.
- With the TSDB admin flag on, delete_series removes metric data for a time range and cannot be undone.
- Over HTTP, anyone who can reach the endpoint queries Prometheus with the server’s default credentials, and the README says a client Authorization header is forwarded as is without validation.
- config, flags, list_targets and label tools return internal hostnames, targets and labels to the model, and query results go to whichever model provider you use.
- The README’s Docker and Helm examples still use the older tjhop image paths and variable names, so copied snippets can point at the wrong image.
Limit it in Claude Code
Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:
claude mcp add --env PROMETHEUS_MCP_PROMETHEUS_URL=... prometheus -- prometheus-mcpClaude Code names MCP tools mcp__prometheus__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:
{
"permissions": {
"deny": [
"mcp__prometheus__quit",
"mcp__prometheus__reload",
"mcp__prometheus__delete_series",
"mcp__prometheus__clean_tombstones",
"mcp__prometheus__snapshot"
]
}
}Limit it in Codex
Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:
[mcp_servers.prometheus]
command = "prometheus-mcp"
env_vars = ["PROMETHEUS_MCP_PROMETHEUS_URL"]
disabled_tools = ["quit", "reload", "delete_series", "clean_tombstones", "snapshot"]Checklist
- Use --mcp.tools to load only the query and discovery tools you need.
- Leave --dangerous.enable-tsdb-admin-tools off.
- Bind the HTTP transport to loopback or protect it with --web.config.file.
- Give the server a Prometheus credential that can only read.
Checked against the vendor documentation on November 25, 2026. prometheus/prometheus-mcp README · pab1it0/prometheus-mcp-server README
What Excellent covers
Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing