prometheus-mcp-server

This repository provides a Model Context Protocol (MCP) server for Prometheus, enabling AI assistants to query and analyze Prometheus metrics through standardized interfaces. It supports PromQL execution, metric discovery, and authentication.

45
0

Prometheus MCP Server

A Model Context Protocol (MCP) server for Prometheus, enabling AI assistants to interact with and analyze Prometheus metrics data through standardized MCP interfaces.

Features

  • Execute PromQL queries.
  • Discover and explore metrics, including listing available metrics, retrieving metadata, and viewing instant and range query results with configurable step intervals.
  • Authentication support via basic auth or bearer token, both configurable through environment variables.
  • Docker containerization for easy deployment.
  • Configurable tool list for AI assistants, allowing selection of specific functionalities to optimize context window usage.

Usage

Configure the server with Prometheus URL and optional authentication credentials via environment variables. Integrate with MCP clients like Claude Desktop by specifying the server command and arguments, including the path to the main.py file. Docker usage is supported, with options for direct docker run or docker-compose deployment.

Development

Contributions are welcome. The project uses uv for dependency management. Set up a virtual environment, install dependencies, and run tests using pytest. The project structure includes a src directory containing the server implementation and main application logic.

Repository

PA
pab1it0

pab1it0/prometheus-mcp-server

Created

March 19, 2025

Updated

March 28, 2025

Language

Python

Category

System Tools