Skip to main content
Glama
mateusdata

prometheus-mcp-server

by mateusdata
README.md
# prometheus-mcp-server

![Prometheus MCP Server](images/prometheus-mcp-server.jpg)

A Model Context Protocol (MCP) server for interacting with Prometheus metrics and data.

TypeScript-based MCP server implementing a Prometheus API interface. Bridges Claude and your Prometheus server via MCP.

## Features

- Instant and range PromQL queries
- Series and label discovery
- Metric metadata access
- Scrape target info
- Alerts, rules, and status endpoints

## Installation

```bash
npm install -g prometheus-mcp-server
# or
npm install prometheus-mcp-server
# or
npx prometheus-mcp-server
```

## Usage


```bash
npm install
npm run build
npm start
```

Set the `PROMETHEUS_HOST` environment variable to your Prometheus instance URL.

Example Claude Desktop config:

```json
{
  "mcpServers": {
    "prometheus-mcp-server": {
      "command": "npx prometheus-mcp-server",
      "env": {
        "PROMETHEUS_HOST": "http://your-prometheus-instance:9090"
      }
    }
  }
}
```

## Functions

- `mcp__instant_query`
- `mcp__range_query`
- `mcp__get_series`
- `mcp__get_label_values`
- `mcp__get_metadata`
- `mcp__get_targets`
- `mcp__get_alerts`
- `mcp__get_rules`
- `mcp__get_status`

TDQS

B3.2/5.0

Scored across 10 tools

Disambiguation5/5

Every tool has a clearly distinct purpose targeting specific Prometheus resources or query types, with no overlapping functionality. For example, get-alerts retrieves alerts, get-series finds series by labels, and instant-query versus range-query handle different query modes, making misselection unlikely.

Naming Consistency4/5

The naming follows a consistent verb_noun pattern with 'get-' or query-type prefixes for most tools, making them predictable. However, 'context-prometheus' deviates slightly by using a noun_verb structure and being in Portuguese, which breaks the pattern but is still understandable.

Tool Count5/5

With 10 tools, this is well-scoped for a Prometheus server, covering key operations like queries, metadata, alerts, rules, and status without being overwhelming. Each tool serves a distinct and necessary function in monitoring and data retrieval.

Completeness4/5

The toolset provides comprehensive coverage for querying, monitoring, and status checks in Prometheus, including instant and range queries, alerts, rules, and targets. A minor gap exists in management operations like configuration changes or data deletion, but core workflows are fully supported.

Maintenance

ActivityInactive
ResponsivenessNo issues