Prometheus Safe MCP
Provides read-only access to Prometheus instant queries, active alerts, and target health with bounded query lengths and response sizes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Prometheus Safe MCP Check the current CPU usage across all nodes."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Prometheus Safe MCP
A focused, read-only MCP server for bounded Prometheus instant queries, active alerts, and target health. Alpha: tests use synthetic HTTP responses; compatibility with a live Prometheus release is not certified.
Install and run
Requires Python 3.11+ and uv.
uv sync --extra test
export PROMETHEUS_SAFE_URL=https://prometheus.example.invalid
uv run prometheus-safe-mcpThe process speaks MCP over stdio. It does not load .env; .env.example is documentation only. Configure the URL of a read-only, network-restricted Prometheus endpoint.
Related MCP server: mcp-prometheus
Safety
All tools use HTTP GET. Query length, HTTP duration/bytes, and returned target count are bounded. Configuration rejects URL credentials, queries, fragments, and non-HTTP schemes. Audit records contain operation categories rather than PromQL text or response bodies. This does not replace upstream authentication, authorization, or egress policy. See security design.
Verify
uv run --extra test pytest
uv run python -m compileall -q src tests
uv buildMIT © 2026 Ben Gauger.
Available Tools
3 toolsactive_alertsD
Inputs: no named parameters. Returns: object
prometheus_queryD
Inputs: query (required). Returns: object
target_healthD
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a clearly distinct aspect of Prometheus: querying metrics, listing active alerts, and checking target health. There is no functional overlap between them, making tool selection unambiguous.
All three tool names follow a consistent snake_case convention with a noun-like pattern (prometheus_query, active_alerts, target_health). The names are predictable and reflect their purpose without mixing conventions.
Three tools is a lean but reasonable count for a minimal Prometheus integration, covering the most common read-only operations. It feels slightly thin for a full-featured server but is appropriate for a focused purpose.
The surface covers core operations (query, alerts, health) but lacks obvious complementary features like range queries, alert rule management, or metric metadata retrieval. Agents may need to work around these gaps for more complex workflows.
Related MCP Connectors
Query OneLens cloud-cost data in natural language: breakdowns, trends, cost centers. Read-only.
Query Churn Solution cancellation-flow metrics, revenue, and feedback analytics (read-only).
Query Honeycomb observability data: traces, events, metrics, SLOs, triggers, and boards.
Ask your AI assistant about your logs, traces, security events, robot runs and video. Read-only.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to execute PromQL queries and discover metrics across multiple Prometheus tenants using the Model Context Protocol. It supports single and multi-tenant configurations with secure authentication for instant and range query analysis.MIT
- AlicenseAqualityBmaintenanceEnables agents to query and explore Prometheus through PromQL, metric and label discovery, alerts, rules, scrape health, and cardinality, while keeping admin writes disabled unless explicitly enabled.1229 npmMIT
- AlicenseAqualityBmaintenanceGives AI clients read-only access to Prometheus, letting them discover metrics, run instant and range PromQL queries, and inspect scrape targets and firing alerts. Results are capped and downsampled with per-series min/max/avg/last summaries so answers stay token-efficient.6MIT
- AlicenseBqualityBmaintenanceEnables MCP clients to discover and investigate logs and metrics in the OpenObserve open source edition through read-only tools for stream inspection, SQL log searches, field-value lookups, context queries, and PromQL metric queries. It exposes no tools that modify data or configuration, relying on authenticated OpenObserve user permissions as the real authorization boundary.101MIT