Prometheus MCP Server
v1.6.2MCP server providing Prometheus metrics access and PromQL query execution for AI assistants
Values you need
| Variable | What it is | |
|---|---|---|
PROMETHEUS_URL | required | Prometheus server URL (e.g., http://localhost:9090) |
PROMETHEUS_URL_SSL_VERIFY | optional | Set to False to disable SSL verification |
PROMETHEUS_DISABLE_LINKS | optional | Set to True to disable Prometheus UI links in query results (saves context tokens in MCP clients) |
PROMETHEUS_USERNAME | optional | Username for Prometheus basic authentication |
PROMETHEUS_PASSWORD | optional secret | Password for Prometheus basic authentication |
PROMETHEUS_TOKEN | optional secret | Bearer token for Prometheus authentication |
ORG_ID | optional | Organization ID for multi-tenant Prometheus setups |
PROMETHEUS_CLIENT_CERT | optional | Path to client certificate file for mutual TLS authentication |
PROMETHEUS_CLIENT_KEY | optional | Path to client private key file for mutual TLS authentication |
PROMETHEUS_MCP_SERVER_TRANSPORT | optional | MCP server transport type (stdio, http, or sse) |
PROMETHEUS_MCP_BIND_HOST | optional | Host address for HTTP/SSE transport (default: 127.0.0.1) |
PROMETHEUS_MCP_BIND_PORT | optional | Port number for HTTP/SSE transport (default: 8080) |
PROMETHEUS_MCP_STATELESS_HTTP | optional | Enable stateless HTTP mode for multi-replica support (default: false) |
PROMETHEUS_CUSTOM_HEADERS | optional | Custom headers as JSON string to include in Prometheus requests |
Docker verified
Requires Docker
Run in a terminal
claude mcp add prometheus-mcp-server -e 'PROMETHEUS_URL=<PROMETHEUS_URL>' -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:1.6.2Add to
claude_desktop_config.json{
"mcpServers": {
"prometheus-mcp-server": {
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"
],
"command": "docker",
"env": {
"PROMETHEUS_URL": "<PROMETHEUS_URL>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"prometheus-mcp-server": {
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"
],
"command": "docker",
"env": {
"PROMETHEUS_URL": "<PROMETHEUS_URL>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "PROMETHEUS_URL",
"id": "prometheus-url",
"password": true,
"type": "promptString"
}
],
"servers": {
"prometheus-mcp-server": {
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"
],
"command": "docker",
"env": {
"PROMETHEUS_URL": "${input:prometheus-url}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.prometheus-mcp-server]
command = "docker"
args = ["run", "-i", "--rm", "-e", "PROMETHEUS_URL", "ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"]
env = { "PROMETHEUS_URL" = "<PROMETHEUS_URL>" }For AI agents
- Ask the user for: PROMETHEUS_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: health_check, execute_query, execute_range_query, list_metrics, get_metric_metadata, get_targets.
- If it fails, check that the required runtime is installed (Docker) and that the values above are set.
Machine-readable: install.md · manifest.json