NewAgent Observability is live.
Back to directory
Prometheus logo

Prometheus MCP server: 28 tools at 85 tokens each

The leanest tool definitions measured here, a nine-tool core profile, and the five default tools that can stop a server or delete series.

Connector
Official, self-hosted
Coverage
Instant and range queries, metadata, alerts, rules, targets, docs
Tools
28, all on by default
Biggest risk for an agent
The default list includes shutdown and delete tools

Last verified 1 September 2026 · from The Prometheus repository, its release binaries and the server's own tools/list response

This page is one of 90 in a directory of monitoring and developer tools. Each page checks what an AI coding agent can get out of the tool through its MCP server, the connector that lets the agent query the tool directly.

Summary

The Prometheus MCP server is official, transferred into the prometheus GitHub organization from its original author. A default connection registers 28 tools across queries, metadata, alerts, rules, targets and the Prometheus documentation.

No connector measured here carries more tools for fewer tokens. The definitions cost between 2,349 and 4,483 tokens, roughly 1.2% to 2.2% of a 200,000-token window. Descriptions average 71 characters, which is the reason.

The default list registers snapshot, delete_series, clean_tombstones, reload and quit, and quit triggers a graceful shutdown of Prometheus.

What is the Prometheus MCP server?

It is the Prometheus project's server for the Model Context Protocol. A connected agent can run PromQL, read metric metadata and inspect alerting rules without leaving the editor.

Two tools stand out from the rest. docs_search searches the markdown documentation from the prometheus/docs repository, so an agent can look up PromQL syntax from inside the same connection it queries with.

The server also carries a core profile of nine tools: docs_list, docs_read, docs_search, query, range_query, metric_metadata, label_names, label_values and series. Selecting it costs a fraction of an already small list.

Prometheus sits squarely in production observability and reaches nothing in code review, CI, agent observability or cost.

Part of the workWhat Prometheus has hereCan an agent reach it
Code, tests & reviewNoneNothing for code or review
CI & releaseNoneNo pipeline tools. Deployment shows up only as a change in a metric
Production observabilityMetrics, alerting rules, targets, service discoveryYes. Core strength for metrics. There are no logs and no traces, because Prometheus stores neither
Agent observability & evalsNoneNo traces, evaluations or prompt versioning for your own agents
AI cost managementNoneNo spend data. Any cost metric would have to be scraped in as a series

For an agent, that means Prometheus answers numeric questions about running systems and nothing else. It can find which series moved and when an alert fired. It has no logs to read and no trace to follow, so it pairs with a logs or tracing connector for an investigation.

What can an AI agent do with Prometheus?

TaskToolsWorksWatch out for
Ask what a metric is doingquery range_queryYesquery is an instant query; use range_query for a period
Find the right metric namemetric_metadata label_names label_values seriesYesLabel queries can be large on a high-cardinality series
Look up PromQL syntaxdocs_search docs_read docs_listYesDocumentation comes from the prometheus/docs repository, not your instance
See which alerts are firinglist_alerts list_rules alertmanagersYesAlert state is Prometheus's view, not Alertmanager's routing decision
Check whether scraping is healthylist_targets targets_metadata healthy readyYesA down target is often the real answer to a missing metric
Inspect the running configurationconfig flags runtime_info build_infoYesconfig returns the loaded file, which may include names you treat as sensitive
Read the logs behind a spikeOpenSearch, Elastic or GrafanaNo, separate serverPrometheus stores samples, never log lines

The core profile covers the first three rows with nine tools, so it is the cheaper starting point when metric work is all you need.

28 tools registered, all on by default; a `core` profile of nine is selectable

Querying3
queryrange_queryexemplar_query
Metadata4
metric_metadatalabel_nameslabel_valuesseries
Documentation3
docs_listdocs_readdocs_search
Alerting3
list_alertslist_rulesalertmanagers
Scraping2
list_targetstargets_metadata
Instance state8
configflagsruntime_infobuild_infotsdb_statswal_replay_statushealthyready
Administrative5Write
snapshotdelete_seriesclean_tombstonesreloadquit

