Basic information
About Prometheus MCP 服务器 Server
一个简化版的Prometheus MCP服务器,用于收集和暴露MCP服务器的指标
Prometheus MCP 服务器 is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by qingshanyuluo. Supported transport: stdio. Runtime: go. License: MIT. The repository has 3 GitHub stars. Source code is hosted on github.com.
Setup
{
"mcpServers": {
"prometheus-mcp-server-qingshanyuluo": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"node",
"build/index.js"
]
}
}
}
{
"mcpServers": {
"prometheus-mcp-server-qingshanyuluo": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"node",
"build/index.js"
]
}
}
}
{
"servers": {
"prometheus-mcp-server-qingshanyuluo": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"node",
"build/index.js"
]
}
}
}
Prometheus MCP 服务器 config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"prometheus-mcp-server-qingshanyuluo": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"node",
"build/index.js"
]
}
}
}
Prometheus MCP 服务器 tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Prometheus MCP 服务器?
Prometheus MCP 服务器是一个简化版的 MCP 服务器,用于查询 Prometheus 指标并提供 AI 分析。它通过 MCP 工具暴露 Prometheus 的查询能力,方便 AI 代理或客户端集成。
How to use Prometheus MCP 服务器?
设置环境变量 PROMETHEUS_URL 指定 Prometheus 端点,然后运行 go run cmd/server/main.go sse 启动服务器,默认监听 :8081 端口,通过 /sse 路径暴露 SSE 连接。MCP 客户端可通过配置 mcpServers 中的 url 为 http://localhost:8081/sse 连接使用。
Key features of Prometheus MCP 服务器
- 所有查询结果以 JSON 格式返回,便于 AI 解析
- 提供六个 MCP 工具用于指标搜索、标签查询和 PromQL 查询
- 支持即时查询和范围查询
- 范围查询可直接生成 base64 编码的 PNG 图表
- 支持正则表达式搜索指标名称
- 可选配置日志文件路径
Use cases of Prometheus MCP 服务器
- AI 代理通过自然语言对话查询 Prometheus 指标实时值
- 自动化监控告警场景中获取特定指标的标签和数值
- 生成过去一段时间内的指标趋势图表供 AI 分析
- 开发者通过 MCP 客户端快速探索 Prometheus 指标元数据
Frequently asked questions
1 如何设置 Prometheus 地址?
通过环境变量 PROMETHEUS_URL 设置 Prometheus 端点,例如 export PROMETHEUS_URL=http://your-prometheus:9090。
2 服务器默认在哪个端口启动?
服务器默认在 :8081 端口启动,可通过代码或启动参数修改(当前默认固定)。
3 支持哪些 PromQL 查询类型?
支持即时查询(query)、范围查询(query_range)以及带图表的范围查询(query_chart)。
4 如何配置 MCP 客户端?
在 MCP 客户端配置文件中添加 mcpServers 项,指定 url 为服务器的 SSE 地址,例如 http://localhost:8081/sse。
5 查询结果以什么格式返回?
所有工具查询结果均以 JSON 格式返回,query_chart 额外返回 base64 编码的 PNG 图片。
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In