Allows to interact with Prometheus metrics and data, including listing and accessing metric schema, metadata, and statistical information (count, min, max values)
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).
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:
Build the server:
For development with auto-rebuild:
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
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP 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)
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
MCP server for interacting with Prometheus metrics and data.
Related MCP Servers
- -securityAlicense-qualityAn MCP server that enables Large Language Models to retrieve, analyze, and query metric data from Prometheus databases through pre-defined routes.Last updated -31MIT License
- -securityAlicense-qualityMarineTraffic MCP ServerLast updated -6MIT License
- -securityFlicense-qualityA tool that lets users access Prometheus metrics data through a Model Context Protocol server, supporting authentication options for secure data retrieval.Last updated -1
- JavaScriptMIT License