prometheus-mcp-server  by pab1it0

Prometheus metrics server for AI agents

Created 7 months ago
269 stars

Top 95.3% on SourcePulse

GitHubView on GitHub
Project Summary

Prometheus MCP Server provides a Model Context Protocol (MCP) server that bridges AI agents and LLMs with Prometheus monitoring systems. It enables AI assistants to query and analyze Prometheus metrics through standardized interfaces, allowing for programmatic access to time-series data and operational insights. This project is ideal for developers and SREs looking to integrate AI-driven analysis into their monitoring workflows.

How It Works

The project implements an MCP server that acts as an intermediary. It exposes a configurable set of tools, allowing MCP-compatible clients (like AI assistants) to discover metrics, retrieve metadata, and execute PromQL queries against an underlying Prometheus instance. This approach abstracts the complexities of direct PromQL interaction and Prometheus API calls, providing a standardized protocol for AI agents to leverage monitoring data.

Quick Start & Requirements

  • Primary Install/Run Command (Docker):
    docker run -i --rm \
      -e PROMETHEUS_URL="http://your-prometheus:9090" \
      ghcr.io/pab1it0/prometheus-mcp-server:latest
    
  • Prerequisites: An accessible Prometheus server, Docker Desktop or CLI. MCP-compatible clients such as Claude Desktop, VS Code, Cursor, or Windsurf are required for interaction.
  • Configuration: The PROMETHEUS_URL environment variable is mandatory. Basic authentication (PROMETHEUS_USERNAME, PROMETHEUS_PASSWORD) and Bearer token authentication (PROMETHEUS_TOKEN) are supported.
  • Links: Prometheus MCP Server on Docker Hub

Highlighted Details

  • Execute PromQL instant and range queries with configurable step intervals.
  • Discover and explore metrics, including listing all available metrics and retrieving metadata for specific ones.
  • Supports authentication via environment variables for secure Prometheus access.
  • Offers Docker containerization for straightforward deployment.
  • Provides configurable tools, allowing fine-grained control over AI agent capabilities.

Maintenance & Community

Contributions are welcomed via issues or pull requests. The project utilizes uv for dependency management and includes a comprehensive test suite run with pytest. Development dependencies can be installed using uv pip install -e ".[dev]".

Licensing & Compatibility

The project is licensed under the MIT license. This permissive license allows for commercial use and integration into closed-source applications without significant restrictions.

Limitations & Caveats

The provided README does not explicitly detail limitations, unsupported platforms, or known bugs. The project appears to be a focused utility for enabling AI interaction with Prometheus.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
21
Issues (30d)
4
Star History
39 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.