An API-complete MCP server to manage Prometheus-compatible backends via comprehensive tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

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.
The prompt used was:
querying my metrics is slow, can you help me figure out why?
The prompt used was:
use the tools from the prometheus mcp server to investigate the metrics from the mcp server and suggest prometheus recording rules for SLOs
The prompt used was:
summarize prometheus metric/label name best practices
The prompt used was:
please provide a comprehensive review and summary of the prometheus server. review it's configuration, flags, runtime/build info, and anything else that you feel may provide insight into the status of the prometheus instance, including analyzing metrics and executing queries
The Prometheus HTTP API outputs JSON data, and the tools in this MCP server return that JSON to the LLM for processing as it's structured and well understood by LLMs.
This MCP server supports the following options which have the potential to reduce token/context usage:
If token/context usage is a concern, this MCP server also supports converting the API's JSON data to the Token-Oriented Object Notation (TOON) format. While it is not guaranteed to reduce token usage, it is designed with token efficiency in mind. As noted on TOON's documentation, it excels at uniform arrays of objects; non-uniform/complex objects may still be more token-efficient in JSON. Real world token usage will depend on usage patterns, please review common workflows to determine if TOON output may be beneficial. Please see Flags for more information on the available flags and their corresponding environment variables.
This feature allows you to set a maximum limit on the number of lines or entries returned from the Prometheus API for, which can help in reducing the amount of data sent to the LLM.
Setting the limit to 0 disables truncation.
Truncation is disabled by default.
Note that LLMs capable of handling tool request arguments can override this global truncation limit on a per-tool-call basis for supported tools.
Please see Flags for more information on the available flags and their corresponding environment variables.
| Tool Name | Description |
|---|---|
alertmanagers | Get overview of Prometheus Alertmanager discovery |
build_info | Get Prometheus build information |
config | Get Prometheus configuration |
docs_list | List of Official Prometheus Documentation Files |
docs_read | Read the named markdown file containing official Prometheus documentation from the prometheus/docs repo |
docs_search | Search the markdown files containing official Prometheus documentation from the prometheus/docs repo |
exemplar_query | Performs a query for exemplars by the given query and time range |
flags | Get runtime flags |
healthy | Management API endpoint that can be used to check Prometheus health |
label_names | Returns the unique label names present in the block in sorted order by given time range and matchers |
label_values | Performs a query for the values of the given label, time range and matchers |
list_alerts | List all active alerts |
list_rules | List all alerting and recording rules that are loaded |
list_targets | Get overview of Prometheus target discovery |
metric_metadata | Returns metadata about metrics currently scraped by the metric name |
query | Execute an instant query against the Prometheus datasource, returning one value per series at a single point in time |
quit | Management API endpoint that can be used to trigger a graceful shutdown of Prometheus |
range_query | Execute a range query against the Prometheus datasource, returning values over a time window |
ready | Management API endpoint that can be used to check Prometheus is ready to serve traffic (i.e. respond to queries |
reload | Management API endpoint that can be used to trigger a reload of the Prometheus configuration and rule files |
runbooks_list | List the runbooks embedded in this server: guided workflows (Agent Skills) for common Prometheus tasks |
runbooks_read | Read the named runbook by skill name (e.g. check-system-health) |
runtime_info | Get Prometheus runtime information |
series | Finds series by label matchers |
targets_metadata | Returns metadata about metrics currently scraped by the target |
tsdb_stats | Get usage and cardinality statistics from the TSDB |
wal_replay_status | Get current WAL replay status |
NOTE:
Because the TSDB Admin API endpoints allow for potentially destructive operations like deleting data, they are not enabled by default. In order to enable the TSDB Admin API endpoints, the MCP server must be started with the flag
--dangerous.enable-tsdb-admin-toolsto acknowledge the associated risk these endpoints carry.
| Tool Name | Description |
|---|---|
clean_tombstones | Removes the deleted data from disk and cleans up the existing tombstones |
delete_series | deletes data for a selection of series in a time range |
snapshot | creates a snapshot of all current data into snapshots/- under the TSDB's data directory and returns the directory as response |
The server exposes many tools to interact with Prometheus. There are tools to interact with Prometheus via the API, as well as additional tools to do things like read documentation, etc. By default, they are all registered and available for use (TSDB Admin API tools need an extra flag).
To be considerate to LLMs with smaller context windows, it's possible to pass in a whitelist of specific tools to register with the server.
The following 'core' tools are always loaded: [docs_list, docs_read, docs_search, runbooks_list, runbooks_read, query, range_query, metric_metadata, label_names, label_values, series].
Additional tools can be specified with the --mcp.tools flag.
For example, the command line:
Would result in the following tools being loaded:
build_infodocs_listdocs_readdocs_searchflagslabel_nameslabel_valuesmetric_metadataqueryrange_queryrunbooks_listrunbooks_readruntime_infoseriesThe server embeds a set of runbooks: guided workflows for common Prometheus tasks, expressed in terms of the server's tools. Each runbook orients the model on the relevant tools, then suggests topics to explore with example queries rather than prescribing a fixed sequence of steps. Runbooks cover tasks like system health checks, missing-data triage, error-rate investigation, high-cardinality optimization, recording/alerting rule review, and configuration/performance tuning.
Each runbook is packaged as a full Agent Skill: a directory containing a SKILL.md with name/description frontmatter.
Runbooks are exposed three ways:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/prometheus-mcp-server)<a href="https://allmcps.com/mcp/prometheus-mcp-server"><img src="https://allmcps.com/api/badge/prometheus-mcp-server?style=directory" alt="Prometheus MCP Server on AllMCPs" /></a>