Every group is present on a bare connection, including the administrative one. The core profile keeps only querying, metadata and documentation. Counted on 24 August 2026 from the released binary.

What connecting costs before the first question

A context window is the amount of text a model can hold at once, and connecting uses some of it before the agent asks anything. Every tool the server registers sends its name, description and input schema to the model when the session starts. The tool list is charged whether or not a single tool is called.

28 tools cost between 2,349 and 4,483 tokens, which is about 85 tokens per tool. That is the leanest ratio measured in this guide, and it holds across a mid-sized tool count rather than a tiny one.

Brevity is the reason. Descriptions average 71 characters and schemas average 255, against 3,271-character descriptions on the Weights & Biases server and 2,143-character schemas on Rootly's.

Tool setToolsTokens (GPT-5.6, GPT-5.5)Tokens (GPT-4, GPT-3.5)Tokens (Claude Haiku 4.5 to Opus 5)Share of a 200,000-token window
Every tool, as registered282,391 to 3,4642,349 to 3,4513,601 to 4,4831.2% to 2.2%

Encodings: GPT-5.6, GPT-5.5 o200k_base; GPT-4, GPT-3.5 cl100k_base; Claude Haiku 4.5 to Opus 5 count_tokens. Counted 24 August 2026 from tools/list on the released v0.18.0 macOS binary. It was run locally against the default target.

Registration is static, so no Prometheus instance answered. Figures cover name, description and input schema.

The two models in column one share the o200k_base encoding, so they get one count. The spread is formatting, about 47%. Reasoning tokens are output, spent per request. The tool list is input, charged once at connection.

The Claude figures are measured rather than encoded. Anthropic publishes no local tokenizer. So the definitions were sent to the API's count_tokens endpoint, and a no-tools baseline was subtracted. The range covers two tokenizer generations rather than two serializations. Haiku 4.5 and Opus 4.6 sit at the low end. Opus 5 and Sonnet 5 sit at the high end. The gap between them is about a quarter.

Prometheus MCP server limits: where answers come back incomplete

Two of the limits below are about what the server can do to Prometheus, and one is about what an empty result means.

The agent says: I have restarted it to pick up the config. `quit` does not restart anything.

reload and quit are both in the default 28. quit triggers a graceful shutdown, and nothing in the server brings Prometheus back.

Capturing the tool list with and without --dangerous.enable-tsdb-admin-tools returned the same names, so the flag gates execution rather than registration.

Guard: Run with --mcp.tools=core. The nine core tools do not include reload or quit.

The agent says: The error rate is zero. The target may have stopped being scraped.

A query against a series with no recent samples returns an empty result, which is what a healthy service also returns. list_targets distinguishes the two, and the agent has to be asked to check it.

Guard: Require the agent to report target health alongside any claim that a metric is at zero.

The agent says: The documentation says this metric is a counter. That came from the docs repository.

docs_search and docs_read read markdown from the prometheus/docs repository. metric_metadata reads your instance. The two can disagree about a metric your own exporters define.

Guard: Have the agent say whether a claim came from documentation or from metric_metadata.

How to configure Prometheus MCP for agents

  1. 1

    Start with --mcp.tools=core

    Nine tools cover querying, metadata and documentation, and leave the administrative group unregistered.

  2. 2

    Know what --dangerous.enable-tsdb-admin-tools does

    It gates execution of the TSDB admin endpoints. The tools are registered and visible either way. Capturing tools/list with and without it returned the same names.

  3. 3

    Point the server at the right instance

    --prometheus.url defaults to http://127.0.0.1:9090, so an unconfigured server silently targets a local Prometheus.

  4. 4

    Cap response size on wide queries

    --prometheus.truncation-limit bounds how many lines reach the model, which matters on high-cardinality series.

Paste this into your agent’s instructions

A PromQL answer looks exact, and an empty result from a down target looks identical to a genuine zero. The block makes the agent show the query.

Terminal
When you answer using Prometheus MCP tools, state:
- The exact PromQL you ran and the time range it covered.
- Whether you checked list_targets. A missing metric is often
  a target that stopped being scraped.
