$git clone https://github.com/pab1it0/prometheus-mcp-serverGive AI assistants the power to query your Prometheus metrics.
| 1 | # Prometheus MCP Server |
| 2 | |
| 3 | [](https://github.com/users/pab1it0/packages/container/package/prometheus-mcp-server) |
| 4 | [](https://github.com/pab1it0/prometheus-mcp-server/pkgs/container/charts%2Fprometheus-mcp-server) |
| 5 | [](https://github.com/pab1it0/prometheus-mcp-server/releases) |
| 6 | [](https://codecov.io/gh/pab1it0/prometheus-mcp-server) |
| 7 |  |
| 8 | [](https://github.com/pab1it0/prometheus-mcp-server/blob/main/LICENSE) |
| 9 | |
| 10 | Give AI assistants the power to query your Prometheus metrics. |
| 11 | |
| 12 | A [Model Context Protocol][mcp] (MCP) server that provides access to your Prometheus metrics and queries through standardized MCP interfaces, allowing AI assistants to execute PromQL queries and analyze your metrics data. |
| 13 | |
| 14 | [mcp]: https://modelcontextprotocol.io |
| 15 | |
| 16 | ## Getting Started |
| 17 | |
| 18 | ### Prerequisites |
| 19 | |
| 20 | - Prometheus server accessible from your environment |
| 21 | - MCP-compatible client (Claude Desktop, VS Code, Cursor, Windsurf, etc.) |
| 22 | |
| 23 | ### Installation Methods |
| 24 | |
| 25 | <details> |
| 26 | <summary><b>Claude Desktop</b></summary> |
| 27 | |
| 28 | Add to your Claude Desktop configuration: |
| 29 | |
| 30 | ```json |
| 31 | { |
| 32 | "mcpServers": { |
| 33 | "prometheus": { |
| 34 | "command": "docker", |
| 35 | "args": [ |
| 36 | "run", |
| 37 | "-i", |
| 38 | "--rm", |
| 39 | "-e", |
| 40 | "PROMETHEUS_URL", |
| 41 | "ghcr.io/pab1it0/prometheus-mcp-server:latest" |
| 42 | ], |
| 43 | "env": { |
| 44 | "PROMETHEUS_URL": "<your-prometheus-url>" |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | ``` |
| 50 | </details> |
| 51 | |
| 52 | <details> |
| 53 | <summary><b>Claude Code</b></summary> |
| 54 | |
| 55 | Install via the Claude Code CLI: |
| 56 | |
| 57 | ```bash |
| 58 | claude mcp add prometheus --env PROMETHEUS_URL=http://your-prometheus:9090 -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:latest |
| 59 | ``` |
| 60 | </details> |
| 61 | |
| 62 | <details> |
| 63 | <summary><b>VS Code / Cursor / Windsurf</b></summary> |
| 64 | |
| 65 | Add to your MCP settings in the respective IDE: |
| 66 | |
| 67 | ```json |
| 68 | { |
| 69 | "prometheus": { |
| 70 | "command": "docker", |
| 71 | "args": [ |
| 72 | "run", |
| 73 | "-i", |
| 74 | "--rm", |
| 75 | "-e", |
| 76 | "PROMETHEUS_URL", |
| 77 | "ghcr.io/pab1it0/prometheus-mcp-server:latest" |
| 78 | ], |
| 79 | "env": { |
| 80 | "PROMETHEUS_URL": "<your-prometheus-url>" |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | ``` |
| 85 | </details> |
| 86 | |
| 87 | <details> |
| 88 | <summary><b>Docker Desktop</b></summary> |
| 89 | |
| 90 | The easiest way to run the Prometheus MCP server is through Docker Desktop: |
| 91 | |
| 92 | <a href="https://hub.docker.com/open-desktop?url=https://open.docker.com/dashboard/mcp/servers/id/prometheus/config?enable=true"> |
| 93 | <img src="https://img.shields.io/badge/+%20Add%20to-Docker%20Desktop-2496ED?style=for-the-badge&logo=docker&logoColor=white" alt="Add to Docker Desktop" /> |
| 94 | </a> |
| 95 | |
| 96 | 1. **Via MCP Catalog**: Visit the [Prometheus MCP Server on Docker Hub](https://hub.docker.com/mcp/server/prometheus/overview) and click the button above |
| 97 | |
| 98 | 2. **Via MCP Toolkit**: Use Docker Desktop's MCP Toolkit extension to discover and install the server |
| 99 | |
| 100 | 3. Configure your connection using environment variables (see Configuration Options below) |
| 101 | |
| 102 | </details> |
| 103 | |
| 104 | <details> |
| 105 | <summary><b>Manual Docker Setup</b></summary> |
| 106 | |
| 107 | Run directly with Docker: |
| 108 | |
| 109 | ```bash |
| 110 | # With environment variables |
| 111 | docker run -i --rm \ |
| 112 | -e PROMETHEUS_URL="http://your-prometheus:9090" \ |
| 113 | ghcr.io/pab1it0/prometheus-mcp-server:latest |
| 114 | |
| 115 | # With authentication |
| 116 | docker run -i --rm \ |
| 117 | -e PROMETHEUS_URL="http://your-prometheus:9090" \ |
| 118 | -e PROMETHEUS_USERNAME="admin" \ |
| 119 | -e PROMETHEUS_PASSWORD="password" \ |
| 120 | ghcr.io/pab1it0/prometheus-mcp-server:latest |
| 121 | ``` |
| 122 | </details> |
| 123 | |
| 124 | <details> |
| 125 | <summary><b>Helm Chart (Kubernetes)</b></summary> |
| 126 | |
| 127 | Deploy to Kubernetes using the Helm chart from the OCI registry: |
| 128 | |
| 129 | ```bash |
| 130 | helm install prometheus-mcp-server \ |
| 131 | oci://ghcr.io/pab1it0/char |