Prometheus (Golang)

Prometheus (Golang)

An MCP server enabling LLMs to interact with Prometheus via API for queries and metrics.

24
Stars
7
Forks
12
Releases

Overview

Prometheus MCP Server is an MCP server that lets LLMs interact with a running Prometheus instance through Prometheus-compatible APIs to generate and execute PromQL queries, discover metrics, and analyze Prometheus data. It exposes a large toolset that mirrors Prometheus API endpoints (e.g., query, range_query, label_names, label_values, series, metrics metadata, targets, alerts, rules) and more across categories like documentation access and administrative actions. By default, a core set of tools is loaded, with the option to restrict or extend the available tools using --mcp.tools. The server can optionally emit TOON (Token-Oriented Object Notation) output for token-efficient communication. It supports multiple Prometheus backends via --prometheus.backend and includes notes about differences for backends such as Thanos. There is a dangerous flag for using TSDB Admin endpoints. It can be deployed as a binary, via Docker, or as system packages, and exposes telemetry metrics at /metrics. Transport options include STDIO and a streamable HTTP transport (SSE).

Details

Owner
tjhop
Language
Go
License
Apache License 2.0
Updated
2025-12-07

Features

Extensive MCP toolset for Prometheus API

Offers a broad set of Prometheus API tools (e.g., query, range_query, label_names, label_values, metric_metadata, series, targets, alerts, rules) accessible via MCP, with core tools loaded by default and optional whitelisting via --mcp.tools.

TOON output option

Enable Token-Oriented Object Notation (TOON) output for tools instead of JSON to potentially reduce token usage.

Prometheus backend compatibility

Configurable backend with --prometheus.backend; supports standard backends such as prometheus and Thanos; backend behavior differences are documented to aid compatibility.

Multiple MCP transports

Supports STDIO and streamable HTTP transport (including SSE) to accommodate different deployment environments.

Core tools and tool whitelisting

Core tools are always loaded: docs_list, docs_read, docs_search, query, range_query, metric_metadata, label_names, label_values, series; additional tools can be added with --mcp.tools.

TSDB Admin API safety

TSDB Admin API endpoints (snapshot, delete_series, clean_tombstones) are behind a dangerous flag to prevent destructive operations.

Telemetry and metrics

Exposes Prometheus metrics at the configured listen address (/metrics), including build info, readiness, API call durations, tool and resource call counts, plus standard Go and process metrics.

Deployment options

Available as binary releases, Docker images, and system packages (with a systemd service file in the package), including guidance for installation and usage.

Audience

LLM developersEnable LLM-based querying and analysis of Prometheus metrics through MCP tooling.
Prometheus operatorsOperate Prometheus-backed services with MCP-enabled API access and tooling for automation.
AI researchersFacilitate natural language driven Prometheus queries and reporting via MCP.

Tags

PrometheusMCPLLMAPITOONSSESTDIOPrometheus-backendMetricsQueryDocumentationDevOps