freshcrate
Skin:/
Home > MCP Servers > prometheus-mcp-server

prometheus-mcp-server

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

Why this rank:Strong adoptionRelease freshnessHealthy release cadence

Description

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

README

Prometheus MCP Server

GitHub Container Registry Helm Chart GitHub Release Codecov Python License

Give AI assistants the power to query your Prometheus metrics.

A Model Context Protocol (MCP) server that provides access to your Prometheus metrics and queries through standardized MCP interfaces, allowing AI assistants to execute PromQL queries and analyze your metrics data.

Getting Started

Prerequisites

  • Prometheus server accessible from your environment
  • MCP-compatible client (Claude Desktop, VS Code, Cursor, Windsurf, etc.)

Installation Methods

Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "prometheus": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "PROMETHEUS_URL",
        "ghcr.io/pab1it0/prometheus-mcp-server:latest"
      ],
      "env": {
        "PROMETHEUS_URL": "<your-prometheus-url>"
      }
    }
  }
}
Claude Code

Install via the Claude Code CLI:

claude mcp add prometheus --env PROMETHEUS_URL=http://your-prometheus:9090 -- docker run -i --rm -e PROMETHEUS_URL ghcr.io/pab1it0/prometheus-mcp-server:latest
VS Code / Cursor / Windsurf

Add to your MCP settings in the respective IDE:

{
  "prometheus": {
    "command": "docker",
    "args": [
      "run",
      "-i",
      "--rm",
      "-e",
      "PROMETHEUS_URL",
      "ghcr.io/pab1it0/prometheus-mcp-server:latest"
    ],
    "env": {
      "PROMETHEUS_URL": "<your-prometheus-url>"
    }
  }
}
Docker Desktop

The easiest way to run the Prometheus MCP server is through Docker Desktop:

Add to Docker Desktop
  • Via MCP Catalog: Visit the Prometheus MCP Server on Docker Hub and click the button above

  • Via MCP Toolkit: Use Docker Desktop's MCP Toolkit extension to discover and install the server

  • Configure your connection using environment variables (see Configuration Options below)

  • Manual Docker Setup

    Run directly with Docker:

    # With environment variables
    docker run -i --rm \
      -e PROMETHEUS_URL="http://your-prometheus:9090" \
      ghcr.io/pab1it0/prometheus-mcp-server:latest
    
    # With authentication
    docker run -i --rm \
      -e PROMETHEUS_URL="http://your-prometheus:9090" \
      -e PROMETHEUS_USERNAME="admin" \
      -e PROMETHEUS_PASSWORD="password" \
      ghcr.io/pab1it0/prometheus-mcp-server:latest
    Helm Chart (Kubernetes)

    Deploy to Kubernetes using the Helm chart from the OCI registry:

    helm install prometheus-mcp-server \
      oci://ghcr.io/pab1it0/charts/prometheus-mcp-server \
      --version 1.0.0 \
      --set prometheus.url="http://prometheus:9090"

    With authentication:

    helm install prometheus-mcp-server \
      oci://ghcr.io/pab1it0/charts/prometheus-mcp-server \
      --version 1.0.0 \
      --set prometheus.url="http://prometheus:9090" \
      --set auth.username="admin" \
      --set auth.password="secret"

    With a custom values file:

    helm install prometheus-mcp-server \
      oci://ghcr.io/pab1it0/charts/prometheus-mcp-server \
      --version 1.0.0 \
      -f values.yaml

    See the chart values for all available configuration options.

    Configuration Options

    Variable Description Required
    PROMETHEUS_URL URL of your Prometheus server Yes
    PROMETHEUS_URL_SSL_VERIFY Set to False to disable SSL verification No
    PROMETHEUS_DISABLE_LINKS Set to True to disable Prometheus UI links in query results (saves context tokens) No
    PROMETHEUS_REQUEST_TIMEOUT Request timeout in seconds to prevent hanging requests (DDoS protection) No (default: 30)
    PROMETHEUS_USERNAME Username for basic authentication No
    PROMETHEUS_PASSWORD Password for basic authentication No
    PROMETHEUS_TOKEN Bearer token for authentication No
    PROMETHEUS_CLIENT_CERT Path to client certificate file for mutual TLS authentication No
    PROMETHEUS_CLIENT_KEY Path to client private key file for mutual TLS authentication No
    REQUESTS_CA_BUNDLE Path to CA bundle file for verifying the server's TLS certificate (standard requests library env var) No
    ORG_ID Organization ID for multi-tenant setups No
    PROMETHEUS_MCP_SERVER_TRANSPORT Transport mode (stdio, http, sse) No (default: stdio)
    PROMETHEUS_MCP_BIND_HOST Host for HTTP transport No (default: 127.0.0.1)
    PROMETHEUS_MCP_BIND_PORT Port for HTTP transport No (default: 8080)
    PROMETHEUS_CUSTOM_HEADERS Custom headers as JSON string No
    TOOL_PREFIX Prefix for all tool names (e.g., staging results in staging_execute_query). Useful for running multiple instances targeting different environments in Cursor No

    Available Tools

    Tool Category Description
    health_check System Health check endpoint for container monitoring and status verification
    execute_query Query Execute a PromQL instant query against Prometheus
    execute_range_query Query Execute a PromQL range query with start time, end time, and step interval
    list_metrics Discovery List all available metrics in Prometheus with pagination and filtering support
    get_metric_metadata Discovery Get metadata for one metric or bulk metadata with optional filtering
    get_targets Discovery Get information about all scrape targets

    The list of tools is configurable, so you can choose which tools you want to make available to the MCP client. This is useful if you don't use certain functionality or if you don't want to take up too much of the context window.

    Features

    • Execute PromQL queries against Prometheus
    • Discover and explore metrics
      • List available metrics
      • Get metadata for specific metrics
      • Search metric metadata by name or description in a single call
      • View instant query results
      • View range query results with different step intervals
    • Authentication support
      • Basic auth from environment variables
      • Bearer token auth from environment variables
    • Docker containerization support
    • Provide interactive tools for AI assistants

    Development

    Contributions are welcome! Please see our Contributing Guide for detailed information on how to get started, coding standards, and the pull request process.

    This project uses uv to manage dependencies. Install uv following the instructions for your platform:

    curl -LsSf https://astral.sh/uv/install.sh | sh

    You can then create a virtual environment and install the dependencies with:

    uv venv
    source .venv/bin/activate  # On Unix/macOS
    .venv\Scripts\activate     # On Windows
    uv pip install -e .

    Testing

    The project includes a comprehensive test suite that ensures functionality and helps prevent regressions.

    Run the tests with pytest:

    # Install development dependencies
    uv pip install -e ".[dev]"
    
    # Run the tests
    pytest
    
    # Run with coverage report
    pytest --cov=src --cov-report=term-missing

    When adding new features, please also add corresponding tests.

    License

    MIT


    Release History

    VersionChangesUrgencyDate
    v1.6.1## What's Changed * feat: add Helm chart with OCI registry publishing by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/138 * chore(deps): upgrade MCP Python SDK to 1.26.0 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/139 * docs: add README for Helm chart by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/140 * chore(deps): bump pyjwt from 2.10.1 to 2.12.0 by @dependabot[bot] in https://github.com/pab1it0/prometheus-mcp-server/pull/142 High5/1/2026
    v1.6.0## What's Changed * docs: refactor README for better user experience by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/125 * feat: add bulk metric metadata retrieval with filtering and pagination by @Yb2411 in https://github.com/pab1it0/prometheus-mcp-server/pull/130 * fix: upgrade to FastMCP 3.x and fix CI test failures by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/135 * feat: add mutual TLS (client certificate) authentication support by @freeformz Low3/7/2026
    v1.5.3## What's Changed * Apply latest MCP registry changes by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/113 * feat: add TOOL_PREFIX env var for multi-instance support by @bmonsalvatge-alpaca in https://github.com/pab1it0/prometheus-mcp-server/pull/115 * Add configurable timeout to all Prometheus HTTP requests to prevent resource exhaustion by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/109 * chore: bump version to 1.5.3 by @pab1it0 in https://github.com/pLow1/21/2026
    v1.5.2**Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.5.1...v1.5.2Low12/17/2025
    v1.5.1## What's Changed * feature: custom headers passing for each prometheus request. by @akhromium in https://github.com/pab1it0/prometheus-mcp-server/pull/106 * Update contributing guidelines to industry standard by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/107 * Remove image build from CI pipeline by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/108 ## New Contributors * @akhromium made their first contribution in https://github.com/pab1it0/prometheus-mLow11/22/2025
    v1.5.0## What's Changed * Update get_metric_metadata by @mjnchen in https://github.com/pab1it0/prometheus-mcp-server/pull/97 * Upgrade MCP SDK to v1.21.0 and Add Pagination Support by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/105 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.4.6...v1.5.0Low11/8/2025
    v1.4.6## What's Changed * chore: update MCP publisher installation and bump to v1.4.6 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/102 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.4.5...v1.4.6Low10/28/2025
    v1.4.5## What's Changed * fix: update MCP registry OCI package format and bump to v1.4.5 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/101 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.4.4...v1.4.5Low10/28/2025
    v1.4.4## What's Changed * chore: bump version to 1.4.3 and add version sync workflow by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/94 * fix(server): prevent ctx from being exposed as a tool argument by @teriyakichild in https://github.com/pab1it0/prometheus-mcp-server/pull/95 * fix: remove Claude Code automated review workflow by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/99 * feature: add PROMETHEUS_DISABLE_LINKS config option by @cce in https://github.coLow10/28/2025
    v1.4.3**Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.4.2...v1.4.3Low10/25/2025
    v1.4.2## What's Changed * fix: enable Claude Code Review for forked PRs and revert mcp-publisher by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/86 * fix: update Claude Code action permissions and version for OIDC authentication by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/88 * Adding SSL_VERIFY Option for Prometheus URL by @ChandanShastri in https://github.com/pab1it0/prometheus-mcp-server/pull/84 * chore: add tasks/ directory to .gitignore and remove todoLow10/25/2025
    v1.4.1## What's Changed * Fix MCP Publisher Schema Version Error by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/83 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.4.0...v1.4.1Low10/24/2025
    v1.4.0## What's Changed * feat: add MCP 2025 spec features by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/81 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.3.2...v1.4.0Low10/22/2025
    v1.3.2## What's Changed * fix: update mcp-publisher to v1.2.3 and correct websiteUrl by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/78 * ref #66 proper fix of get_metric_metadata by @mjnchen in https://github.com/pab1it0/prometheus-mcp-server/pull/79 * chore: add workflow permissions by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/80 ## New Contributors * @mjnchen made their first contribution in https://github.com/pab1it0/prometheus-mcp-server/pull/79 **FuLow10/14/2025
    v1.3.1## What's Changed * fix: correct get_metric_metadata to return data instead of data['metadata'] by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/76 * chore: update server.json to MCP schema 2025-09-29 and bump to v1.3.1 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/77 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.3.0...v1.3.1Low10/2/2025
    v1.3.0## What's Changed * fix: update MCP Publisher workflow to use official CLI tool by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/74 * feat: bump to v1.3.0 - adding MCP registry deployment by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/75 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.2.11...v1.3.0Low9/21/2025
    v1.2.11## What's Changed * chore: bump version to 1.2.11 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/73 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.2.10...v1.2.11Low9/20/2025
    v1.2.8## What's Changed * Release v1.2.7 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/69 * Release v1.2.8 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/70 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.2.7...v1.2.8Low9/20/2025
    v1.2.6## What's Changed * feat: configure MCP registry with GitHub authentication and Docker validation by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/65 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.2.4...v1.2.6Low9/11/2025
    v1.2.4## What's Changed * feat: Add Trivy security scanning and fix critical vulnerabilities by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/56 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.2.3...v1.2.4Low8/27/2025
    v1.2.3Release v1.2.3Low8/26/2025
    v1.2.2## What's Changed * fix: Refactor parameter validation using DRY principle by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/52 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.2.1...v1.2.2Low8/25/2025
    v1.2.1## What's Changed * Missing docs on mcp server configuration by @chensxb97 in https://github.com/pab1it0/prometheus-mcp-server/pull/48 * Fix claude-review workflow OIDC token permissions by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/49 * 🤖 Add Comprehensive GitHub Workflow Automation for Issue Triage by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/50 * feat: Add pagination support to Prometheus MCP server by @pab1it0 in https://github.com/pab1it0/Low8/25/2025
    v1.2.0## 📋 Full Changelog - Add support for HTTP/SSE/stdio transport modes (#42) - @chensxb97 - Enhanced MCP server configuration with environment variables - Upgraded FastMCP to 2.11.3 - Improved error handling and validation - Added comprehensive unit testsLow8/22/2025
    v1.1.3## What's Changed * Remove non-functional health check from Dockerfile by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/36 * Bump version to 1.1.3 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/37 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.1.2...v1.1.3Low7/15/2025
    v1.1.2## What's Changed * Fix list_metrics error with list response handling by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/34 * Bump version to 1.1.2 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/35 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.1.1...v1.1.2Low7/14/2025
    v1.1.1## What's Changed * Update README to use Docker-only configuration and bump version to 1.1.1 by @pab1it0 in https://github.com/pab1it0/prometheus-mcp-server/pull/28 **Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.1.0...v1.1.1Low6/23/2025
    v1.1.0**Full Changelog**: https://github.com/pab1it0/prometheus-mcp-server/compare/v1.0.7...v1.1.0Low6/21/2025
    v1.0.7Release v1.0.7Low6/21/2025
    v1.0.6## What's Changed * Add toolhive docs by @therealnb in https://github.com/pab1it0/prometheus-mcp-server/pull/23 * Structured logging changes by @cjmatta in https://github.com/pab1it0/prometheus-mcp-server/pull/24 ## New Contributors * @therealnb made their first contribution in https://github.com/pab1it0/prometheus-mcp-server/pull/23 * @cjmatta made their first contribution in https://github.com/pab1it0/prometheus-mcp-server/pull/24 **Full Changelog**: https://github.com/pab1it0/prometLow6/21/2025
    v1.0.4Release v1.0.4Low6/1/2025
    v1.0.3Release v1.0.3Low5/8/2025
    1.0.0Release 1.0.0Low5/5/2025

    Dependencies & License Audit

    Loading dependencies...

    Similar Packages

    scraper-mcp🌐 Streamline web scraping with Scraper MCP, a server that optimizes content for AI by filtering data and reducing token usage for LLMs.main@2026-06-05
    tekmetric-mcp🔍 Ask questions about your shop data in natural language and get instant answers about appointments, customers, and repair orders with Tekmetric MCP.main@2026-06-05
    agentic-codingAgentic Coding Rules, Templates etc...main@2026-06-05
    asya-chat-uiBuild multi-organization LLM chat platforms with model routing, tool execution, usage analytics, and OpenAI-compatible APIs.main@2026-06-05
    basic-memoryAI conversations that actually remember. Never re-explain your project to your AI again. Join our Discord: https://discord.gg/tyvKNccgqNv0.21.6

    More in MCP Servers

    claude-plugins-officialOfficial, Anthropic-managed directory of high quality Claude Code Plugins.
    langchain4jLangChain4j is an open-source Java library that simplifies the integration of LLMs into Java applications through a unified API, providing access to popular LLMs and vector databases. It makes impleme
    hyperframesWrite HTML. Render video. Built for agents.
    claude-code-guideClaude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks go from beginner to power user!