METRICS / Prometheus
Prometheus MCP server
Prometheus project's MCP server. The default tool set includes config reload and process quit. TSDB delete tools error unless a dangerous flag is set.
“MCP server that registers Prometheus query, metadata, management, and TSDB admin tools. Default transport is stdio. HTTP mode serves Streamable HTTP at /mcp.”
01 / THE REASONING
Why this made the selection.
- registration.go registers the Prometheus tool set, and getToolset treats the default mcp.tools value all as that full set, which includes reload and quit.
- handlers.go returns an error for clean_tombstones, delete_series, and snapshot unless tsdb admin tools are enabled. ReloadHandler and QuitHandler post to the management API with no extra flag.
02 / THE REVIEW RECORD
What we actually inspected.
Source review has boundaries.
A clear record is more useful than a “safe” badge.
Material inspected
- cmd/prometheus-mcp/main.go
- pkg/mcp/registration.go
- pkg/mcp/handlers.go management and TSDB admin handlers
- LICENSE
- 2026-10-14 reread of retained pinned setup/configuration evidence for the specific operational details added in this batch.
- README.md
- pkg/mcp/tools.go
Our findings
- Admin delete, snapshot, and tombstone handlers check tsdbAdminToolsEnabled. Reload and quit do not.
- The default tool selector is the string all, which loads prometheusToolset.
- Additional README and tool definitions were opened. Query annotations declare ReadOnlyHint, but operational controls come from tool selection and backend permissions rather than annotations.
Not established by this review
- The server was not installed or connected to Prometheus.
- No query, reload, quit, or delete call was made.
- No authenticated session, installation, permission bypass or package-to-source parity test was performed.
The review applies to the material and revision named here. A newer upstream release can change its behavior.
03 / PUT IT TO WORK
Connect a server deliberately.
- Build the reviewed source or separately verify a release binary; replace the absolute executable path and intended Prometheus URL.
- Start with --mcp.tools=core and leave the dangerous TSDB-admin switch unset. Do not set --prometheus.backend on this restricted starter because its preset replaces the tool set.
- Use bounded query ranges and retain evaluation times; missing series are not automatically zero-valued measurements.
Before you start
- Go toolchain to build this commit
- A Prometheus base URL the process is allowed to call
Documented configuration example
Use the client and authentication context described in the setup guidance. Configuration formats vary between hosts.
{
"mcpServers": {
"prometheus": {
"command": "/absolute/path/prometheus-mcp-server",
"args": [
"--prometheus.url=http://127.0.0.1:9090",
"--mcp.tools=core"
]
}
}
} 04 / FOLLOW THE EVIDENCE
The source trail.
Our notes are separate from the original resource.
Check upstream before adopting a new version.
- Tool registration ↗Checked
https://github.com/prometheus/prometheus-mcp/blob/856fb45989013a0b020a900463884104ba0af11d/pkg/mcp/registration.go
Supports: Default all toolset, reload and quit registration, summary, install, configExample, access, limitations, bestFor, review, compatibility, transports
- Handlers ↗Checked
https://github.com/prometheus/prometheus-mcp/blob/856fb45989013a0b020a900463884104ba0af11d/pkg/mcp/handlers.go
Supports: TSDB admin gate, reload and quit posts
https://github.com/prometheus/prometheus-mcp/blob/856fb45989013a0b020a900463884104ba0af11d/cmd/prometheus-mcp/main.go
Supports: stdio default, /mcp, dangerous flag default, summary, install, configExample, access, limitations, bestFor, review, compatibility, transports
- Apache-2.0 licence ↗Checked
https://github.com/prometheus/prometheus-mcp/blob/856fb45989013a0b020a900463884104ba0af11d/LICENSE
Supports: Redistribution terms, Unfilled copyright appendix
https://github.com/prometheus/prometheus-mcp/blob/856fb45989013a0b020a900463884104ba0af11d/README.md
Supports: summary, install, configExample, access, limitations, bestFor, review, compatibility, transports
https://github.com/prometheus/prometheus-mcp/blob/856fb45989013a0b020a900463884104ba0af11d/pkg/mcp/tools.go
Supports: summary, install, configExample, access, limitations, bestFor, review, compatibility, transports