
Prometheus MCP Server
io.github.prometheusPublished by GitHub account prometheusv0.19.0-rc.0Updated Nov 3, 2026
An API-complete MCP server to manage Prometheus-compatible backends.
The publisher's own server: Prometheus MCP
Overview
Prometheus's local MCP server; no sign-in required; STDIO.
No AI overview yet: these facts come from the registry entry and the server itself.
Installation
In SourceWeft
- Open Prometheus MCP Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Prometheus MCP Server
[license] [golangci-lint] [Latest Release] [GitHub Downloads (all assets, all releases)]
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?
[Demo prompt to ask claude to investigate slow queries]
Investigate metrics produced by the MCP server itself and suggest recording rules for SLOs
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
[Demo prompt to investigate metrics produced by the MCP server and create rules for SLOs]
Summarize Prometheus metric/label naming best practices
The prompt used was:
summarize prometheus metric/label name best practices
[Demo prompt to summarize prometheus metric and label name best practies]
Report on the health of the Prometheus instance that powers prometheus.demo.prometheus.io
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
[Demo prompt to review the health of the demo.prometheus.io prometheus instance]
Tools
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.
LLMs and Token/Context Efficiency
This MCP server supports the following options which have the potential to reduce token/context usage:
TOON Encoding
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.
API Response Truncation
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.
Full Tool List
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 Sets
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_infoseries
Runbooks (Agent Skills) and Prompts
The 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:
- Tools: the model can discover and read them itself via the
runbooks_list/runbooks_readtools when a request matches a runbook's purpose. Tools are the most portable path and work in every MCP client. - Skill resources: per the SEP-2640 skills extension draft, each runbook is a
skill://<name>/SKILL.mdresource, enumerated by the well-knownskill://index.jsondiscovery index, and the server declares theio.modelcontextprotocol/skillsextension capability. Skill-aware hosts can consume these like local filesystem skills; other clients can still read them as ordinary MCP resources. - MCP prompts: each runbook is also registered as an MCP prompt under its skill name (e.g.
check-system-health,optimize-high-cardinality), so clients with prompt support can invoke a guided workflow directly (often surfaced as slash commands).
Prometheus Compatible Backends
There are many Prometheus compatible backends that can be used to extend prometheus in a variety of ways, often with the goals of offering long term storage or query aggregation from multiple prometheus instances. Some examples can be found in the Remote Storage of prometheus' docs.
Many of those services also offer a "prometheus compatible" API that can be used to query/interact with the data using native promQL. In general, this MCP server should at a minimum work for other prometheus API compatible services to execute queries and interact with the series/labels/metadata endpoints for metric and label discovery. Beyond that, there may be API differences as the different systems implement different parts/extensions of the API for their needs.
Examples:
- Thanos does not use a centralized config, so the config endpoint is not implemented and thus the config tool is removed.
- Mimir and Cortex implement extra endpoints to manage/add/remove rules
To workaround this and provide a better experience on some of the commonly used Prometheus compatible systems, this project may add direct support for select systems to provide different/more tools.
Choosing a specific prometheus backend implementation can be done with the --prometheus.backend flag.
The list of available backend implementations on a given release of the MCP server can be found in the output of the --help flag.
Qualifications and support criteria are still under consideration, please open an issue to request support/features for a specific backend for further discussion.
Prometheus Backend Implementation Differences
Resources
Installation and Usage
This MCP server is most useful when fully integrated with tooling and/or installed as a tool server with another system. Installation procedures and integration support will vary depending on the tools being used. For example:
- some systems can only interact with MCP tools and not resources/prompts
- some systems use mcp.json config file format to manage MCP servers and some require custom formats
- some systems don't speak MCP directly and require tools like mcp-to-openapi to proxy
Please check the documentation for the tool being used/integrated for specific instructions and level of support.
Transports
The server speaks MCP over stdio (the default) or HTTP (--mcp.transport=http, served at /mcp on the web listen address).
MCP protocol revisions 2024-11-05 through 2026-07-28 are supported, and the client chooses which one to use.
Over HTTP, only the Streamable HTTP transport is served; the older HTTP+SSE transport is not.
The HTTP transport is stateless: each request is handled on its own and no session is tracked, so replicas can sit behind any load balancer without session affinity. What follows from that:
- Only
POSTis served. The standaloneGETstream some clients open answers405 Method Not Allowed, which is harmless: everything the server sends rides the response to a request. - Keepalive pings (
--mcp.keepalive-interval) are only sent onstdio; there is no session to ping over HTTP. - A client that disconnects mid-call cancels the in-flight Prometheus query on current MCP revisions; older clients' calls run to completion.
--mcp.session-timeoutis deprecated and ignored.
--mcp.enable-client-logging forwards the log lines tool handlers emit to the client as MCP log notifications, in addition to the normal log output.
MCP has deprecated this feature. It keeps working during the deprecation window, but what a client receives is up to the client: newer clients must ask for a log level, and older clients over HTTP get info and above.
Binary
Download a release appropriate for your system from the Releases page. The commands below are for v0.19.0 and later; see the upgrade note below for earlier releases. Please see Flags for more information on the available flags and their corresponding environment variables.
Upgrading from v0.18.0 or earlier: as of v0.19.0 the binary is named prometheus-mcp (previously prometheus-mcp-server), and its environment variables use the PROMETHEUS_MCP_ prefix instead of PROMETHEUS_MCP_SERVER_.
The old variable names are ignored without an error, so rename them when you upgrade.
Docker
Please see Flags for more information on the available flags and their corresponding environment variables.
Helm Chart (Kubernetes)
A Helm chart is available for deploying to Kubernetes. The chart is published as an OCI artifact on each release.
See the chart README for the full list of configuration values and examples.
Kubernetes (Raw Manifests)
If you prefer deploying without Helm, example Kubernetes manifests are available:
Tarball with Systemd
Download the latest release tarball for your system from the Releases page. Tarballs include the binary and a Systemd service file.
The unit runs the HTTP transport on :8080 against the default --prometheus.url (http://127.0.0.1:9090); set other flags through their environment variables in the override, for example Environment=PROMETHEUS_MCP_PROMETHEUS_URL=https://prometheus.example.com:9090.
Note: As of v0.19.0, releases no longer include system packages (deb, rpm, or Arch Linux .pkg.tar.zst); use the tarball instead.
Packages for v0.18.0 and earlier remain available on their release pages.
Security and Authentication
Connecting to Secure Prometheus Instances
The MCP server supports Prometheus HTTP config files to connect to secured Prometheus instances.
An example config can be found in the examples folder here.
Use the --http.config command-line flag to provide an HTTP configuration file.
If the file cannot be read or is invalid, the server exits at startup instead of falling back to an unauthenticated client.
Please see Flags for more information.
Forwarding Client Credentials
When using the HTTP transport, the MCP server forwards the Authorization header on each MCP request to Prometheus for that request's API calls.
Requests that carry no Authorization header, and all requests over the stdio transport, use the default client built from flags (see Connecting to Secure Prometheus Instances).
The server forwards client credentials to Prometheus as-is and does not validate them.
A credential that does not include an auth scheme is sent as a Bearer token.
Anyone who can reach the MCP endpoint can query Prometheus with at least the default client's credentials, so restrict access to the endpoint with a web configuration file or network-level controls.
Note that basic authentication in the web configuration file (basic_auth_users) conflicts with credential forwarding: the same Authorization header a client uses to authenticate to the MCP server is then forwarded to Prometheus in place of the default client's credentials.
TLS-only web configurations do not use the Authorization header and are unaffected.
Securing the MCP Server Endpoints
The MCP server supports Prometheus Web Configuration files files to expose it's endpoints behind optional basic auth and custom TLS configs.
Use the --web.config.file command-line flag to provide an HTTP configuration file.
Please see Flags for more information.
Telemetry
Health Endpoints
The web server exposes health endpoints on the configured listen address, following the /-/healthy and /-/ready convention used across the Prometheus ecosystem:
These map directly onto Kubernetes liveness/readiness probes. The prom_mcp_server_ready metric reports the same readiness state.
Metrics
Once running, the server exposes Prometheus metrics on the configured listen address and telemetry path (:8080/metrics, by default).
Please see Flags for more information on how to change the listening interface, port, or telemetry path.
Prometheus MCP Server Metrics
Grafana Dashboard
A pre-built Grafana dashboard is included in the grafana/ directory for visualizing the metrics exposed by the MCP server. Import the dashboard json into grafana and it should be ready to go.
Logs
This project makes heavy use of structured, leveled logging. Please see Flags for more information on how to set the log format, level, and optional file.
The MCP go-sdk logs through a logger of its own: its warnings and errors show at the default level, and its per-request session bookkeeping only with --log.level=debug.
Development
Development Environment with Devbox + Direnv
If you use Devbox and Direnv, then simply entering the directory for the repo should set up the needed software.
Local LLM with Ollama
See mcp.json for an example MCP config for use with tooling.
Requires ollama to be installed.
NOTE:
To override the default LLM (
ollama:gpt-oss:20b), runexport OLLAMA_MODEL="ollama:your_model"to override it before runningmake.
Using MCP Inspector and a local ollama instance:
Requires MCP Inpsector to be installed:
Using mcphost and a local ollama instance:
Requires mcphost to be installed:
Gemini with gemini-cli
See settings.json for an example config file to run gemini-cli with prometheus-mcp.
Requires gemini-cli to be installed.
Using `gemini-cli` and hosted models:
Manual Setup
Required software:
- Working Go environment
- Docker for local tests/linting/image building/etc
- GNU Make
- ollama
- mcp inspector
- mcphost
Building
This project uses the standard Prometheus build tooling: promu
driven through Makefile / Makefile.common. The binary embeds a pinned
snapshot of prometheus/docs, which the build targets download and extract
automatically (the pin lives in DOCS_VERSION in the Makefile).
Project-specific helper targets (helm packaging and the local LLM client
integrations) are listed by make help:
Command Line Flags
The available command line flags are documented in the help flag:
Source: README.md at commit b34d04d
Tools
0Version history
1- v0.19.0-rc.0LatestNov 3, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Prometheus integrations
Prometheus MCP
sv.prometheusOfficial publisher
A remote MCP endpoint from Prometheus that lets an AI assistant search, rate and review programming guides on a knowledge network for agents and creators.

Prometheus MCP Server
Published by GitHub account tjhop
MCP server that lets an assistant query and inspect a Prometheus-compatible backend: PromQL queries, labels, series, rules, alerts, targets and docs.

Prometheus MCP Server
Published by GitHub account pab1it0
Connects an AI assistant to a Prometheus server so it can run PromQL instant and range queries and explore available metrics and scrape targets.

Prometheus Mcp
Published by GitHub account mshegolev
Read-only MCP server that lets an assistant query a Prometheus instance with PromQL, list metrics, inspect active alerts and check scrape targets.

Mcp Prometheus
Published by GitHub account jeanlopezxyz
A local MCP server that connects an assistant to Prometheus so it can run PromQL queries and diagnose Kubernetes/OpenShift cluster health.