一种通过模型上下文协议服务器访问 Prometheus 指标数据的工具,允许使用自然语言与监控数据进行交互。
monitoringsearch
585 查看 · 2026-07-07 更新
简介
一种通过模型上下文协议服务器访问 Prometheus 指标数据的工具,允许使用自然语言与监控数据进行交互。
简介
一种通过模型上下文协议服务器访问 Prometheus 指标数据的工具,允许使用自然语言与监控数据进行交互。
Prometheus MCP 服务器
一个通过 Model Context Protocol 服务器访问 Prometheus 数据的工具。
安装
bash pipx install git+https://github.com/moohoorama/prometheus-mcp-server-py.git
不安装直接运行
您也可以使用 pipx run 直接运行该包,而无需安装:
bash pipx run --spec git+https://github.com/moohoorama/prometheus-mcp-server-py.git prometheus-mcp --url http://your-prometheus-server:9090
这对于测试或一次性使用场景非常有用。
使用方法
bash
命令行参数
prometheus-mcp --url http://your-prometheus-server:9090 --username username --password password
或者
prometheus-mcp --url http://your-prometheus-server:9090 --token your-token
命令行参数
--url: Prometheus 服务器 URL(必填)--username: 基本身份验证的用户名(可选)--password: 基本身份验证的密码(可选)--token: 身份验证令牌(可选)--org-id: 多租户设置中的组织 ID(可选)