一个概念验证的Prometheus MCP服务器,它很可能使Claude AI能够通过模型上下文协议(Model Context Protocol)与Prometheus监控系统进行交互。
436 查看 · 2026-07-07 更新
简介
一个概念验证的Prometheus MCP服务器,它很可能使Claude AI能够通过模型上下文协议(Model Context Protocol)与Prometheus监控系统进行交互。
简介
一个概念验证的Prometheus MCP服务器,它很可能使Claude AI能够通过模型上下文协议(Model Context Protocol)与Prometheus监控系统进行交互。
Prometheus MCP
Prometheus MCP 服务器的概念验证。
先决条件
安装 uv:https://docs.astral.sh/uv/getting-started/installation/
使用 uv,你也可以安装 Python。
如何运行
克隆此仓库。
更新 .env 文件
uv add "mcp[cli]" pillow google-auth matplotlib requests python-dotenv
与 Claude 集成
你可以通过以下命令运行服务器:
uv --directory "/directory/to/prometheus-mcp" run server.py
这样你就可以将此 MCP 服务器添加到你的 Claude MCP 服务器配置中
{ "mcpServers": { "Prometheus MCP": { "command": "/path/to/uv", "args": [ "--directory", "/directory/to/prometheus-mcp", "run", "server.py" ] } } }
有关 Claude 特定说明的更多详细信息,请参阅 MCP 快速入门。
演示
工具列表
-
prometheus_query_range: Query Prometheus /query_range API endpoint and return an image of a plot of the time series monitoring data. Use this tool whenever the user asks about the status of their compute infrastructure.
-
prometheus_alert_rules: Query the Prometheus /rules API. Returns a list of alerting and recording rules that are currently loaded. In addition it returns the currently active alerts fired by the Prometheus instance of each alerting rule.
服务配置
[{'mcpServers': {'Prometheus MCP': {'args': ['--directory', '/directory/to/prometheus-mcp', 'run', 'server.py'], 'command': '/path/to/uv'}}}]
来源
- 来源:github
- 链接:https://github.com/etruong42/prometheus-mcp
