Prometheus

MCP server that executes PromQL against Prometheus for instant, range queries and metric discovery
  • go

3

GitHub Stars

go

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "freepik-company-prometheus-mcp": {
      "command": "./bin/prometheus-mcp",
      "args": [
        "-config",
        "config.yaml"
      ]
    }
  }
}

You run a production-ready MCP server that exposes Prometheus metrics through the MCP protocol, letting you execute PromQL queries, retrieve metric data, and monitor Prometheus-backed systems directly from AI assistants and automation workflows. This MCP server provides secure authentication, multi-tenant awareness, and a straightforward transport layer for both local (stdio) and remote (HTTP) clients.

How to use

You interact with the Prometheus MCP server by starting it in stdio mode for local clients or in HTTP mode for remote clients. In stdio mode, you launch the server with a configuration file and then connect using a compatible MCP client in the same environment. In HTTP mode, you connect through your remote MCP client that supports HTTP transport. The server translates your MCP requests into Prometheus queries and returns structured results, enabling you to query instant metrics, perform range queries, and list available metrics.

How to install

# 1) Prerequisites
# Ensure you have Go 1.24+ and a Prometheus server you can reach

# 2) Build the server (stdio mode)
# Run from the repository root after cloning
make build

# 3) Prepare a config file for Prometheus MCP
# See the example in the Prometheus MCP configuration section below

# 4) Start the server in stdio mode
./bin/prometheus-mcp -config config.yaml

Prometheus MCP configuration

Configure how the MCP server connects to Prometheus and handles authentication and multi-tenant routing. The configuration below demonstrates a basic setup using an inline YAML snippet that you place in a file named config.yaml.

server:
  name: "prometheus-mcp"
  version: "1.0.0"
  transport:
    type: "stdio"  # use "http" for remote clients

prometheus:
  url: "http://localhost:9090"
  timeout: "30s"

Security and multi-tenant notes

The server supports enterprise authentication options and multi-tenant isolation. You can enable HTTP Basic authentication or Bearer Token authentication and optionally assign an org identifier via X-Scope-OrgId to scope queries to a tenant. For production deployments, consider placing a JWT/IDP validating proxy in front of the MCP server to offload validation, logging, and enrichment.

Getting started with local development

Follow these steps to run the MCP server locally and connect with a local or integrated client.

# 1) Build the server
make build

# 2) Create a configuration file (config.yaml) with Prometheus connection details
# See the example in the configuration section above

# 3) Run in stdio mode for local clients
./bin/prometheus-mcp -config config.yaml

Example client capabilities

The server exposes a set of MCP tools that enable you to query Prometheus in different ways. You can execute instant queries, request range data, and list metrics directly through MCP endpoints.

Available tools

prometheus_query

Execute an instant PromQL query against Prometheus. Provide a query string and optional time to evaluate the query.

prometheus_range_query

Execute a PromQL range query against Prometheus. Provide a query string, start time, end time, and an optional step.

prometheus_list_metrics

List all available metrics from Prometheus to understand what data is exposed by your Prometheus instance.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational