{"id":51188388,"url":"https://github.com/prometheus/prometheus-mcp","last_synced_at":"2026-06-27T12:32:32.758Z","repository":{"id":291044240,"uuid":"976394999","full_name":"prometheus/prometheus-mcp","owner":"prometheus","description":"MCP server for LLMs to interact with Prometheus","archived":false,"fork":false,"pushed_at":"2026-06-26T04:15:45.000Z","size":13658,"stargazers_count":54,"open_issues_count":9,"forks_count":17,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-06-27T12:32:30.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prometheus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-05-02T03:17:53.000Z","updated_at":"2026-06-26T03:18:38.000Z","dependencies_parsed_at":"2025-07-04T04:26:12.016Z","dependency_job_id":"456262c7-9062-459b-9416-bd206b93d885","html_url":"https://github.com/prometheus/prometheus-mcp","commit_stats":null,"previous_names":["tjhop/prometheus-mcp-server","prometheus/prometheus-mcp"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/prometheus/prometheus-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus%2Fprometheus-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus%2Fprometheus-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus%2Fprometheus-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus%2Fprometheus-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prometheus","download_url":"https://codeload.github.com/prometheus/prometheus-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus%2Fprometheus-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34854180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-27T12:32:32.287Z","updated_at":"2026-06-27T12:32:32.749Z","avatar_url":"https://github.com/prometheus.png","language":"Go","funding_links":[],"categories":["Monitoring \u0026 Observability"],"sub_categories":["Video"],"readme":"# 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.yaml/badge.svg)](https://github.com/tjhop/prometheus-mcp-server/actions/workflows/golangci-lint.yaml)\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\u003e 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\u003e use the tools from the prometheus mcp server to investigate the metrics from\n\u003e 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\u003e 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\u003e please provide a comprehensive review and summary of the prometheus server.\n\u003e review it's configuration, flags, runtime/build info, and anything else that\n\u003e you feel may provide insight into the status of the prometheus instance,\n\u003e 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 |\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 |\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| `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\u003e Because the [TSDB Admin API endpoints](https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis)\n\u003e allow for potentially destructive operations like deleting data, they are not\n\u003e enabled by default. In order to enable the TSDB Admin API endpoints, the MCP\n\u003e server must be started with the flag `--dangerous.enable-tsdb-admin-tools` to\n\u003e 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/\u003cdatetime\u003e-\u003crand\u003e 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, 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- `runtime_info`\n- `series`\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\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 \u003cflags\u003e\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 \u003cversion\u003e \\\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### 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### 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\u003cdetails\u003e\n\u003csummary\u003ePrometheus MCP Server Metrics\u003c/summary\u003e\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\u003c/details\u003e\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\u003e To override the default LLM (`ollama:gpt-oss:20b`), run `export\n\u003e OLLAMA_MODEL=\"ollama:your_model\"` to override it before running `make` .\n\n\u003cdetails\u003e\n\u003csummary\u003eUsing MCP Inspector and a local ollama instance:\u003c/summary\u003e\n\nRequires [MCP Inpsector](https://github.com/modelcontextprotocol/inspector) to be installed:\n\n```bash\nmake inspector\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eUsing mcphost and a local ollama instance:\u003c/summary\u003e\n\nRequires [`mcphost`](https://github.com/mark3labs/mcphost) to be installed:\n\n```bash\nmake mcphost\n```\n\u003c/details\u003e\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\u003cdetails\u003e\n\u003csummary\u003eUsing `gemini-cli` and hosted models:\u003c/summary\u003e\n\n```bash\nmake gemini\n```\n\u003c/details\u003e\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\nThe included Makefile has several targets to aid in development:\n\n```bash\n~/go/src/github.com/tjhop/prometheus-mcp-server (main [ ]) -\u003e make\n\nUsage:\n  make \u003ctarget\u003e\n\nTargets:\n  help                           print this help message\n  submodules                     ensure git submodules are initialized and updated\n  tidy                           tidy modules\n  fmt                            apply go code style formatter\n  lint                           run linters\n  binary                         build a binary\n  build                          alias for `binary`\n  build-all                      test release process with goreleaser, does not publish/upload\n  container                      build container images with goreleaser, alias for `build-all`\n  image                          build container images with goreleaser, alias for `build-all`\n  test                           run tests\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 [ ]) -\u003e ./prometheus-mcp-server --help\nusage: prometheus-mcp-server [\u003cflags\u003e]\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,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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus%2Fprometheus-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprometheus%2Fprometheus-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus%2Fprometheus-mcp/lists"}