Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"prometheus": {
"env": {
"PROMETHEUS_URL": "https://prometheus.example.com",
"PROMETHEUS_TOKEN": "your-token-here"
},
"command": "prometheus-mcp"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP server for Prometheus metrics and observability. Give Claude (or any MCP-capable agent) read access to your Prometheus instance — query metrics with PromQL, inspect active alerts, and explore scrape targets — without leaving the conversation.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'prometheus-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked prometheus-mcp against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in devops / analytics
MCP server for using the GitLab API
⚡ A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.
MCP Server for GCP environment for interacting with various Observability APIs.
A Unified MCP Server Management App (MCP Manager).
MCP Security Weekly
Get CVE alerts and security updates for io.github.mshegolev/prometheus-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
MCP server for Prometheus metrics and observability. Give Claude (or any MCP-capable agent) read access to your Prometheus instance — query metrics with PromQL, inspect active alerts, and explore scrape targets — without leaving the conversation.
The existing Prometheus integrations require custom scripts or direct API knowledge. This server:
readOnlyHint: true — zero risk of modifying Prometheus data.structuredContent) for programmatic use + Markdown (content) for human-readable display.| Tool | Endpoint | Description |
|---|---|---|
prometheus_list_metrics | GET /api/v1/label/__name__/values | List all metric names with optional substring filter (cap 500) |
prometheus_query | GET /api/v1/query | Execute an instant PromQL query |
prometheus_query_range | GET /api/v1/query_range | Execute a PromQL range query returning time-series |
prometheus_list_alerts | GET /api/v1/alerts | List active and pending alerts |
prometheus_list_targets | GET /api/v1/targets | List scrape targets by health and job |
pip install prometheus-mcp
Or run directly without installing:
uvx prometheus-mcp
All configuration is via environment variables:
| Variable | Required | Default | Description |
|---|---|---|---|
PROMETHEUS_URL | Yes | — | Prometheus server URL, e.g. https://prometheus.example.com (no trailing slash) |
PROMETHEUS_TOKEN | No | — | Bearer token (takes precedence over Basic auth) |
PROMETHEUS_USERNAME | No | — | HTTP Basic auth username |
PROMETHEUS_PASSWORD | No | — | HTTP Basic auth password |
PROMETHEUS_SSL_VERIFY | No | true | Set false for self-signed certificates |
Copy .env.example to .env and fill in your values.
Add to your MCP config (claude_desktop_config.json or .claude/mcp.json):
{
"mcpServers": {
"prometheus": {
"command": "prometheus-mcp",
"env": {
"PROMETHEUS_URL": "https://prometheus.example.com",
"PROMETHEUS_TOKEN": "your-token-here"
}
}
}
}
Or with uvx (no install required):
{
"mcpServers": {
"prometheus": {
"command": "uvx",
"args": ["prometheus-mcp"],
"env": {
"PROMETHEUS_URL": "https://prometheus.example.com"
}
}
}
}
docker run --rm -e PROMETHEUS_URL=https://prometheus.example.com prometheus-mcp
Once configured, ask Claude: