Prometheus MCP Server

Query Prometheus metrics and execute PromQL via standardized MCP interfaces.

Data last scanned today · Reviewed yesterday

456 tools501PythonMIT

Overview

This server facilitates communication between AI assistants and Prometheus instances, enabling users to perform PromQL queries directly from their development environments. It supports integration with various MCP-compatible clients including Claude Desktop, VS Code, and Cursor. Installation is streamlined through Docker containers, allowing users to define their Prometheus URL as an environment variable within their client configurations. The server provides a bridge for AI to interpret and analyze metric data from your monitoring infrastructure.

Our verdict

With a security score of 30/100, this tool is classified as high-risk. A major concern is the total lack of authentication, meaning any process with access to the configuration can interact with your Prometheus instance. Additionally, there is no read-only mode to constrain the server's reach. Given these risks, this should only be utilized in isolated, low-stakes development environments where the Prometheus instance does not hold sensitive or production-critical data.

  • Zero direct dependencies reduce the supply-chain surface
  • Active repository with recent commits
  • Supported by seventeen contributors
  • Distributes via GHCR and Helm
  • No authentication methods implemented
  • Lacks support for OAuth
  • Community-maintained without official vendor support
  • Lacks read-only mode for query restriction

Tools

ToolDescriptionRisk
health_checkHealth check endpoint for container monitoring and status verificationlow
execute_queryExecute a PromQL instant query against Prometheuslow
execute_range_queryExecute a PromQL range query with start time, end time, and step intervallow
list_metricsList all available metrics in Prometheus with pagination and filtering supportlow
get_metric_metadataGet metadata for one metric or bulk metadata with optional filteringlow
get_targetsGet information about all scrape targetslow

Compatibility

ClientLocalDockerRemoteRead-only
ChatGPT
Claude Desktop
Cursor
VS Code
Windsurf

Frequently asked questions

What are the core prerequisites to use this server?

You need a Prometheus server that is accessible from your environment and an MCP-compatible client such as Claude Desktop, VS Code, Cursor, or Windsurf.

How can I authenticate with my Prometheus instance?

The server supports basic authentication using the PROMETHEUS_USERNAME and PROMETHEUS_PASSWORD environment variables, as well as bearer tokens via PROMETHEUS_TOKEN. For mutual TLS, you can provide paths to your client certificate and private key using PROMETHEUS_CLIENT_CERT and PROMETHEUS_CLIENT_KEY.

Is it possible to reduce the number of tokens used in AI responses?

Yes, you can set the environment variable PROMETHEUS_DISABLE_LINKS to True to prevent the inclusion of Prometheus UI links in query results.

How do I prevent the server from hanging on slow queries?

You can configure the PROMETHEUS_REQUEST_TIMEOUT environment variable to specify a timeout in seconds, which defaults to 30 seconds.

Can I disable SSL verification for my Prometheus connection?

Yes, you can disable SSL verification by setting the PROMETHEUS_URL_SSL_VERIFY environment variable to False.

Alternatives

Changelog

Badge

Prometheus MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.