mcp-registry/prometheus-mcp-server

    ==================
      
       /// MCP ///
      /// PRO ///
        
    ==================
        
    [server:online]
    [protocol:ready]

prometheus-mcp-server

by pab1it0

A Model Context Protocol (MCP) server that enables AI assistants to query and analyze Prometheus metrics through standardized interfaces.

165
33
Open Source

01

execute_query

Execute a PromQL instant query against Prometheus

02

execute_range_query

Execute a PromQL range query with start time, end time, and step interval

03

list_metrics

List all available metrics in Prometheus

04

get_metric_metadata

Get metadata for a specific metric

05

get_targets

Get information about all scrape targets

Installation

1. Clone the repository
git clone https://github.com/pab1it0/prometheus-mcp-server.git cd prometheus-mcp-server
2. Create and activate a virtual environment (recommended)
python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
3. Install Python dependencies
pip install -r requirements.txt
4. (Optional) Install development extras
pip install -r requirements-dev.txt
5. Configure access to your Prometheus server by editing config.yaml (or set the corresponding ENV variables):
prometheus: base_url: "http://localhost:9090" auth_token: "<PROM_TOKEN_IF_REQUIRED>"
6. Launch the MCP server
python -m prometheus_mcp_server --config config.yaml # or `uvicorn prometheus_mcp_server.app:app --reload`
7. Verify it is running by visiting:
http://localhost:8000/healthz http://localhost:8000/docs (OpenAPI UI)
8. Containerised run (alternative)
docker build -t prometheus-mcp-server . docker run -d -p 8000:8000 -e PROM_BASE_URL=http://prometheus:9090 prometheus-mcp-server

Documentation

License: MIT License
Updated 7/30/2025