MCP server
Prometheus MCP Server
- Maintainer
- Community
- Runs
- Local (stdio)
- GitHub
- ★ 519, last push 2026-10-19 (checked 2026-10-24)
- License
- MIT
- Registry
- io.github.pab1it0/prometheus-mcp-server
- Connects to
- Prometheus
Install the Prometheus MCP Server
Pick your client. Each tab starts the same local command. Config shapes checked against each client's docs on 2026-10-25.
Needs PROMETHEUS_URL (replace the ... with your value).
Run in a terminal. Everything after -- is the command that starts the server. docs
claude mcp add --transport stdio --env PROMETHEUS_URL=... prometheus -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server
Claude Desktop only: Settings > Developer > Edit Config opens claude_desktop_config.json. Add this, save and restart the app. docs
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server"
],
"env": {
"PROMETHEUS_URL": "..."
}
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project), or use the install button. docs
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server"
],
"env": {
"PROMETHEUS_URL": "..."
}
}
}
}Add to .vscode/mcp.json (note the "servers" key and the type), or use the install button. Command Palette > "MCP: Open User Configuration" for all workspaces. docs
{
"servers": {
"prometheus": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server"
],
"env": {
"PROMETHEUS_URL": "..."
}
}
}
}Run codex mcp add --env PROMETHEUS_URL=... prometheus -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server, or add this to ~/.codex/config.toml. docs
[mcp_servers.prometheus] command = "docker" args = ["run", "-i", "--rm", "-e", "PROMETHEUS_URL", "ghcr.io/pab1it0/prometheus-mcp-server"] [mcp_servers.prometheus.env] PROMETHEUS_URL = "..."
Run in a terminal (-s user adds it for all projects; the default is this project). docs
gemini mcp add -s user -e PROMETHEUS_URL=... prometheus docker -- run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server
Run in a terminal; it writes ~/.copilot/mcp-config.json. docs
copilot mcp add --env PROMETHEUS_URL=... prometheus -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server
Add to mcp_config.json: ~/.config/devin/mcp_config.json on macOS and Linux (older installs: ~/.codeium/windsurf/mcp_config.json), %APPDATA%\devin\ on Windows. docs
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server"
],
"env": {
"PROMETHEUS_URL": "..."
}
}
}
}Add to Zed's settings.json (or Settings > AI > MCP Servers > Add Server). Remote servers without an Authorization header sign in with OAuth. docs
{
"context_servers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server"
],
"env": {
"PROMETHEUS_URL": "..."
}
}
}
}Add to opencode.json in the project (or ~/.config/opencode/opencode.json). docs
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"prometheus": {
"type": "local",
"command": [
"docker",
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server"
],
"enabled": true,
"environment": {
"PROMETHEUS_URL": "..."
}
}
}
}Add to ~/.kiro/settings/mcp.json (all projects) or .kiro/settings/mcp.json (this project). docs
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server"
],
"env": {
"PROMETHEUS_URL": "..."
}
}
}
}MCP Servers > Configure > Configure MCP Servers opens cline_mcp_settings.json; add this entry. docs
{
"mcpServers": {
"prometheus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server"
],
"env": {
"PROMETHEUS_URL": "..."
}
}
}
}Security notes
- The local server runs with your user's permissions (it runs in a Docker container, and only the variables passed with -e reach it).
- Needs PROMETHEUS_URL.
- Community code: read it (or at least the tools it registers) before you give it credentials.
Alternatives
- Grafanaofficial · ★ 3.6k
Search dashboards, query Prometheus and Loki, and manage incidents and alerts.
- OpenStatusofficial · ★ 9.2k
Monitors, status pages, incidents and maintenance windows in OpenStatus.
- Google Analyticsofficial · ★ 3.6k
Run Google Analytics 4 reports and read account and property details.
- Google Adsofficial · ★ 1.1k
Query Google Ads accounts, campaigns and performance with GAQL.
- Sentryofficial · ★ 944
Search issues and events, read stack traces and run Seer root-cause analysis.
- Dynatraceofficial · ★ 167
Query logs, metrics, problems and vulnerabilities in your Dynatrace environment with DQL.
- Logfireofficial · ★ 162
Read OpenTelemetry traces and metrics from Logfire and find exceptions.
- Rootlyofficial · ★ 45
Rootly incidents, on-call schedules, alerts and similar past incidents.
FAQ
What does the Prometheus MCP Server do?+
Run PromQL queries and explore metrics and targets in a Prometheus server.
Is the Prometheus MCP server official?+
Community-maintained (pab1it0 on GitHub), not by the company whose product it connects to.
How do I add Prometheus to Claude Code?+
Run: claude mcp add --env PROMETHEUS_URL=... --transport stdio prometheus -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server. Add --scope project to share it with your team through .mcp.json.
How do I use the Prometheus MCP server in Cursor or VS Code?+
Open the Cursor or VS Code tab above: it has the mcp.json entry and a one-click install link. Cursor uses the "mcpServers" key; VS Code uses "servers" and needs a type ("stdio").
Does Prometheus work in ChatGPT and claude.ai?+
No: it runs locally over stdio, and ChatGPT and claude.ai only connect to remote servers. Use it in Claude Desktop, Claude Code, Cursor, VS Code or another client that can start a local process.
What are the alternatives to the Prometheus MCP server?+
Other monitoring & observability MCP servers: Grafana, OpenStatus, Google Analytics, Google Ads and Sentry.