
How to add Prometheus MCP Server to Claude Desktop
Run PromQL queries and analyze Prometheus metrics from any MCP client. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 15, 2026 ยท 340โ ยท stdio ยท no auth
Claude Desktop config for Prometheus MCP Server
uvx prometheus-mcp-server{
"mcpServers": {
"prometheus-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PROMETHEUS_URL",
"ghcr.io/pab1it0/prometheus-mcp-server:latest"
],
"env": {
"PROMETHEUS_URL": "<your-prometheus-url>"
}
}
}
}Requires Docker to be installed and running.
Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the Prometheus MCP Server config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm Prometheus MCP Server's tools appear under the ๐ tools menu.
Before you start
- A reachable Prometheus server URL, set via the PROMETHEUS_URL environment variable
- Docker (recommended) โ or Python 3.10+ with the uv package manager for a local install
- An MCP-compatible client (Claude Desktop, VS Code, Cursor, Windsurf, etc.)
- Optional credentials only if your Prometheus is secured: basic auth (PROMETHEUS_USERNAME/PASSWORD), bearer token (PROMETHEUS_TOKEN), mTLS client cert/key, or custom headers
What Prometheus MCP Server can do in Claude Desktop
execute_queryRun an instant PromQL query at a single point in time
execute_range_queryRun a PromQL range query over a start/end time with a step
list_metricsList the metric names available in Prometheus
get_metric_metadataFetch metadata (type, help, unit) for a metric
get_targetsList scrape targets and their health/status
health_checkCheck connectivity and health of the configured Prometheus server
Security
Read access to Prometheus exposes all scraped infrastructure and application metrics; restrict network reachability to the Prometheus endpoint and set basic-auth credentials if the server is exposed. PromQL queries can be expensive, so consider rate limits on the upstream.
Prometheus MCP Server + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Prometheus MCP Server config there under the "mcpServers" key and restart the client.
Is Prometheus MCP Server safe to use with Claude Desktop?
Read access to Prometheus exposes all scraped infrastructure and application metrics; restrict network reachability to the Prometheus endpoint and set basic-auth credentials if the server is exposed. PromQL queries can be expensive, so consider rate limits on the upstream.
Does it require authentication to Prometheus?
Only if your Prometheus is secured. It works with no auth by default, and supports basic auth, bearer token, mutual TLS, and custom headers via environment variables.
Can it run remotely instead of as a local stdio process?
Yes. Besides the default stdio transport it can serve HTTP or SSE (default 127.0.0.1:8080), including a stateless HTTP mode suited to multi-replica/Kubernetes deployments.
How do I connect to more than one Prometheus?
Run multiple instances and set the TOOL_PREFIX environment variable on each so their tool names don't collide in the client.