Server facts
prometheus-mcp-server
GitHub stars
526
Last commit
Nov 14, 2026
Runtime
python
License
MIT
Project
- Author
- pab1it0
- Repository
- github.com/pab1it0/prometheus-mcp-server
- License
- MIT
- Category
- Cloud & DevOps
Tech
- Runtime
- python
- Transports
- stdiostreamable-httpsse
- Remote access
- No
- Authentication
- Optional Basic Auth, Bearer token, mTLS certs, and ORG_ID via env vars
Activity
- GitHub stars
- 526
- Last commit
- Data as of
Tags
- Devops
- ai
- llm
- mcp
- prometheus
Overview
Site reliability engineers looking for `prometheus mcp` deployment options get broad operational flexibility from `pab1it0/prometheus-mcp-server`, a community-maintained MIT-licensed Python server. Rather than forcing a manual local virtualenv, it ships prebuilt containers at `ghcr.io/pab1it0/prometheus-mcp-server:latest`, Docker Desktop MCP Catalog/Toolkit integration, and an OCI Helm chart (`oci://ghcr.io/pab1it0/charts/prometheus-mcp-server`) for Kubernetes clusters. Developers wire it into Claude Desktop, Claude Code (`claude mcp add prometheus`), VS Code, Cursor, or Windsurf by setting `PROMETHEUS_URL`, defaulting to `stdio` while supporting `http` and `sse` via `PROMETHEUS_MCP_SERVER_TRANSPORT` (with `PROMETHEUS_MCP_STATELESS_HTTP` for multi-replica pods).
Across incident triage and observability workflows, the server registers configurable tools covering instant PromQL (`execute_query`), time-windowed series (`execute_range_query`), paginated metric discovery (`list_metrics`), metadata search (`get_metric_metadata`), filtered scrape target checks (`get_targets`), and container liveness (`health_check`). Enterprise clusters can authenticate with `PROMETHEUS_USERNAME`/`PROMETHEUS_PASSWORD`, `PROMETHEUS_TOKEN`, mutual TLS (`PROMETHEUS_CLIENT_CERT`, `PROMETHEUS_CLIENT_KEY`, `REQUESTS_CA_BUNDLE`), custom JSON headers, and multi-tenant `ORG_ID`. Operators running parallel environments in Cursor can isolate tools using `TOOL_PREFIX`, while `PROMETHEUS_DISABLE_LINKS` and `PROMETHEUS_REQUEST_TIMEOUT` (default 30 seconds) keep responses compact and bounded.
Install & configure
Requirements
- Reachable Prometheus server URL (`PROMETHEUS_URL`)
- Docker (for `ghcr.io/pab1it0/prometheus-mcp-server:latest`), Helm (for Kubernetes), or Python with `uv` for source development
- Optional authentication credentials (`PROMETHEUS_USERNAME`/`PROMETHEUS_PASSWORD`, `PROMETHEUS_TOKEN`, or mTLS cert/key files)
claude mcp add prometheus --env PROMETHEUS_URL=http://your-prometheus:9090 -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:latestRun over `stdio` with Docker (`docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:latest`) or deploy in Kubernetes via `helm install prometheus-mcp-server oci://ghcr.io/pab1it0/charts/prometheus-mcp-server --version 1.1.1`. Switch to HTTP/SSE with `PROMETHEUS_MCP_SERVER_TRANSPORT`.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:latest"
],
"env": {
"PROMETHEUS_URL": "<your-prometheus-url>"
}
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:latest"
],
"env": {
"PROMETHEUS_URL": "<your-prometheus-url>"
}
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"prometheus": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:latest"
],
"env": {
"PROMETHEUS_URL": "<your-prometheus-url>"
}
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:latest"
],
"env": {
"PROMETHEUS_URL": "<your-prometheus-url>"
}
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"prometheus": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:latest"
],
"env": {
"PROMETHEUS_URL": "<your-prometheus-url>"
}
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| health_check | Verify server status and health for container monitoring. |
| execute_query | Run a PromQL instant query against the configured Prometheus instance. |
| execute_range_query | Run a PromQL range query over start time, end time, and step interval. |
| list_metrics | Enumerate available Prometheus metrics with pagination and filtering. |
| get_metric_metadata | Retrieve metadata for a specific metric or search bulk metric metadata with filters. |
| get_targets | Inspect Prometheus scrape targets with server-side `state` and `scrape_pool` filtering plus pagination. |
Use cases
- Debug production latency spikes in Claude Code or Cursor by executing instant and range PromQL queries against live metrics.
- Audit broken scrape targets by filtering `get_targets` on `state` and `scrape_pool` during on-call triage.
- Connect separate staging and production Prometheus instances in Cursor simultaneously using distinct `TOOL_PREFIX` namespaces.
- Deploy a shared stateless HTTP MCP service inside Kubernetes using the OCI Helm chart and `PROMETHEUS_MCP_STATELESS_HTTP`.
Strengths
- First-class packaging across GHCR Docker images, Docker Desktop MCP Toolkit, and a versioned Kubernetes OCI Helm chart.
- Comprehensive enterprise auth covering Basic Auth, Bearer tokens, mutual TLS client certificates, custom CA bundles, custom headers, and `ORG_ID`.
- Configurable tool exposure plus `TOOL_PREFIX` and `PROMETHEUS_DISABLE_LINKS` help minimize context-window overhead.
- Supports `stdio`, `http` (including stateless multi-replica mode), and `sse` transports with a configurable request timeout (default 30s).
Limitations
- Community-maintained repository (`pab1it0`) rather than an official Prometheus project release.
- Local container setup requires Docker to be installed and able to reach your Prometheus network endpoint.
- HTTP transport binds `127.0.0.1:8080` by default and expects cluster/network controls when exposed remotely.
prometheus-mcp-server setup notes
- Check PROMETHEUS_URL in the prometheus-mcp-server configuration if startup or authentication fails.
- prometheus-mcp-server's example uses stdio, while its catalog transports are stdio / streamable-http / sse; use the example's connection type.