Cover image
Try Now
2024-12-19

MCP server for interacting with Prometheus

3 years

Works with Finder

1

Github Watches

4

Github Forks

14

Github Stars

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).

mcp-server-prometheus MCP server

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)

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • momi
  • Provides initial medical assessments and advice.

  • WILLIAM JOEL FOTEPING
  • Friendly music guide for 60s-2000s songs, with links to listen online.

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • oatpp
  • Anthropic’s Model Context Protocol implementation for Oat++

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

  • justmywyw
  • Short and sweet example MCP server / client implementation for Tools, Resources and Prompts.

    Reviews

    5 (1)
    Avatar
    user_aPPbCgM4
    2025-04-17

    I have been using mcp-server-prometheus by loglmhq and it has significantly improved my server monitoring capabilities. The integration with Prometheus is seamless and the metrics provided are detailed and insightful. Highly recommend checking it out at their GitHub page!