Prometheus MCP Server
MCP server by pab1it0 Community
Prometheus MCP Server gives AI assistants access to Prometheus metrics and lets them run PromQL queries. It is aimed at teams that want to analyze their Prometheus data from MCP-compatible clients.
Install Prometheus MCP Server
Built from the published package, never by AI.
claude mcp add prometheus-mcp-server -e PROMETHEUS_URL=YOUR_PROMETHEUS_URL -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:1.6.2Run in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"prometheus-mcp-server": {
"env": {
"PROMETHEUS_URL": "YOUR_PROMETHEUS_URL"
},
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"
],
"command": "docker"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
Step-by-step: install Prometheus MCP Server in Claude Desktop
{
"mcpServers": {
"prometheus-mcp-server": {
"env": {
"PROMETHEUS_URL": "YOUR_PROMETHEUS_URL"
},
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"
],
"command": "docker"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"prometheus-mcp-server": {
"env": {
"PROMETHEUS_URL": "YOUR_PROMETHEUS_URL"
},
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"
],
"command": "docker"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add prometheus-mcp-server --env PROMETHEUS_URL=YOUR_PROMETHEUS_URL -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:1.6.2{
"mcpServers": {
"prometheus-mcp-server": {
"env": {
"PROMETHEUS_URL": "YOUR_PROMETHEUS_URL"
},
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:1.6.2"
],
"command": "docker"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install Prometheus MCP Server in Antigravity CLI
gemini mcp add prometheus-mcp-server docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:1.6.2Gemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the prometheus-mcp-server block.
About
Prometheus MCP Server is a Model Context Protocol server that gives AI assistants access to Prometheus metrics. It lets assistants run PromQL instant queries and range queries, list available metrics, read metric metadata, and check scrape targets. Setup requires a reachable Prometheus server, set through the PROMETHEUS_URL variable.
The server uses stdio transport by default, and HTTP and SSE transport modes are also configurable. It supports basic auth, bearer tokens, client certificates for mutual TLS, and custom headers. The project provides a Docker image and a Helm chart for Kubernetes. It is aimed at people who want an AI assistant to analyze Prometheus data from clients such as Claude Desktop, VS Code, Cursor or Windsurf.
Written from the project's README and checked against it.
Tools it gives your assistant
health_checkHealth check endpoint for container monitoring and status verification.execute_queryExecute a PromQL instant query against Prometheus.execute_range_queryExecute a PromQL range query with start time, end time, and step interval.list_metricsList all available metrics in Prometheus with pagination and filtering support.get_metric_metadataGet metadata for one metric or bulk metadata with optional filtering.get_targetsGet scrape targets, with state and scrape_pool filtering and optional pagination.
What you need
- A Prometheus server accessible from your environment
- An MCP-compatible client such as Claude Desktop, VS Code, Cursor or Windsurf
- Docker, as used in the install examples
| Setting | Needed | What it is |
|---|---|---|
PROMETHEUS_Environment variable | Required | Prometheus server URL (e.g., http://localhost:9090) |
PROMETHEUS_Environment variable | Optional | Set to False to disable SSL verification |
PROMETHEUS_Environment variable | Optional | Set to True to disable Prometheus UI links in query results (saves context tokens in MCP clients) |
PROMETHEUS_Environment variable | Optional | Username for Prometheus basic authentication |
PROMETHEUS_Environment variable, secret | Optional | Password for Prometheus basic authentication |
PROMETHEUS_Environment variable, secret | Optional | Bearer token for Prometheus authentication |
ORG_Environment variable | Optional | Organization ID for multi-tenant Prometheus setups |
PROMETHEUS_Environment variable | Optional | Path to client certificate file for mutual TLS authentication |
PROMETHEUS_Environment variable | Optional | Path to client private key file for mutual TLS authentication |
PROMETHEUS_Environment variable | Optional | MCP server transport type (stdio, http, or sse) |
PROMETHEUS_Environment variable | Optional | Host address for HTTP/SSE transport (default: 127.0.0.1) |
PROMETHEUS_Environment variable | Optional | Port number for HTTP/SSE transport (default: 8080) |
PROMETHEUS_Environment variable | Optional | Enable stateless HTTP mode for multi-replica support (default: false) |
PROMETHEUS_Environment variable | Optional | Custom headers as JSON string to include in Prometheus requests |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Run a PromQL query for the current CPU usage across my servers
- Run a range query on http_requests_total for the last six hours
- List the metrics in Prometheus that contain the word latency
Good to know
- The list of tools is configurable, so you can expose only the ones you need.
- The HTTP transport binds to 127.0.0.1 by default.
- Requests time out after 30 seconds by default.
Security check
B- Downloads a script from the internet and runs it (a well-known installer)In
README.md:curl -LsSf https://astral.sh/uv/install.sh | sh
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Prometheus MCP Server
All alternatives →Azure MCP Server bundles all Azure MCP tools into one local MCP server. It connects AI agents to Azure services and can be used alone or with the GitHub Copilot for Azure extension in VS Code.
Manages monitors, status pages, incidents and maintenances in an openstatus workspace from Claude, ChatGPT, or Cursor. It suits teams that run uptime monitoring and status pages and want their AI assistant to update them.
SmartBear MCP gives AI assistants access to SmartBear's testing and monitoring tools, including BugSnag, Reflect, Swagger, PactFlow and QTM4J. It is aimed at teams that already use these products. Products are reached through remote servers or a local npm package.
Lets AI assistants manage Fettle uptime monitoring, including monitors, incidents, heartbeats, maintenance windows and status page incidents. Built for developers and operations teams who use Fettle and want to work from Claude, Cursor or Codex.
Superlog is an open-source agentic telemetry system that ingests traces, logs and metrics and groups noisy signals into incidents. It is aimed at teams debugging production systems with OpenTelemetry data.
Microsoft Learn MCP gives AI assistants direct access to official Microsoft documentation and code samples through a remote MCP endpoint. It is for developers who use MCP-compatible clients and want answers based on current Microsoft docs.
Compare with Azure MCP Server, openstatus or SmartBear MCP
Prometheus MCP Server: common questions
Does Prometheus MCP Server support authentication?
Yes. The source lists basic auth, bearer token auth, and client certificate and key paths for mutual TLS, all set through environment variables.
Can I run several instances for different environments?
Yes. The TOOL_PREFIX variable adds a prefix to all tool names, such as staging_execute_query, which the source says is useful for running multiple instances in Cursor.
What does the request timeout setting do?
PROMETHEUS_REQUEST_TIMEOUT sets the request timeout in seconds to prevent hanging requests. The default is 30 seconds.
How do I install Prometheus MCP Server?
In Claude Code run claude mcp add prometheus-mcp-server -e PROMETHEUS_URL=YOUR_PROMETHEUS_URL -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:1.6.2. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Prometheus MCP Server the official server?
Prometheus MCP Server is a community project by pab1it0, not verified by a company domain.
Is Prometheus MCP Server free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Prometheus MCP Server safe to use?
It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (downloads a script from the internet and runs it (a well-known installer)). Review the code before you install. How grades work.
What are alternatives to Prometheus MCP Server?
Similar MCP servers: Azure MCP Server, openstatus, SmartBear MCP, Fettle.
Does Prometheus MCP Server work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
