Skip to content
On this page

Last updated:

Installation

Use these quick-install links or follow the manual steps below.

One-click MCP install (Cursor / VS Code)

CursorVS Code
Install MCP ServerInstall on VS Code

::: note These deep links configure the MCP server to run via Docker. On Linux, consider using --network host and http://localhost:9090 as the Prometheus URL. :::

Manual installation

Prebuilt binaries

Build from source (Rust)

bash
cargo install prometheus-mcp
# or
cargo build --release && ./target/release/prometheus-mcp --help
powershell
cargo install prometheus-mcp
# or
cargo build --release; .\target\release\prometheus-mcp.exe --help
  • macOS/Windows (no host network):
bash
docker run --rm -it brenoepics/prometheus-mcp:latest --mcp \
  --prometheus-url http://host.docker.internal:9090
  • Linux (host network available):
bash
docker run --rm -it --network host brenoepics/prometheus-mcp:latest --mcp \
  --prometheus-url http://localhost:9090

Windows notes

TIP

Prefer PowerShell when copying commands from docs.

  • Prometheus on Windows host with Docker: use http://host.docker.internal:9090.
  • To expose the metrics exporter from Docker on Windows/macOS:
powershell
docker run --rm -it -p 9091:9091 brenoepics/prometheus-mcp:latest --mcp \
  --metrics-exporter --metrics-port 9091 \
  --prometheus-url http://host.docker.internal:9090

Example MCP configs

  • Claude Desktop (Docker): see /docs/claude-desktop.md.
  • Local binary:
json
{
  "mcpServers": {
    "prometheus": {
      "command": "prometheus-mcp",
      "args": [
        "--mcp",
        "--prometheus-url",
        "http://localhost:9090"
      ]
    }
  }
}
  • Docker (cross-platform):
json
{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "brenoepics/prometheus-mcp:latest",
        "--mcp",
        "--prometheus-url",
        "http://host.docker.internal:9090"
      ]
    }
  }
}

Apache-2.0 Licensed