- Whether you called snapshot, delete_series, clean_tombstones,
  reload or quit. These change or stop the server.
Never state that data does not exist. State that no series
matched the query above.
Write your answer in ASD-STE100 Simplified Technical
English. Use short sentences with one idea in each.

Do you need the MCP server at all?

Yes, for metric work. At 2,349 tokens the tool definitions cost less than a single long query result, so the usual argument against connecting does not apply here.

The HTTP API remains the right choice inside a script or a dashboard, where a fixed query is repeated and no model is involved.

Grafana's server is the alternative when the question spans metrics, logs and dashboards, because Grafana reaches Prometheus as one datasource among several.

Connect this server for metric work. Reach for Grafana when the question crosses from metrics into logs.

Prometheus MCP server setup

Download the release binary for your platform from the v0.18.0 release, or install the .deb, .rpm or Arch package. There is nothing to configure for a local Prometheus on the default port.

The transport defaults to stdio. --mcp.transport=http serves the same tools over HTTP for a shared deployment.

Claude Code

No credentials appear here. The server reaches Prometheus over its HTTP API, which is unauthenticated by default.

The core profile is the cheaper starting point and leaves out the administrative tools.

Terminal
claude mcp add-json "prometheus" '{"command":
  "prometheus-mcp-server",
  "args":["--mcp.tools=core",
          "--prometheus.url=http://localhost:9090"]}'

Cursor

In ~/.cursor/mcp.json. Point --prometheus.url at the instance you mean.

Still no credentials: pass --http.config if your Prometheus sits behind basic auth or a bearer token.

Terminal
{"mcpServers":{"prometheus":{
  "command":"prometheus-mcp-server",
  "args":["--mcp.tools=core",
          "--prometheus.url=https://prom.internal"]}}}

Codex CLI

Codex reads TOML, so the JSON blocks above will not transfer. No credentials are needed for a local instance.

Terminal
[mcp_servers.prometheus]
command = "prometheus-mcp-server"
args = ["--mcp.tools=core",
        "--prometheus.url=http://localhost:9090"]

Every other client

Each block below is the configuration for one client, with the file path and the key that client expects.

Claude Desktop

macOS ~/Library/Application Support/Claude/claude_desktop_config.json. Windows %APPDATA%\Claude\claude_desktop_config.json. There is no CLI. Edit through Settings, Developer, Edit Config.

Quit and restart fully for changes to load. Paths in args must be absolute. Logs at ~/Library/Logs/Claude/mcp.log.

No credentials appear in the file. The server reaches Prometheus over its HTTP API, which is unauthenticated by default.

Terminal
{"mcpServers":{"prometheus":{"command":"prometheus-mcp-server",
  "args":["--mcp.tools=core","--prometheus.url=https://prom.internal"]}}}
Gemini CLI

~/.gemini/settings.json globally, or .gemini/settings.json per project. Key mcpServers. CLI: gemini mcp add.

No credentials appear in the file. The server reaches Prometheus over its HTTP API, which is unauthenticated by default.

Terminal
{"mcpServers":{"prometheus":{"command":"prometheus-mcp-server",
  "args":["--mcp.tools=core","--prometheus.url=https://prom.internal"]}}}
VS Code Copilot

.vscode/mcp.json per workspace, or your user profile. CLI: code --add-mcp.

No credentials appear in the file. The server reaches Prometheus over its HTTP API, which is unauthenticated by default.

Terminal
{"servers":{"prometheus":{"command":"prometheus-mcp-server",
  "args":["--mcp.tools=core","--prometheus.url=https://prom.internal"]}}}

The key is `servers`, not `mcpServers`. VS Code is the only client that uses that name, and copying a config from anywhere else fails silently.

Windsurf

~/.codeium/windsurf/mcp_config.json, which is the path Windsurf documents. Key mcpServers, the same JSON shape as Cursor, with no credential in the file.

Zed

~/.config/zed/settings.json, with no credential in the file, as in the blocks above.

The key is `context_servers`. Zed does not call them MCP servers in config, so searching its settings for mcp finds nothing.

Google Antigravity

