tjhop avatar

Prometheus MCP Server

tjhop/prometheus-mcp-server

Wraps the entire Prometheus HTTP API for metrics querying, alerting, configuration management, and TSDB operations. You get instant queries, range queries, series lookups, label exploration, metadata inspection, alert and rule management, plus target discovery details all through MCP tools. It includes optional TSDB admin endpoints for deleting series and creating snapshots if you explicitly enable them with a flag. The server also bundles Prometheus documentation search so your LLM can reference best practices on metric naming or query syntax. Built in Go, supports TOON encoding for token efficiency, and lets you truncate API responses to control context size. Ideal when you need an LLM to investigate slow queries, analyze high cardinality metrics, suggest recording rules, or generate PromQL on the fly.

GitHub stars
48
tools
30
transport
STDIO
last updated
Apr 25, 2026

Tools

30 tools

Public tool metadata for what this MCP can expose to an agent.

alertmanagersGet overview of Prometheus Alertmanager discovery

Get overview of Prometheus Alertmanager discovery

No parameter schema in public metadata yet.

build_infoGet Prometheus build information

Get Prometheus build information

No parameter schema in public metadata yet.

configGet Prometheus configuration

Get Prometheus configuration

No parameter schema in public metadata yet.

docs_listList of Official Prometheus Documentation Files

List of Official Prometheus Documentation Files

No parameter schema in public metadata yet.

docs_readRead the named markdown file containing official Prometheus documentation from the prometheus/docs repo

Read the named markdown file containing official Prometheus documentation from the prometheus/docs repo

No parameter schema in public metadata yet.

docs_searchSearch the markdown files containing official Prometheus documentation from the prometheus/docs repo

Search the markdown files containing official Prometheus documentation from the prometheus/docs repo

No parameter schema in public metadata yet.

exemplar_queryPerforms a query for exemplars by the given query and time range

Performs a query for exemplars by the given query and time range

No parameter schema in public metadata yet.

flagsGet runtime flags

Get runtime flags

No parameter schema in public metadata yet.

healthyManagement API endpoint that can be used to check Prometheus health

Management API endpoint that can be used to check Prometheus health

No parameter schema in public metadata yet.

label_namesReturns the unique label names present in the block in sorted order by given time range and matchers

Returns the unique label names present in the block in sorted order by given time range and matchers

No parameter schema in public metadata yet.

label_valuesPerforms a query for the values of the given label, time range and matchers

Performs a query for the values of the given label, time range and matchers

No parameter schema in public metadata yet.

list_alertsList all active alerts

List all active alerts

No parameter schema in public metadata yet.

list_rulesList all alerting and recording rules that are loaded

List all alerting and recording rules that are loaded

No parameter schema in public metadata yet.

list_targetsGet overview of Prometheus target discovery

Get overview of Prometheus target discovery

No parameter schema in public metadata yet.

metric_metadataReturns metadata about metrics currently scraped by the metric name

Returns metadata about metrics currently scraped by the metric name

No parameter schema in public metadata yet.

queryExecute an instant query against the Prometheus datasource, returning one value per series at a single point in time

Execute an instant query against the Prometheus datasource, returning one value per series at a single point in time

No parameter schema in public metadata yet.

quitManagement API endpoint that can be used to trigger a graceful shutdown of Prometheus

Management API endpoint that can be used to trigger a graceful shutdown of Prometheus

No parameter schema in public metadata yet.

range_queryExecute a range query against the Prometheus datasource, returning values over a time window

Execute a range query against the Prometheus datasource, returning values over a time window

No parameter schema in public metadata yet.

readyManagement API endpoint that can be used to check Prometheus is ready to serve traffic (i.e. respond to queries

Management API endpoint that can be used to check Prometheus is ready to serve traffic (i.e. respond to queries

No parameter schema in public metadata yet.

reloadManagement API endpoint that can be used to trigger a reload of the Prometheus configuration and rule files

Management API endpoint that can be used to trigger a reload of the Prometheus configuration and rule files

No parameter schema in public metadata yet.

runbooks_listList the runbooks embedded in this server: guided workflows (Agent Skills) for common Prometheus tasks

List the runbooks embedded in this server: guided workflows (Agent Skills) for common Prometheus tasks

No parameter schema in public metadata yet.

runbooks_readRead the named runbook by skill name (e.g. `check-system-health`)

Read the named runbook by skill name (e.g. `check-system-health`)

No parameter schema in public metadata yet.

runtime_infoGet Prometheus runtime information

Get Prometheus runtime information

No parameter schema in public metadata yet.

seriesFinds series by label matchers

Finds series by label matchers

No parameter schema in public metadata yet.

targets_metadataReturns metadata about metrics currently scraped by the target

Returns metadata about metrics currently scraped by the target

No parameter schema in public metadata yet.

tsdb_statsGet usage and cardinality statistics from the TSDB

Get usage and cardinality statistics from the TSDB

No parameter schema in public metadata yet.

wal_replay_statusGet current WAL replay status

Get current WAL replay status

No parameter schema in public metadata yet.

clean_tombstonesRemoves the deleted data from disk and cleans up the existing tombstones

Removes the deleted data from disk and cleans up the existing tombstones

No parameter schema in public metadata yet.

delete_seriesdeletes data for a selection of series in a time range

deletes data for a selection of series in a time range

No parameter schema in public metadata yet.

snapshotcreates a snapshot of all current data into snapshots/<datetime>-<rand> under the TSDB's data directory and returns the directory as response

creates a snapshot of all current data into snapshots/<datetime>-<rand> under the TSDB's data directory and returns the directory as response

No parameter schema in public metadata yet.

Sponsors

Readme

Prometheus MCP Server

license golangci-lint Latest Release GitHub Downloads (all assets, all releases)

Prometheus MCP Server Logo

About

This is an MCP server to allow LLMs to interact with a running Prometheus instance via the API to do things like generate and execute promql queries, list and analyze metrics, etc.

Demos and Examples

Asking Claude to Investigate Slow Queries

The prompt used was:

querying my metrics is slow, can you help me figure out why?


View the full README on GitHub

Details

Repository
github.com/tjhop/prometheus-mcp-server
Website
github.com/tjhop/prometheus-mcp-server
Category
Monitoring & Observability
Package
ghcr.io/tjhop/prometheus-mcp-server:0.18.0
Transport
STDIO
Registry
MCP registry, active

Related Monitoring & Observability MCP servers

View all
1agent-analytics avatarAgent Analyticsagent-analytics/agent-analytics-mcpAnalytics your AI agent can actually use. Track, experiment, and optimize via MCP.0stars
2dailyaiagents-cpu avatarGitignore Drift Monitordailyaiagents-cpu/dailyai-osWatcher — count uncommitted files in repo, surface dominant drift class. YELLOW >100, RED >250.0stars
3mdfifty50-boop avatarTrace Forgemdfifty50-boop/trace-forge-mcpStructured execution trace and span logging for AI agents0stars
4srotzin avatarHive Sla Monitorsrotzin/hive-mcp-sla-monitorService level agreement monitoring for the Hive agent fleet0stars
5vola-trebla avatarNdjson Local Log Triage Mcpvola-trebla/ndjson-local-log-triage-mcpStreams NDJSON log triage: query patterns, detect anomalies, summarize timelines without full load.0stars
6davidfuchs avatarMCP Server for Uptime Kumadavidfuchs/mcp-uptime-kumaManage your Uptime Kuma 2 instance from an LLM: monitors, status pages, notifications, maintenance70stars