Prometheus MCP Server

Prometheus MCP Server

A Model Context Protocol server that enables AI assistants to query Prometheus metrics, discover available data, and analyze system performance through natural language interactions.

Category
Visit Server

README

Prometheus MCP Server

npm version License: MIT

A Model Context Protocol (MCP) server that provides seamless integration with Prometheus, enabling AI assistants to query metrics, discover available data, and analyze system performance through natural language interactions.

Features

  • Real-time Metrics Access - Query current and historical metrics data
  • Metrics Discovery - Find available metrics and monitoring targets
  • Multiple Auth Methods - Basic auth, bearer tokens, and TLS support
  • Type-safe - Full TypeScript implementation

MCP Configuration

Using npx (Recommended)

Add to your MCP client settings:

{
  "mcpServers": {
    "prometheus": {
      "command": "npx",
      "args": ["prometheus-mcp-server"],
      "env": {
        "PROMETHEUS_URL": "http://localhost:9090"
      }
    }
  }
}

Using global installation

First install the package globally:

npm install -g prometheus-mcp-server

Then configure your MCP client:

{
  "mcpServers": {
    "prometheus": {
      "command": "prometheus-mcp-server",
      "env": {
        "PROMETHEUS_URL": "http://localhost:9090"
      }
    }
  }
}

Environment Variables

# Required
PROMETHEUS_URL=http://localhost:9090

# Optional Authentication
PROMETHEUS_USERNAME=admin
PROMETHEUS_PASSWORD=password
PROMETHEUS_TOKEN=bearer-token

# Optional Connection
PROMETHEUS_TIMEOUT=10000
PROMETHEUS_INSECURE=false

Available Tools

Tool Description Use Case
prom_query Execute PromQL instant query Get current metric values, alerts status
prom_range Execute PromQL range query Analyze trends, create graphs, historical data
prom_discover Discover available metrics Explore what metrics are available in your system
prom_metadata Get metric metadata Understand metric types, descriptions, and units
prom_targets Get scrape targets info Monitor scraping health and service discovery

Example Usage

Ask your AI assistant natural language questions:

  • "What's the current CPU usage across all servers?"
  • "Show me HTTP request rates for the last 6 hours"
  • "Which services have the highest memory consumption?"
  • "Are there any failing health checks?"
  • "What metrics are available for monitoring my database?"

Development

# Run with inspector
npm run inspector

# Run directly
npm run dev

Connection Methods

1. No Authentication

export PROMETHEUS_URL=http://localhost:9090

2. Basic Authentication

export PROMETHEUS_URL=http://localhost:9090
export PROMETHEUS_USERNAME=admin
export PROMETHEUS_PASSWORD=secret

3. Bearer Token

export PROMETHEUS_URL=https://prometheus.example.com:9090
export PROMETHEUS_TOKEN=your-bearer-token

Additional Options

For self-signed certificates or development:

export PROMETHEUS_INSECURE=true

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured