← Back to search

io.github.pab1it0/prometheus-mcp-server

pab1it0 Scanned 23h ago

MCP server for Prometheus, enabling AI assistants to query metrics and monitor system health

C
72 / 100

Versions

1.2.6latest
first seen Jun 5, 2026
PermissionsTool SafetyAuthAnnotationsCode QualityStabilitySpecVuln HistoryAuthorTransparencyCommunity

Tools 6

get_metric_metadata
annotations: none low

Get metadata for one metric or bulk metadata for all metrics. Args: metric: Optional metric name. If provided, returns legacy list format. filter_pattern: Optional substring filter on metric name and descriptions. limit: Maximum number of metrics to return in bulk mode. offset: Number of metrics to skip in bulk mode. Returns: If metric is provided: list of metadata entries for that metric. If metric is not provided: dict with filtered metadata and pagination info.

limit string metric string offset int filter_pattern string
health_check
annotations: none low

Return health status of the MCP server and Prometheus connection. Returns: Health status including service information, configuration, and connectivity

execute_query
annotations: none low

Execute an instant query against Prometheus. Args: query: PromQL query string time: Optional RFC3339 or Unix timestamp (default: current time) Returns: Query result with type (vector, matrix, scalar, string) and values

time string query str
execute_range_query
annotations: none low

Execute a range query against Prometheus. Args: query: PromQL query string start: Start time as RFC3339 or Unix timestamp end: End time as RFC3339 or Unix timestamp step: Query resolution step width (e.g., '15s', '1m', '1h') Returns: Range query result with type (usually matrix) and values over time

ctx string end str step str query str start str
list_metrics
annotations: none low

Retrieve a list of all metric names available in Prometheus. Args: limit: Maximum number of metrics to return (default: all metrics) offset: Number of metrics to skip for pagination (default: 0) filter_pattern: Optional substring to filter metric names (case-insensitive) refresh_cache: Force a cache refresh to pick up newly scraped metrics (default: False) Returns: Dictionary containing: - metrics: List of metric names - total_count: Total number of metrics (before pagination) - returned_count: Number of metrics returned - offset: Current offset - has_more: Whether more metrics are available

ctx string limit string offset int refresh_cache bool filter_pattern string
get_targets
annotations: none low

Get information about Prometheus scrape targets. Args: state: Which targets to request from Prometheus - "active" (default), "dropped", or "any". This is applied server-side by Prometheus. scrape_pool: Optional scrape pool name to restrict results to, applied server-side by Prometheus. limit: Maximum number of targets to return per category (default: all) offset: Number of targets to skip for pagination (default: 0) Returns: Dictionary containing: - activeTargets / droppedTargets: Target lists (after pagination) - total_active / total_dropped: Totals before pagination - returned_active / returned_dropped: Counts actually returned - offset: Current offset - has_more: Whether more targets are available - state: The state filter that was applied Note: The default is "active" rather than "any" deliberately. On a cluster of any size, service discovery finds far more targets than relabeling keeps, and each dropped target carries its full discoveredLabels map. Requesting dropped targets unfiltered can produce a response large enough to exhaust the server's memory before any pagination could be applied, since the whole payload is parsed first. Pass state="any" or "dropped" explicitly when you need them, ideally with scrape_pool.

limit string state str offset int scrape_pool string

Permissions 4

network medium
Server uses network capabilities via: requests, urllib
filesystem low
Server uses filesystem capabilities via: os, pathlib, tempfile
shell high
Server uses shell capabilities via: subprocess
env_vars low
Server uses env_vars capabilities via: os.environ

Scan Findings 29

low
Tool 'health_check' has no annotations annotation_checker · 100%
low
Tool 'execute_query' has no annotations annotation_checker · 100%
low
Tool 'execute_range_query' has no annotations annotation_checker · 100%
low
Tool 'list_metrics' has no annotations annotation_checker · 100%
low
Tool 'get_metric_metadata' has no annotations annotation_checker · 100%
low
Tool 'get_targets' has no annotations annotation_checker · 100%
info
Sandbox failed to start for behavioral verification behavioral_verifier · 100%
medium
Vulnerable dependency: fastmcp@3.1.0 (GHSA-m8x7-r2rg-vh5g) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.1.0 (GHSA-rww4-4w9c-7733) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.1.0 (GHSA-vv7q-7jx5-f767) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.1.0 (PYSEC-2026-2475) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.1.0 (PYSEC-2026-2476) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.1.0 (PYSEC-2026-338) dependency_analyzer · 95%
info
pyproject.toml metadata manifest_parser · 100%
info
Tool: health_check manifest_parser · 90%
info
Tool: execute_query manifest_parser · 90%
info
Tool: execute_range_query manifest_parser · 90%
info
Tool: list_metrics manifest_parser · 90%
info
Tool: get_metric_metadata manifest_parser · 90%
info
Tool: get_targets manifest_parser · 90%
info
Required env vars (16) manifest_parser · 80%
info
Sandbox failed to start for output poisoning scan output_poisoning · 100%
medium
Permission: network access detected permission_analyzer · 90%
low
Permission: filesystem access detected permission_analyzer · 70%
high
Permission: shell access detected permission_analyzer · 95%
low
Permission: env_vars access detected permission_analyzer · 90%
info
No dependency files found for SBOM generation sbom_generator · 100%
high
Hardcoded Password found in pab1it0-prometheus-mcp-server-4885f27/README.md secret_scanner · 65%
medium
No build provenance detected (SLSA L0) slsa_assessor · 90%