Back to Home
brenoepics icon

prometheus-mcp

Verified Safe

by brenoepics

Overview

A Model Context Protocol (MCP) server that enables AI agents and CLI users to query and discover metrics from Prometheus, with built-in features like retries, caching, and an optional metrics exporter.

Installation

Run Command
docker run --rm -it brenoepics/prometheus-mcp:latest --mcp --prometheus-url http://host.docker.internal:9090

Environment Variables

  • PROMETHEUS_URL
  • PROMETHEUS_TIMEOUT
  • PROMETHEUS_RETRIES
  • PROMETHEUS_RETRY_BACKOFF_MS
  • PROMETHEUS_MIN_INTERVAL_MS
  • PROMETHEUS_CACHE_TTL_SECS
  • PROMETHEUS_USERNAME
  • PROMETHEUS_PASSWORD

Security Notes

The project is written in Rust, providing strong memory safety. It uses standard HTTP client practices with `reqwest`, including basic authentication via environment variables or CLI flags (recommended over hardcoding). JSON-RPC parsing occurs from `stdin`, and outputs are written to `stdout` and a fixed log file path (`/tmp/mcp.jsonl`). There is no usage of `eval` or similar dangerous dynamic code execution patterns. Security risks are primarily related to misconfiguration (e.g., exposing the server publicly without additional authentication) or vulnerabilities in the Prometheus instance it connects to.

Similar Servers

Stats

Interest Score39
Security Score9
Cost ClassMedium
Avg Tokens1000
Stars12
Forks1
Last Update2026-01-12

Tags

PrometheusMCPObservabilityMetricsCLI