Back to MCP directory
publicPublicdnsLocal runtime

prometheus-mcp

一个Prometheus MCP服务器的概念验证项目,用于与Claude AI集成,实现监控数据的可视化展示。

article

README

🚀 Prometheus MCP

Prometheus MCP 是一个概念验证 (PoC) 服务器,用于特定的业务场景,为相关操作提供支持。

🚀 快速开始

先决条件

安装 uv,具体安装步骤请参考:https://docs.astral.sh/uv/getting-started/installation/。借助 uv,您还可以完成 Python 的安装。

如何运行

  1. 克隆此仓库。
  2. 更新 .env 文件。
  3. 执行以下命令:
uv add "mcp[cli]" pillow google-auth matplotlib requests python-dotenv

集成到 Claude 中

您可以使用以下命令运行服务器:

uv --directory "/directory/to/prometheus-mcp" run server.py

然后,您可以在 Claude 的 MCP 服务器配置中添加此 Prometheus MCP 服务器,配置示例如下:

{
  "mcpServers": {
      "Prometheus MCP": {
          "command": "/path/to/uv",
          "args": [
              "--directory",
              "/directory/to/prometheus-mcp",
              "run",
              "server.py"
          ]
      }
  }
}

有关 Claude 的具体说明,请参见 MCP 快速入门

💻 使用示例

基础用法

以下是运行服务器的基础命令:

uv --directory "/directory/to/prometheus-mcp" run server.py

高级用法

在 Claude 的 MCP 服务器配置中集成此服务器的配置示例:

{
  "mcpServers": {
      "Prometheus MCP": {
          "command": "/path/to/uv",
          "args": [
              "--directory",
              "/directory/to/prometheus-mcp",
              "run",
              "server.py"
          ]
      }
  }
}

🎥 演示

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client