Installation
Use these quick-install links or follow the manual steps below.
One-click MCP install (Cursor / VS Code)
| Cursor | 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
- Download the latest release for your OS/arch: https://github.com/brenoepics/prometheus-mcp/releases
- Unpack the archive and place the
prometheus-mcpbinary on your PATH.
Build from source (Rust)
bash
cargo install prometheus-mcp
# or
cargo build --release && ./target/release/prometheus-mcp --helppowershell
cargo install prometheus-mcp
# or
cargo build --release; .\target\release\prometheus-mcp.exe --helpDocker (recommended for MCP)
- 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:9090Windows 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:9090Example 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"
]
}
}
}