Skip to main content
Glama
Prometheus Safe MCP

Prometheus Safe MCP

by bgauger

Prometheus Safe MCP

一个专注的、只读的 MCP 服务器,用于有界的 Prometheus 即时查询、活动告警和目标健康状态。Alpha: 测试使用合成的 HTTP 响应;与真实 Prometheus 版本的兼容性尚未认证。

安装与运行

需要 Python 3.11+ 和 uv。

uv sync --extra test
export PROMETHEUS_SAFE_URL=https://prometheus.example.invalid
uv run prometheus-safe-mcp

该进程通过 stdio 使用 MCP 协议通信。它不会加载 .env;.env.example 仅作为文档。请配置只读、网络受限的 Prometheus 端点的 URL。

Related MCP server: Prometheus MCP Server

安全性

所有工具均使用 HTTP GET。查询长度、HTTP 持续时间/字节数以及返回的目标数量均设有上限。配置会拒绝 URL 凭据、查询、片段和非 HTTP 协议。审计记录包含操作类别,而非 PromQL 文本或响应体。这不能替代上游的身份验证、授权或出口策略。请参阅安全设计。

验证

uv run --extra test pytest
uv run python -m compileall -q src tests
uv build

MIT © 2026 Ben Gauger。

Available Tools

3 tools
active_alertsD
NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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?

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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

prometheus_queryD
NameRequiredDescriptionDefault
queryYes

Output Schema

NameRequiredDescription

No output parameters

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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?

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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

target_healthD
NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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?

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedactive_alerts
    • First observedprometheus_query
    • First observedtarget_health

TDQS

C2/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a clearly distinct aspect of Prometheus: querying metrics, listing active alerts, and checking target health. There is no functional overlap between them, making tool selection unambiguous.

Naming Consistency5/5

All three tool names follow a consistent snake_case convention with a noun-like pattern (prometheus_query, active_alerts, target_health). The names are predictable and reflect their purpose without mixing conventions.

Tool Count4/5

Three tools is a lean but reasonable count for a minimal Prometheus integration, covering the most common read-only operations. It feels slightly thin for a full-featured server but is appropriate for a focused purpose.

Completeness3/5

The surface covers core operations (query, alerts, health) but lacks obvious complementary features like range queries, alert rule management, or metric metadata retrieval. Agents may need to work around these gaps for more complex workflows.

Maintenance

ActivityStale
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to query Prometheus metrics, monitor alerts, and analyze system health through read-only access to your Prometheus server with built-in query safety and optional AI-powered metric analysis.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to execute PromQL queries and discover metrics across multiple Prometheus tenants using the Model Context Protocol. It supports single and multi-tenant configurations with secure authentication for instant and range query analysis.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides access to Prometheus metrics and queries, allowing AI assistants to execute PromQL queries and analyze metrics data through standardized MCP interfaces.
    MIT