AgentHubAgentHub

Prometheus MCP Server

MCP ServerMCP Registry官方收录

io.github.pab1it0/prometheus-mcp-server · v1.6.1

MCP server providing Prometheus metrics access and PromQL query execution for AI assistants

概览

Prometheus MCP Server 是一个MCP Server,收录自 官方 MCP Registry。支持 stdio 传输。本页提供 Cursor、Claude Code 等客户端的安装配置片段。

安装

选择你的平台查看安装方式

{
  "mcpServers": {
    "prometheus-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/pab1it0/prometheus-mcp-server:1.6.1"
      ],
      "env": {
        "PROMETHEUS_URL": "<PROMETHEUS_URL>"
      }
    }
  }
}

环境变量

PROMETHEUS_URL必填

Prometheus server URL (e.g., http://localhost:9090)

PROMETHEUS_URL_SSL_VERIFY可选

Set to False to disable SSL verification

PROMETHEUS_DISABLE_LINKS可选

Set to True to disable Prometheus UI links in query results (saves context tokens in MCP clients)

PROMETHEUS_USERNAME可选

Username for Prometheus basic authentication

PROMETHEUS_PASSWORD可选secret

Password for Prometheus basic authentication

PROMETHEUS_TOKEN可选secret

Bearer token for Prometheus authentication

ORG_ID可选

Organization ID for multi-tenant Prometheus setups

PROMETHEUS_CLIENT_CERT可选

Path to client certificate file for mutual TLS authentication

PROMETHEUS_CLIENT_KEY可选

Path to client private key file for mutual TLS authentication

PROMETHEUS_MCP_SERVER_TRANSPORT可选

MCP server transport type (stdio, http, or sse)

PROMETHEUS_MCP_BIND_HOST可选

Host address for HTTP/SSE transport (default: 127.0.0.1)

PROMETHEUS_MCP_BIND_PORT可选

Port number for HTTP/SSE transport (default: 8080)

PROMETHEUS_MCP_STATELESS_HTTP可选

Enable stateless HTTP mode for multi-replica support (default: false)

PROMETHEUS_CUSTOM_HEADERS可选

Custom headers as JSON string to include in Prometheus requests

相关资源

统一 Manifest

{
  "id": "io.github.pab1it0/prometheus-mcp-server",
  "type": "mcp-server",
  "version": "1.6.1",
  "displayName": "Prometheus MCP Server",
  "description": "MCP server providing Prometheus metrics access and PromQL query execution for AI assistants",
  "repository": {
    "url": "https://github.com/pab1it0/prometheus-mcp-server",
    "source": "github"
  },
  "homepage": "https://pab1it0.github.io/prometheus-mcp-server",
  "distribution": {
    "packages": [
      {
        "registryType": "oci",
        "identifier": "ghcr.io/pab1it0/prometheus-mcp-server:1.6.1",
        "transport": "stdio",
        "environmentVariables": [
          {
            "name": "PROMETHEUS_URL",
            "description": "Prometheus server URL (e.g., http://localhost:9090)",
            "isRequired": true
          },
          {
            "name": "PROMETHEUS_URL_SSL_VERIFY",
            "description": "Set to False to disable SSL verification"
          },
          {
            "name": "PROMETHEUS_DISABLE_LINKS",
            "description": "Set to True to disable Prometheus UI links in query results (saves context tokens in MCP clients)"
          },
          {
            "name": "PROMETHEUS_USERNAME",
            "description": "Username for Prometheus basic authentication"
          },
          {
            "name": "PROMETHEUS_PASSWORD",
            "description": "Password for Prometheus basic authentication",
            "isSecret": true
          },
          {
            "name": "PROMETHEUS_TOKEN",
            "description": "Bearer token for Prometheus authentication",
            "isSecret": true
          },
          {
            "name": "ORG_ID",
            "description": "Organization ID for multi-tenant Prometheus setups"
          },
          {
            "name": "PROMETHEUS_CLIENT_CERT",
            "description": "Path to client certificate file for mutual TLS authentication"
          },
          {
            "name": "PROMETHEUS_CLIENT_KEY",
            "description": "Path to client private key file for mutual TLS authentication"
          },
          {
            "name": "PROMETHEUS_MCP_SERVER_TRANSPORT",
            "description": "MCP server transport type (stdio, http, or sse)"
          },
          {
            "name": "PROMETHEUS_MCP_BIND_HOST",
            "description": "Host address for HTTP/SSE transport (default: 127.0.0.1)"
          },
          {
            "name": "PROMETHEUS_MCP_BIND_PORT",
            "description": "Port number for HTTP/SSE transport (default: 8080)"
          },
          {
            "name": "PROMETHEUS_MCP_STATELESS_HTTP",
            "description": "Enable stateless HTTP mode for multi-replica support (default: false)"
          },
          {
            "name": "PROMETHEUS_CUSTOM_HEADERS",
            "description": "Custom headers as JSON string to include in Prometheus requests"
          }
        ]
      }
    ],
    "remotes": []
  },
  "dependencies": [],
  "installTargets": [
    "claude-code",
    "claude-desktop",
    "cursor",
    "vscode"
  ],
  "keywords": [],
  "provenance": {
    "origin": "official-mcp-registry",
    "originalId": "io.github.pab1it0/prometheus-mcp-server",
    "originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.pab1it0%2Fprometheus-mcp-server/versions/latest",
    "isOfficial": true,
    "status": "active"
  }
}
Prometheus MCP Server — MCP Server 安装与配置 · AgentHub