Skip to main content
Glama
etruong42

Prometheus MCP

by etruong42

Prometheus MCP

Proof-of-concept Prometheus MCP server.

Prerequisites

Install uv: https://docs.astral.sh/uv/getting-started/installation/

Using uv, you can also install python.

Related MCP server: Scenario Word

How to run

Clone this repo.

Update the .env file

uv add "mcp[cli]" pillow google-auth matplotlib requests python-dotenv

Integrating with Claude

You can run the server with

uv --directory "/directory/to/prometheus-mcp" run server.py

So you may add this MCP server to your Claude MCP server configuration

{
  "mcpServers": {
      "Prometheus MCP": {
          "command": "/path/to/uv",
          "args": [
              "--directory",
              "/directory/to/prometheus-mcp",
              "run",
              "server.py"
          ]
      }
  }
}

See MCP Quickstart for more details for Claude specific instructions.

Demo

Demo gif

Link to shared Claude chat in demo

Available Tools

2 tools
prometheus_alert_rulesB

Query the Prometheus /rules API. Returns a list of alerting and recording rules that are currently loaded. In addition it returns the currently active alerts fired by the Prometheus instance of each alerting rule.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It returns currently loaded rules and active alert, implying a read operation, but does not explicitly state read-only behavior or disclose permissions, rate limits, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with no extraneous information. The first sentence immediately states the API endpoint, and subsequent sentences clarify the return content. Efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no parameters and no output schema, the description adequately explains what the tool does (returns rules and active alerts). It lacks details on pagination or response structure, but for a simple list tool, it is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, and schema coverage is 100%. The description adds no parameter info, which is acceptable given no parameters exist. Baseline for 0-param tools is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it queries the Prometheus /rules API and returns a list of alerting/recording rules and active alerts. The verb 'Query' and resource 'Prometheus /rules' are specific, but it doesn't explicitly differentiate from the sibling tool 'prometheus_query_range', though the functionality is distinct enough.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., prometheus_query_range). No mention of prerequisites or limitations such as authentication requirements or data freshness.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

prometheus_query_rangeA
Query Prometheus /query_range API endpoint and return
an image of a plot of the time series monitoring data.
Use this tool whenever the user asks about the status
of their compute infrastructure.
ParametersJSON Schema
NameRequiredDescriptionDefault
stepYes
queryYes
end_timeYes
start_timeYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses that the tool returns an image, which is a key behavior. However, it omits details like whether the operation is read-only, rate limits, or required permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with core purpose, no redundancy. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (4 required params, no schema descriptions, no output schema), the description is too sparse. It does not clarify parameter format, return image type, error handling, or how the tool integrates with the sibling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description does not explain any of the four required parameters (query, start_time, end_time, step). Even though 0 parameters have descriptions, the description fails to compensate, offering no semantic guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries the Prometheus /query_range API and returns an image plot. It explicitly distinguishes itself from the sibling prometheus_alert_rules by focusing on time series data and plots.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear usage context: 'Use this tool whenever the user asks about the status of their compute infrastructure.' While it doesn't explicitly exclude alternatives, it gives direct guidance on when to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation5/5

The two tools target completely different aspects: one retrieves alert and recording rules, the other queries time series data and returns a plot. There is no overlap in functionality, making selection unambiguous.

Naming Consistency4/5

Both tools share the 'prometheus_' prefix and follow snake_case. One uses a noun phrase ('alert_rules') and the other a verb-noun phrase ('query_range'), which is a minor inconsistency but still predictable and descriptive.

Tool Count2/5

With only 2 tools for a complex system like Prometheus, the server is severely under-scoped. Many essential operations (e.g., listing metrics, instant queries, target discovery) are missing, limiting its usefulness.

Completeness2/5

The server covers only alert rules and range queries with plots, leaving out critical Prometheus capabilities such as instant queries, metric metadata, targets, or alert management beyond listing rules. Agents cannot perform basic monitoring workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    An MCP server that enables Large Language Models to retrieve, analyze, and query metric data from Prometheus databases through pre-defined routes.
    34
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A customizable Model Context Protocol server built with mcp-framework that enables Claude to access external tools and capabilities through a standardized interface.
    88
  • A
    license
    B
    quality
    F
    maintenance
    A Model Context Protocol server that enables AI assistants to query Prometheus metrics, discover available data, and analyze system performance through natural language interactions.
    5
    85
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/etruong42/prometheus-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server