prometheus-mcp-server
Verified Safeby tjhop
Overview
Serves as an MCP (Model Context Protocol) gateway, enabling Large Language Models (LLMs) to interact with and analyze a running Prometheus instance through its API.
Installation
docker run --rm -i ghcr.io/tjhop/prometheus-mcp-server:latest --prometheus.url "https://your.prometheus.host:9090"Environment Variables
- PROMETHEUS_MCP_SERVER_HELP
- PROMETHEUS_MCP_SERVER_MCP_TOOLS
- PROMETHEUS_MCP_SERVER_MCP_ENABLE_TOON_OUTPUT
- PROMETHEUS_MCP_SERVER_PROMETHEUS_BACKEND
- PROMETHEUS_MCP_SERVER_PROMETHEUS_URL
- PROMETHEUS_MCP_SERVER_PROMETHEUS_TIMEOUT
- PROMETHEUS_MCP_SERVER_PROMETHEUS_TRUNCATION_LIMIT
- PROMETHEUS_MCP_SERVER_HTTP_CONFIG
- PROMETHEUS_MCP_SERVER_WEB_TELEMETRY_PATH
- PROMETHEUS_MCP_SERVER_WEB_MAX_REQUESTS
- PROMETHEUS_MCP_SERVER_DANGEROUS_ENABLE_TSDB_ADMIN_TOOLS
- PROMETHEUS_MCP_SERVER_LOG_FILE
- PROMETHEUS_MCP_SERVER_MCP_TRANSPORT
- PROMETHEUS_MCP_SERVER_WEB_SYSTEMD_SOCKET
- PROMETHEUS_MCP_SERVER_WEB_LISTEN_ADDRESS
- PROMETHEUS_MCP_SERVER_WEB_CONFIG_FILE
- PROMETHEUS_MCP_SERVER_LOG_LEVEL
- PROMETHEUS_MCP_SERVER_LOG_FORMAT
- PROMETHEUS_MCP_SERVER_VERSION
- OLLAMA_MODEL
Security Notes
The project transparently handles potentially destructive operations via the `--dangerous.enable-tsdb-admin-tools` flag, requiring explicit user acknowledgement. It supports securing connections to Prometheus and its own endpoints using HTTP configuration files (TLS, basic auth, bearer tokens), and correctly proxies authorization headers from incoming MCP requests to Prometheus API calls. No apparent `eval` usage, obfuscation, or hardcoded sensitive credentials. The main risk is user choice in enabling dangerous tools or misconfiguring security for the MCP server itself.
Similar Servers
mcp-grafana
Provides a Model Context Protocol (MCP) server for Grafana, enabling AI agents to interact with Grafana features such as dashboards, datasources, alerting, incidents, and more through a structured tool-based interface.
prometheus-mcp-server
A Model Context Protocol (MCP) server that enables AI assistants to query and analyze Prometheus metrics for monitoring and insights.
opentelemetry-mcp-server
Enables AI assistants to query and analyze OpenTelemetry traces from LLM applications for debugging, performance, and cost optimization.
logfire-mcp
Enables LLMs to retrieve and analyze application telemetry data (OpenTelemetry traces and metrics) from Pydantic Logfire, including executing arbitrary SQL queries.