~/.gemini/config/mcp_config.json globally, or .agents/mcp_config.json per project. Key mcpServers. There is no CLI. Use the /mcp overlay in the editor. Supports stdio, streamable HTTP, SSE and websocket.

No credentials appear in the file. The server reaches Prometheus over its HTTP API, which is unauthenticated by default.

Terminal
{"mcpServers":{"prometheus":{"command":"prometheus-mcp-server",
  "args":["--mcp.tools=core","--prometheus.url=https://prom.internal"]}}}
Amp (Sourcegraph)

~/.config/amp/settings.json or .amp/settings.json, with no credential in the file. The amp mcp CLI covers approve, doctor and oauth.

The key is `amp.mcpServers`, namespaced. A bare mcpServers block is ignored.

Cline

~/.cline/mcp.json per the docs. The source also reads ~/.cline/data/settings/cline_mcp_settings.json. Key mcpServers, standard JSON shape, with no credential in the file. Supports stdio, streamable HTTP and SSE.

Goose (Block)

~/.config/goose/config.yaml, with no credential in the file.

YAML, and servers are called `extensions`. Goose does not use the MCP vocabulary in config at all. Add one interactively with goose configure, or per session with goose session --with-extension.

Kiro (AWS)

.kiro/settings/mcp.json per workspace, or ~/.kiro/settings/mcp.json globally. Key mcpServers, standard JSON shape, with no credential in the file.

Warp

~/.warp/.mcp.json or .warp/.mcp.json. Key mcpServers, standard shape, with no credential in the file. Also addable through the /agent-add-mcp skill.

JetBrains Junie

.junie/mcp/mcp.json per project, or ~/.junie/mcp/mcp.json. Key mcpServers, with no credential in the file. Use /mcp in the CLI to manage.

Roo Code

.roo/mcp.json per project. The global file is mcp_settings.json, opened from the Roo Code MCP settings view with Edit Global MCP. Key mcpServers, with no credential in the file.

Continue

.continue/mcpServers/*.yaml, one file per server, with no credential in the file.

YAML, and `mcpServers` is a list, not an object. Every JSON client keys servers by name. Continue takes an array, so a converted config will not parse.

Trae

.trae/mcp.json per project, or paste into the UI under Raw Config (JSON). Key mcpServers, standard shape, with no credential in the file.

Devin

Devin has no config file to edit. Servers are added through a web form in the settings UI, and Devin's documentation states you do not need to write or paste JSON. The block below is the shape those fields describe, shown for reference. Neither route uses credentials.

Shared HTTP deployment

HTTP transport serves the same tools to anything that can reach the port, so treat the port itself as the boundary.

The server itself takes no credentials, which is exactly why the port matters.

Terminal
prometheus-mcp-server \
  --mcp.transport=http \
  --mcp.tools=core \
  --prometheus.url=https://prom.internal
Thanos backend

--prometheus.backend adjusts the toolset for an API-compatible backend. No credentials are involved unless the backend requires them.

Terminal
prometheus-mcp-server --prometheus.backend=thanos \
  --prometheus.url=https://thanos.internal

Read-only access, permissions and security

  • Five administrative tools are in the default list

    snapshot, delete_series, clean_tombstones, reload and quit are all registered on a bare connection.

  • quit shuts Prometheus down

    Its own description calls it a management endpoint that triggers a graceful shutdown.

  • delete_series writes tombstones

    Its description requires both a start and an end time specifically to prevent accidental deletion of all data.

  • The dangerous flag gates execution, not visibility

    Capturing tools/list with and without --dangerous.enable-tsdb-admin-tools returned the same 28 names, so a model sees the administrative tools either way.

  • config returns the loaded configuration

    Scrape configurations often name internal hosts and job labels you would not otherwise send to a model.

Troubleshooting

Every query returns nothing
The server defaults to http://127.0.0.1:9090. If your Prometheus is elsewhere, pass --prometheus.url or set PROMETHEUS_MCP_SERVER_PROMETHEUS_URL.
A metric that should exist is missing
Check list_targets before concluding anything. A target that stopped being scraped produces the same empty result as a metric that was never emitted.
A label query floods the context
High-cardinality labels return large lists. Set --prometheus.truncation-limit to bound how many entries reach the model.
Prometheus stopped
quit is registered by default and triggers a graceful shutdown. Run with --mcp.tools=core, which does not include it.

Prometheus MCP server: Reference

ItemValue
Statusv0.18.0, released 25 April 2026 · repository pushed 31 August 2026
Adoption88 stars · 20 forks · 19 releases · repository created 2 May 2025
LicenseApache-2.0
DistributionmacOS, Linux and Windows binaries, plus .deb, .rpm and Arch packages
AuthNone required. --http.config supplies Prometheus HTTP client options
Tools28, all on by default
Core profile9 tools, via --mcp.tools=core
Context cost2,349 to 4,483 tokens
BackendsPrometheus and Thanos, via --prometheus.backend

What engineers report

This is the Prometheus project's own server, with 19 releases since the repository was created on 2 May 2025. The counts below describe that repository, which changed hands and changed name.

What was checkedWhat it shows
Stars88
Last push31 August 2026
Latest releasev0.18.0, 25 April 2026
LicenseApache-2.0
Tools returned by tools/list28
Core profile9 tools
Average description71 characters per tool
Average schema size255 characters per tool

“I'm experiencing context overflow when calling list_rules because standard Kubernetes rule templates contain a very large number of elements. The response size exceeds the LLM's context window capacity.”

R-omk, GitHub issue, 2 April 2026 · Response size against the context window, on a still-open issue asking for truncation and filtering.

“There are no options to configure security access to the MCP server itself. This is especially important when running in SSE/HTTP transport modes.”

tjhop, GitHub issue, 11 August 2025 · Access control on the server, as distinct from the credentials it uses to reach Prometheus.

Repository facts from the GitHub API, retrieved 24 August 2026. The repository was transferred into the prometheus organization and now resolves to prometheus/prometheus-mcp; older links redirect. Tool counts come from the server's own tools/list response on the released binary.

Should you connect an agent to Prometheus?

Yes. Best for running with --mcp.tools=core unless you specifically need the administrative tools.

Strongest fit
Anyone running Prometheus who wants an agent to write PromQL against it without a browser.
Main advantage
The leanest cost per tool measured in this guide, with a nine-tool core profile that is cheaper still.
Main weakness
Metrics only. No logs and no traces, so an investigation needs a second connector.
Operational risk
Shutdown, reload and series deletion are registered on a bare connection, visible to the model either way.

From Oodle

One platform for agent traces and infrastructure

Agent traces usually sit in a different product from the rest of your telemetry, so when a slow database makes an agent slow the symptom is in one tool and the cause is in another. Oodle keeps both in one query surface, from $10 per million spans.

See agent observability

Frequently asked questions

How many tools does the Prometheus MCP server have?

28 on a bare connection, with a core profile of nine. Counted from the server's own tools/list response on the released v0.18.0 binary, on 24 August 2026.

What do the tool definitions cost?

Between 2,349 and 4,483 tokens, or 1.2% to 2.2% of a 200,000-token window. That is about 85 tokens per tool, the leanest ratio measured in this guide.

Can an agent shut Prometheus down?

The quit tool is registered by default and triggers a graceful shutdown. Running with --mcp.tools=core leaves it out.

Is it official?

Yes. The repository was transferred into the prometheus GitHub organization and is Apache-2.0 licensed.

Does it work with Thanos?

Yes. --prometheus.backend accepts thanos and adjusts the toolset for that API-compatible backend.

Changelog

  • 25 April 2026. prometheus/prometheus-mcp v0.18.0 released, the most recent version.
  • 25 June 2025. First release, v0.1.0.
  • 2 May 2025. prometheus/prometheus-mcp created on GitHub.

Sources

Every number on this page traces to one of these

  1. Repository facts from the GitHub API · prometheus/prometheus-mcp, retrieved 24 August 2026
  2. Flags, defaults and the core profile from the released binary's own help output
  3. Tool counts, descriptions and schema sizes from the server's own tools/list response

Prometheus’s own MCP documentation

Also production observability:

For logs behind a metric: