Back to Home
tjhop icon

prometheus-mcp-server

by tjhop

Overview

This MCP server allows LLMs to interact with Prometheus instances via its API for monitoring, querying, and analysis tasks.

Installation

Run Command
docker run --rm -p 8080:8080 ghcr.io/tjhop/prometheus-mcp-server:latest --prometheus.url "http://localhost:9090" --mcp.transport "http" --web.listen-address ":8080"

Environment Variables

  • PROMETHEUS_MCP_SERVER_PROMETHEUS_URL

Security Notes

The server's code quality appears high, utilizing standard Go libraries and Prometheus client-golang. A critical security consideration is the `--dangerous.enable-tsdb-admin-tools` flag, which, if enabled, exposes destructive operations (like deleting time-series data) to the LLM. While this is explicitly opt-in with warnings, it represents a significant potential risk. The `apiClientLoaderMiddleware` handles and proxies `Authorization` headers to the Prometheus backend, making securing the MCP server's own endpoints paramount. Network calls to the Prometheus instance are made based on a configured URL, reducing the direct risk of LLM-induced arbitrary network requests from within tool handlers, but the target Prometheus instance must be trusted.

Similar Servers

Stats

Interest Score42
Security Score7
Cost ClassMedium
Avg Tokens1000
Stars25
Forks8
Last Update2025-12-01

Tags

PrometheusLLMMonitoringObservabilityAPI Agent