{
  "markdown": "# Prometheus MCP Server\n\n[![license](https://img.shields.io/github/license/tjhop/prometheus-mcp-server)](https://github.com/tjhop/prometheus-mcp-server/blob/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tjhop/prometheus-mcp-server)](https://goreportcard.com/report/github.com/tjhop/prometheus-mcp-server)\n[![golangci-lint](https://github.com/tjhop/prometheus-mcp-server/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/tjhop/prometheus-mcp-server/actions/workflows/golangci-lint.yml)\n[![Latest Release](https://img.shields.io/github/v/release/tjhop/prometheus-mcp-server)](https://github.com/tjhop/prometheus-mcp-server/releases/latest)\n[![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/tjhop/prometheus-mcp-server/total)](https://github.com/tjhop/prometheus-mcp-server/releases/latest)\n\n![Prometheus MCP Server Logo](images/logo-small.png)\n\n## About\nThis is an [MCP](https://modelcontextprotocol.io/introduction) server to allow LLMs to interact with a running [Prometheus](https://prometheus.io/) instance via the API to do things like generate and execute promql queries, list and analyze metrics, etc.\n\n### Demos and Examples\n\n#### Asking Claude to Investigate Slow Queries\n\nThe prompt used was:\n> querying my metrics is slow, can you help me figure out why? \n\n[![Demo prompt to ask claude to investigate slow queries](images/claude_high_cardinality.gif)](https://asciinema.org/a/8KxZgJxrXXX2zjwwDRSP4UtqL)\n\n#### Investigate metrics produced by the MCP server itself and suggest recording rules for SLOs\n\nThe prompt used was:\n> use the tools from the prometheus mcp server to investigate the metrics from\n> the mcp server and suggest prometheus recording rules for SLOs\n\n[![Demo prompt to investigate metrics produced by the MCP server and create rules for SLOs](images/gemini_slo.gif)](https://asciinema.org/a/av3WhfD122A1HHOq2d4SEZgMn)\n\n#### Summarize Prometheus metric/label naming best practices\n\nThe prompt used was:\n> summarize prometheus metric/label name best practices\n\n[![Demo prompt to summarize prometheus metric and label name best practies](images/gemini_docs_search.gif)](https://asciinema.org/a/o9RKpCXBmBmG4zqhuFsvTHf2C)\n\n#### Report on the health of the Prometheus instance that powers prometheus.demo.prometheus.io\n\nThe prompt used was:\n> please provide a comprehensive review and summary of the prometheus server.\n> review it's configuration, flags, runtime/build info, and anything else that\n> you feel may provide insight into the status of the prometheus instance,\n> including analyzing metrics and executing queries\n\n[![Demo prompt to review the health of the demo.prometheus.io prometheus instance](images/demo-usage-with-prometheus-demo-server.gif)](https://asciinema.org/a/733513)\n\n### Tools\n\nThe 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.\n\n#### LLMs and Token/Context Efficiency\n\nThis MCP server supports the following options which have the potential to reduce token/context usage:\n\n##### TOON Encoding\n\nIf 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](https://github.com/toon-format/toon).\nWhile it is not guaranteed to reduce token usage, it is designed with token efficiency in mind.\nAs noted on TOON's documentation, it excels at uniform arrays of objects; non-uniform/complex objects may still be more token-efficient in JSON.\nReal world token usage will depend on usage patterns, please review common workflows to determine if TOON output may be beneficial.\nPlease see [Flags](#command-line-flags) for more information on the available flags and their corresponding environment variables.\n\n##### API Response Truncation\n\nThis 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.\nSetting the limit to `0` disables truncation.\nTruncation is disabled by default.\nNote that LLMs capable of handling tool request arguments can override this global truncation limit on a per-tool-call basis for supported tools.\nPlease see [Flags](#command-line-flags) for more information on the available flags and their corresponding environment variables.\n\n#### Full Tool List\n\n| Tool Name | Description |\n| --- | --- |\n| `alertmanagers` | Get overview of Prometheus Alertmanager discovery |\n| `build_info` | Get Prometheus build information |\n| `config` | Get Prometheus configuration |\n| `docs_list` | List of Official Prometheus Documentation Files |\n| `docs_read` | Read the named markdown file containing official Prometheus documentation from the prometheus/docs repo |\n| `docs_search` | Search the markdown files containing official Prometheus documentation from the prometheus/docs repo |\n| `exemplar_query` | Performs a query for exemplars by the given query and time range |\n| `flags` | Get runtime flags |\n| `healthy` | Management API endpoint that can be used to check Prometheus health |\n| `label_names` | Returns the unique label names present in the block in sorted order by given time range and matchers |\n| `label_values` | Performs a query for the values of the given label, time range and matchers |\n| `list_alerts` | List all active alerts |\n| `list_rules` | List all alerting and recording rules that are loaded |\n| `list_targets` | Get overview of Prometheus target discovery |\n| `metric_metadata` | Returns metadata about metrics currently scraped by the metric name | \n| `query` | Execute an instant query against the Prometheus datasource, returning one value per series at a single point in time |\n| `quit` | Management API endpoint that can be used to trigger a graceful shutdown of Prometheus |\n| `range_query` | Execute a range query against the Prometheus datasource, returning values over a time window |\n| `ready` | Management API endpoint that can be used to check Prometheus is ready to serve traffic (i.e. respond to queries |\n| `reload` | Management API endpoint that can be used to trigger a reload of the Prometheus configuration and rule files |\n| `runbooks_list` | List the runbooks embedded in this server: guided workflows (Agent Skills) for common Prometheus tasks |\n| `runbooks_read` | Read the named runbook by skill name (e.g. `check-system-health`) |\n| `runtime_info` | Get Prometheus runtime information |\n| `series` | Finds series by label matchers |\n| `targets_metadata` | Returns metadata about metrics currently scraped by the target |\n| `tsdb_stats` | Get usage and cardinality statistics from the TSDB |\n| `wal_replay_status` | Get current WAL replay status |\n\n__NOTE:__ \n> Because the [TSDB Admin API endpoints](https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis)\n> allow for potentially destructive operations like deleting data, they are not\n> enabled by default. In order to enable the TSDB Admin API endpoints, the MCP\n> server must be started with the flag `--dangerous.enable-tsdb-admin-tools` to\n> acknowledge the associated risk these endpoints carry.\n\n| Tool Name | Description |\n| --- | --- |\n| `clean_tombstones` | Removes the deleted data from disk and cleans up the existing tombstones |\n| `delete_series` | deletes data for a selection of series in a time range |\n| `snapshot` | creates a snapshot of all current data into snapshots/<datetime>-<rand> under the TSDB's data directory and returns the directory as response |\n\n#### Tool Sets\n\nThe 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.\nBy default, they are all registered and available for use (TSDB Admin API tools need an extra flag).\n\nTo be considerate to LLMs with smaller context windows, it's possible to pass in a whitelist of specific tools to register with the server.\nThe 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]`.\nAdditional tools can be specified with the [`--mcp.tools` flag](#command-line-flags).\n\nFor example, the command line:\n\n```shell\nprometheus-mcp-server --mcp.tools=build_info --mcp.tools=flags --mcp.tools=runtime_info\n```\n\nWould result in the following tools being loaded:\n\n- `build_info`\n- `docs_list`\n- `docs_read`\n- `docs_search`\n- `flags`\n- `label_names`\n- `label_values`\n- `metric_metadata`\n- `query`\n- `range_query`\n- `runbooks_list`\n- `runbooks_read`\n- `runtime_info`\n- `series`\n\n#### Runbooks (Agent Skills) and Prompts\n\nThe 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.\nRunbooks cover tasks like system health checks, missing-data triage, error-rate investigation, high-cardinality optimization, recording/alerting rule review, and configuration/performance tuning.\n\nEach runbook is packaged as a full [Agent Skill](https://agentskills.io/specification): a directory containing a `SKILL.md` with `name`/`description` frontmatter.\nRunbooks are exposed three ways:\n\n- **Tools**: the model can discover and read them itself via the `runbooks_list`/`runbooks_read` tools when a request matches a runbook's purpose. Tools are the most portable path and work in every MCP client.\n- **Skill resources**: per the [SEP-2640 skills extension draft](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2640), each runbook is a `skill://<name>/SKILL.md` resource, enumerated by the well-known `skill://index.json` discovery index, and the server declares the `io.modelcontextprotocol/skills` extension capability. Skill-aware hosts can consume these like local filesystem skills; other clients can still read them as ordinary MCP resources.\n- **MCP prompts**: each runbook is also registered as an [MCP prompt](https://modelcontextprotocol.io/docs/concepts/prompts) 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).\n\n#### Prometheus Compatible Backends\n\nThere 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.\nSome examples can be found in the [Remote Storage](https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage) of prometheus' docs.\n\nMany of those services also offer a \"prometheus compatible\" API that can be used to query/interact with the data using native promQL.\nIn 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.\nBeyond that, there may be API differences as the different systems implement different parts/extensions of the API for their needs.\n\nExamples:\n- Thanos does not use a centralized config, so the config endpoint is not implemented and thus the config tool fails.\n- Mimir and Cortex implement extra endpoints to manage/add/remove rules\n\nTo 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.\nChoosing a specific prometheus backend implementation can be done with the [`--prometheus.backend` flag](#command-line-flags).\nThe list of available backend implementations on a given release of the MCP server can be found in the output of the [`--help` flag](#command-line-flags).\nQualifications and support criteria are still under consideration, please open an issue to request support/features for a specific backend for further discussion.\n\n##### Prometheus Backend Implementation Differences\n\n| Backend | Tool | Add/Remove/Change | Notes |\n| --- | --- | --- | --- |\n| `prometheus` | n/a | none | Standard prometheus tools. Functionally equivalent to `--mcp.tools=\"all\"`. The default MCP server toolset. |\n| [`thanos`](https://thanos.io/) | `alertmanagers` | remove | Thanos does not implement the endpoint and the tool returns a `404`. |\n| [`thanos`](https://thanos.io/) | `clean_tombstones` | remove | Prometheus TSDB admin endpoint |\n| [`thanos`](https://thanos.io/) | `config` | remove | Thanos does not use a centralized config, so it doesn't implement the endpoint and the tool returns a `404`. |\n| [`thanos`](https://thanos.io/) | `delete_series` | remove | Prometheus TSDB admin endpoint |\n| [`thanos`](https://thanos.io/) | `list_stores` | add | Thanos provides an additional endpoint to list store API servers. |\n| [`thanos`](https://thanos.io/) | `quit` | remove | Thanos does not implement the endpoint and the tool returns a `404`. |\n| [`thanos`](https://thanos.io/) | `reload` | remove | Thanos does not implement the endpoint and the tool returns a `404`. |\n| [`thanos`](https://thanos.io/) | `snapshot` | remove | Prometheus TSDB admin endpoint |\n| [`thanos`](https://thanos.io/) | `wal_replay_status` | remove | Thanos does not implement the endpoint and the tool returns a `404`. |\n\n### Resources\n\n| Resource Name | Resource URI | Description |\n| --- | --- | --- |\n| List of Official Prometheus Documentation Files | `prometheus://docs` | List of official Prometheus Documentation files |\n| Read Official Prometheus Documentation | `prometheus://docs/{+file}` | Read official Prometheus Documentation files by name |\n| Agent Skills Discovery Index | `skill://index.json` | [SEP-2640](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2640) discovery index of the embedded runbooks/skills |\n| Prometheus Runbook (Agent Skill) | `skill://<name>/SKILL.md` | Read the named runbook, packaged as an Agent Skill (one resource per runbook) |\n\n## Installation and Usage\n\nThis MCP server is most useful when fully integrated with tooling and/or installed as a tool server with another system.\nInstallation procedures and integration support will vary depending on the tools being used.\nFor example: \n- some systems can only interact with MCP tools and not resources/prompts \n- some systems use mcp.json config file format to manage MCP servers and some require custom formats\n- some systems don't speak MCP directly and require tools like mcp-to-openapi to proxy \n\nPlease check the documentation for the tool being used/integrated for specific instructions and level of support.\n\n### Binary\nDownload a release appropriate for your system from the [Releases](https://github.com/tjhop/prometheus-mcp-server/releases) page.\nPlease see [Flags](#command-line-flags) for more information on the available flags and their corresponding environment variables.\n\n```shell\n/path/to/prometheus-mcp-server <flags>\n\n# or using env vars\nPROMETHEUS_MCP_SERVER_PROMETHEUS_URL=\"https://$yourPrometheus:9090\" /path/to/prometheus-mcp-server\n```\n\n### Docker\nPlease see [Flags](#command-line-flags) for more information on the available flags and their corresponding environment variables.\n\n```shell\n# Stdio transport\ndocker run --rm -i ghcr.io/tjhop/prometheus-mcp-server:latest --prometheus.url \"https://$yourPrometheus:9090\" \n\n# or using env vars\ndocker run --rm -i -e PROMETHEUS_MCP_SERVER_PROMETHEUS_URL=\"https://$yourPrometheus:9090\" ghcr.io/tjhop/prometheus-mcp-server:latest\n```\n\n```shell\n# Streamable HTTP transport (capable of SSE as well)\ndocker run --rm -p 8080:8080 ghcr.io/tjhop/prometheus-mcp-server:latest --prometheus.url \"https://$yourPrometheus:9090\" --mcp.transport \"http\" --web.listen-address \":8080\"\n\n# or using env vars\ndocker run --rm -p 8080:8080 -e PROMETHEUS_MCP_SERVER_PROMETHEUS_URL=\"https://$yourPrometheus:9090\" -e PROMETHEUS_MCP_SERVER_MCP_TRANSPORT=\"http\" -e PROMETHEUS_MCP_SERVER_WEB_LISTEN_ADDRESS=\":8080\" ghcr.io/tjhop/prometheus-mcp-server:latest\n```\n\n### Helm Chart (Kubernetes)\n\nA Helm chart is available for deploying to Kubernetes. The chart is published as an OCI artifact on each release.\n\n```bash\nhelm install prometheus-mcp-server oci://ghcr.io/tjhop/charts/prometheus-mcp-server \\\n  --version <version> \\\n  --set prometheus.url=http://prometheus:9090\n```\n\nSee the [chart README](./charts/prometheus-mcp-server/README.md) for the full list of configuration values and examples.\n\n### Kubernetes (Raw Manifests)\n\nIf you prefer deploying without Helm, example Kubernetes manifests are available:\n\n- [Kubernetes Deployment](./examples/k8s-deployment.yml)\n- [OpenShift Deployment](./examples/openshift-deployment.yml)\n\n### System Packages\nDownload a release appropriate for your system from the [Releases](https://github.com/tjhop/prometheus-mcp-server/releases) page. A Systemd service file is included in the system packages that are built.\n\n```shell\n# install system package (example assuming Debian based)\napt install /path/to/package\n# create unit override, add any needed flags or environment variables\nsystemctl edit prometheus-mcp-server.service\nsystemctl enable --now prometheus-mcp-server.service\n```\n\n_Note_: While packages are built for several systems, there are currently no plans to attempt to submit packages to upstream package repositories.\n\n## Security and Authentication\n### Connecting to Secure Prometheus Instances\n\nThe MCP server supports [Prometheus HTTP config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_config) files to connect to secured Prometheus instances.\nAn example config can be found [in the examples folder here](./examples/http-config.yml).\nUse the `--http.config` command-line flag to provide an HTTP configuration file.\nPlease see [Flags](#command-line-flags) for more information.\n\n### Forwarding Client Credentials\n\nWhen using the HTTP transport, the MCP server forwards the `Authorization` header on each MCP request to Prometheus for that request's API calls.\nRequests 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](#connecting-to-secure-prometheus-instances)).\n\nThe server forwards client credentials to Prometheus as-is and does not validate them.\nA credential that does not include an auth scheme is sent as a `Bearer` token.\nAnyone 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](#securing-the-mcp-server-endpoints) or network-level controls.\nNote 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.\nTLS-only web configurations do not use the `Authorization` header and are unaffected.\n\n### Securing the MCP Server Endpoints\n\nThe MCP server supports [Prometheus Web Configuration files](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md) files to expose it's endpoints behind optional basic auth and custom TLS configs.\nUse the `--web.config.file` command-line flag to provide an HTTP configuration file.\nPlease see [Flags](#command-line-flags) for more information.\n\n## Telemetry\n### Health Endpoints\n\nThe web server exposes health endpoints on the configured listen address, following the `/-/healthy` and `/-/ready` convention used across the Prometheus ecosystem:\n\n| Endpoint | Description |\n| --- | --- |\n| `/-/healthy` | Liveness: always returns `200 OK` while the process is up and serving HTTP. |\n| `/-/ready` | Readiness: returns `200 OK` once the MCP transport is mounted and able to accept client sessions, and `503 Service Unavailable` before that and during shutdown. |\n\nThese map directly onto Kubernetes liveness/readiness probes. The `prom_mcp_server_ready` metric reports the same readiness state.\n\n### Metrics\n\nOnce running, the server exposes Prometheus metrics on the configured listen address and telemetry path (`:8080/metrics`, by default).\nPlease see [Flags](#command-line-flags) for more information on how to change the listening interface, port, or telemetry path.\n\n<details>\n<summary>Prometheus MCP Server Metrics</summary>\n\n| Metric name | Type | Description | Labels |\n| --- | --- | --- | --- |\n| `prom_mcp_build_info` | `Gauge` | A metric with a constant '1' value with labels for version, commit and build_date from which prometheus-mcp-server was built. | `version`, `commit`, `build_date`, `goversion` |\n| `prom_mcp_server_ready` | `Gauge` | Info metric with a static '1' if the MCP server is ready, and '0' otherwise. | |\n| `prom_mcp_api_calls_failed_total` | `Counter` | Total number of Prometheus API failures, per endpoint. | `target_path` |\n| `prom_mcp_api_call_duration_seconds` | `Histogram` | Duration of Prometheus API calls, per endpoint, in seconds. | `target_path` |\n| `prom_mcp_tool_calls_failed_total` | `Counter` | Total number of failures per tool. | `tool_name` |\n| `prom_mcp_tool_call_duration_seconds` | `Histogram` | Duration of tool calls, per tool, in seconds. | `tool_name` |\n| `prom_mcp_resource_calls_failed_total` | `Counter` | Total number of failures per resource. | `resource_uri` |\n| `prom_mcp_resource_call_duration_seconds` | `Histogram` | Duration of resource calls, per resource, in seconds. | `resource_uri` |\n| `prom_mcp_docs_last_update_timestamp_seconds` | `Gauge` | Unix timestamp of last successful docs auto-update. | |\n| `prom_mcp_docs_update_failures_total` | `Counter` | Total number of docs auto-update failures. | |\n| `go_*` | `Gauge`/`Counter` | Standard Go runtime metrics from the `client_golang` library. | |\n| `process_*` | `Gauge`/`Counter` | Standard process metrics from the `client_golang` library. | |\n\n</details>\n\n### Grafana Dashboard\n\nA pre-built [Grafana](https://grafana.com/) dashboard is included in the [`grafana/`](./grafana/) directory for visualizing the metrics exposed by the MCP server. Import the dashboard json into grafana and it should be ready to go.\n\n### Logs\n\nThis project makes heavy use of structured, leveled logging.\nPlease see [Flags](#command-line-flags) for more information on how to set the log format, level, and optional file.\n\n## Development\n### Development Environment with Devbox + Direnv\nIf you use [Devbox](https://www.jetify.com/devbox) and\n[Direnv](https://direnv.net/), then simply entering the directory for the repo\nshould set up the needed software.\n\n### Local LLM with Ollama\nSee [`mcp.json`](./examples/mcp.json) for an example MCP config for use with tooling.\nRequires [`ollama`](https://github.com/ollama/ollama) to be installed.\n\n_NOTE:_ \n> To override the default LLM (`ollama:gpt-oss:20b`), run `export\n> OLLAMA_MODEL=\"ollama:your_model\"` to override it before running `make` .\n\n<details>\n<summary>Using MCP Inspector and a local ollama instance:</summary>\n\nRequires [MCP Inpsector](https://github.com/modelcontextprotocol/inspector) to be installed:\n\n```bash\nmake inspector\n```\n</details>\n\n<details>\n<summary>Using mcphost and a local ollama instance:</summary>\n\nRequires [`mcphost`](https://github.com/mark3labs/mcphost) to be installed:\n\n```bash\nmake mcphost\n```\n</details>\n\n### Gemini with gemini-cli\nSee [`settings.json`](./examples/.gemini/settings.json) for an example config file to run gemini-cli with the prometheus-mcp-server.\nRequires [gemini-cli](https://github.com/google-gemini/gemini-cli) to be installed. \n\n<details>\n<summary>Using `gemini-cli` and hosted models:</summary>\n\n```bash\nmake gemini\n```\n</details>\n\n### Manual Setup\nRequired software:\n- Working Go environment\n- Docker for local tests/linting/image building/etc\n- GNU Make\n- [ollama](https://github.com/ollama/ollama)\n- [mcp inspector](https://github.com/modelcontextprotocol/inspector)\n- [mcphost](https://github.com/mark3labs/mcphost)\n\n### Building\n\nThis project uses the standard Prometheus build tooling: [`promu`](https://github.com/prometheus/promu)\ndriven through `Makefile` / `Makefile.common`. The binary embeds a pinned\nsnapshot of `prometheus/docs`, which the build targets download and extract\nautomatically (the pin lives in `DOCS_VERSION` in the `Makefile`).\n\n```bash\nmake build       # build the binary for the host platform (via promu)\nmake test        # run the test suite\nmake crossbuild  # build binaries for all release platforms\nmake             # run the full check suite: style, license, yamllint, lint, build, test\n```\n\nProject-specific helper targets (helm packaging and the local LLM client\nintegrations) are listed by `make help`:\n\n```bash\nmake help\n\nUsage:\n  make <target>\n\nProject targets:\n  help                           print this help message (see Makefile.common for the standard prometheus targets)\n  docs                           download and extract the pinned prometheus/docs snapshot for embedding\n  helm-sync-dashboards           copy grafana dashboards into helm chart for packaging\n  helm-lint                      run helm chart linting\n  helm-template                  render helm templates for inspection\n  helm-test                      install helm chart and run tests (requires a running cluster)\n  mcphost                        use mcphost to run the prometheus-mcp-server against a local ollama model\n  inspector                      use inspector to run the prometheus-mcp-server in STDIO transport mode\n  inspector-http                 use inspector to run the prometheus-mcp-server in streamable HTTP transport mode\n  open-webui                     use open-webui to run the prometheus-mcp-server\n  gemini                         use gemini-cli to run the prometheus-mcp-server against Google Gemini models\n```\n## Command Line Flags\n\nThe available command line flags are documented in the help flag:\n\n```bash\n~/go/src/github.com/tjhop/prometheus-mcp-server (main [ ]) -> ./prometheus-mcp-server --help\nusage: prometheus-mcp-server [<flags>]\n\n\nFlags:\n  -h, --[no-]help                Show context-sensitive help (also\n                                 try --help-long and --help-man).\n                                 ($PROMETHEUS_MCP_SERVER_HELP)\n      --mcp.tools=all ...        List of mcp tools to load. The target\n                                 `all` can be used to load all tools.\n                                 The target `core` loads only the core tools:\n                                 docs_list,docs_read,docs_search,runbooks_list,runbooks_read,query,range_query,metric_metadata,label_names,label_values,series\n                                 Otherwise, it is treated as an allow-list\n                                 of tools to load, in addition to the core\n                                 tools. Please see project README for more\n                                 information and the full list of tools.\n                                 ($PROMETHEUS_MCP_SERVER_MCP_TOOLS)\n      --[no-]mcp.enable-toon-output  \n                                 Enable Token-Oriented Object Notation\n                                 (TOON) output for tools instead of JSON\n                                 ($PROMETHEUS_MCP_SERVER_MCP_ENABLE_TOON_OUTPUT)\n      --[no-]mcp.enable-client-logging  \n                                 Enable sending log messages to connected\n                                 MCP clients as protocol notifications.\n                                 When enabled, tool execution logs are\n                                 sent both to the server's primary\n                                 log output and to the MCP client,\n                                 allowing LLMs to observe server activity.\n                                 ($PROMETHEUS_MCP_SERVER_MCP_ENABLE_CLIENT_LOGGING)\n      --mcp.transport=\"stdio\"    The type of transport to use for\n                                 the MCP server [`stdio`, `http`].\n                                 ($PROMETHEUS_MCP_SERVER_MCP_TRANSPORT)\n      --prometheus.backend=PROMETHEUS.BACKEND  \n                                 Customize the toolset for a specific\n                                 Prometheus API compatible backend.\n                                 Supported backends include: prometheus,thanos\n                                 ($PROMETHEUS_MCP_SERVER_PROMETHEUS_BACKEND)\n      --prometheus.url=\"http://127.0.0.1:9090\"  \n                                 URL of the Prometheus instance to connect to\n                                 ($PROMETHEUS_MCP_SERVER_PROMETHEUS_URL)\n      --prometheus.timeout=1m    Timeout for API calls to the Prometheus backend\n                                 ($PROMETHEUS_MCP_SERVER_PROMETHEUS_TIMEOUT)\n      --prometheus.truncation-limit=0  \n                                 If enabled, this controls the maximum query\n                                 response size in number of lines/entries\n                                 provided to the LLM from the API response.\n                                 LLMs can override truncation limits if\n                                 needed on a per-tool-call basis via tool\n                                 request arguments on supported tools.\n                                 To disable truncation limits, set to 0.\n                                 ($PROMETHEUS_MCP_SERVER_PROMETHEUS_TRUNCATION_LIMIT)\n      --http.config=HTTP.CONFIG  Path to config file to set\n                                 Prometheus HTTP client options\n                                 ($PROMETHEUS_MCP_SERVER_HTTP_CONFIG)\n      --web.telemetry-path=\"/metrics\"  \n                                 Path under which to expose metrics.\n                                 ($PROMETHEUS_MCP_SERVER_WEB_TELEMETRY_PATH)\n      --web.max-requests=40      Maximum number of parallel scrape\n                                 requests. Use 0 to disable.\n                                 ($PROMETHEUS_MCP_SERVER_WEB_MAX_REQUESTS)\n      --[no-]dangerous.enable-tsdb-admin-tools  \n                                 Enable and allow using tools that access\n                                 Prometheus' TSDB Admin API endpoints\n                                 (`snapshot`, `delete_series`, and\n                                 `clean_tombstones` tools). This is dangerous,\n                                 and allows for destructive operations\n                                 like deleting data. It is not the fault\n                                 of this MCP server if the LLM you're\n                                 connected to nukes all your data. Docs:\n                                 https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis\n                                 ($PROMETHEUS_MCP_SERVER_DANGEROUS_ENABLE_TSDB_ADMIN_TOOLS)\n      --[no-]docs.auto-update    Enable automatic documentation updates\n                                 from the official prometheus/docs\n                                 repository. Checks every 24h0m0s.\n                                 ($PROMETHEUS_MCP_SERVER_DOCS_AUTO_UPDATE)\n      --log.file=LOG.FILE        The name of the file to log to (file\n                                 rotation policies should be configured\n                                 with external tools like logrotate)\n                                 ($PROMETHEUS_MCP_SERVER_LOG_FILE)\n      --[no-]web.systemd-socket  Use systemd socket activation listeners\n                                 instead of port listeners (Linux only).\n                                 ($PROMETHEUS_MCP_SERVER_WEB_SYSTEMD_SOCKET)\n      --web.listen-address=:8080 ...  \n                                 Addresses on which to expose metrics and\n                                 web interface. Repeatable for multiple\n                                 addresses. Examples: `:9100` or `[::1]:9100`\n                                 for http, `vsock://:9100` for vsock\n                                 ($PROMETHEUS_MCP_SERVER_WEB_LISTEN_ADDRESS)\n      --web.config.file=\"\"       Path to configuration file that can\n                                 enable TLS or authentication. See:\n                                 https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md\n                                 ($PROMETHEUS_MCP_SERVER_WEB_CONFIG_FILE)\n      --log.level=info           Only log messages with the given severity\n                                 or above. One of: [debug, info, warn, error]\n                                 ($PROMETHEUS_MCP_SERVER_LOG_LEVEL)\n      --log.format=logfmt        Output format of log messages. One of: [logfmt,\n                                 json] ($PROMETHEUS_MCP_SERVER_LOG_FORMAT)\n      --[no-]version             Show application version.\n                                 ($PROMETHEUS_MCP_SERVER_VERSION)\n```\n",
  "bytes": 32963,
  "sha": "15313a09b5b1beb16c280eb21788a0694e7ffe1d801949ea9026d5b0b81469de",
  "repo_slug": "tjhop/prometheus-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_tjhop_prometheus_mcp_server_7f353ed7/readme"
}