mcp-server-prometheus

  • Monitoring
JavaScript
MIT
3
  • Apple
A
security – no known vulnerabilities (report Issue)
A
license - permissive license (MIT)
A
quality - confirmed to work

MCP server for interacting with Prometheus metrics and data.

  1. Tools
  2. Prompts
  3. Resources
  4. Server Configuration
  5. README.md

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PROMETHEUS_URLYesThe base URL of your Prometheus instance
PROMETHEUS_PASSWORDNoPassword for basic authentication, if required
PROMETHEUS_USERNAMENoUsername for basic authentication, if required
README.md

mcp-server-prometheus

MCP server for interacting with Prometheus metrics and data.

This is a TypeScript-based MCP server that implements a Prometheus API interface. It provides a bridge between Claude and your Prometheus server through the Model Context Protocol (MCP).

<a href="https://glama.ai/mcp/servers/y7b3qba8jy"><img width="380" height="200" src="https://glama.ai/mcp/servers/y7b3qba8jy/badge" alt="mcp-server-prometheus MCP server" /></a>

Demo

demo

Features

Resources

  • List and access Prometheus metric schema
  • Each metric resource provides:
    • Metric name and description
    • Detailed metadata from Prometheus
    • Statistical information (count, min, max)
  • JSON mime type for structured data access

Current Capabilities

  • List all available Prometheus metrics with descriptions
  • Read detailed metric information including:
    • Metadata and help text
    • Current statistical data (count, min, max values)
  • Basic authentication support for secured Prometheus instances

Configuration

The server requires the following environment variable:

  • PROMETHEUS_URL: The base URL of your Prometheus instance

Optional authentication configuration:

  • PROMETHEUS_USERNAME: Username for basic auth (if required)
  • PROMETHEUS_PASSWORD: Password for basic auth (if required)

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "mcp-server-prometheus": { "command": "/path/to/mcp-server-prometheus/build/index.js", "env": { "PROMETHEUS_URL": "http://your-prometheus-instance:9090" } } } }

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

API Structure

The server exposes Prometheus metrics through the following URI structure:

  • Base URI: http://your-prometheus-instance:9090
  • Metric URIs: http://your-prometheus-instance:9090/metrics/{metric_name}

Each metric resource returns JSON data containing:

  • Metric name
  • Metadata (help text, type)
  • Current statistics (count, min, max)

GitHub Badge

Glama performs regular codebase and documentation scans to:

  • Confirm that the MCP server is working as expected.
  • Confirm that there are no obvious security issues with dependencies of the server.
  • Extract server characteristics such as tools, resources, prompts, and required parameters.

Our directory badge helps users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.

Copy the following code to your README.md file:

Alternative MCP servers

  • A
    security
    F
    license
    A
    quality
    Helps AI read GitHub repository structure and important files. Want to quickly understand what a repo is about? Prompt it with "read https://github.com/adhikasp/mcp-git-ingest and determine how the code technically works".
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that provides read and write access to Airtable databases. This server enables LLMs to inspect database schemas, then read and write records.
    MIT
  • A
    security
    A
    license
    A
    quality
    An MCP server that provides access to PubMed articles through the Entrez API.
    MIT
    • Apple