订阅管理协议服务器

Red Hat订阅管理的MCP服务器,支持通过容器化部署和多种传输协议运行。

  • by redhat-community-ai-tools
  • Python
  • 混合部署
  • 1 星标
  • 更新于
在 GitHub 查看 redhat-ai-tools/rhsm-mcp

使用说明

红帽订阅管理MCP

用于Red Hat订阅管理的MCP(ModelContextProtocol)服务器

开始使用Red Hat API:https://access.redhat.com/articles/3626371

使用Podman或Docker运行

您可以使用Podman或Docker在容器中运行rhsm-mcp服务器。确保您有一个有效的脱机令牌,可以通过登录获得https://access.redhat.com/management/api:

使用Podman运行的示例配置:

{
  "mcpServers": {
    "rhsm": {
      "command": "podman",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "ACCESS_TOKEN_URL",
        "-e", "ACCESS_TOKEN_CLIENT_ID",
        "-e", "OFFLINE_TOKEN",
        "-e", "MCP_TRANSPORT",
        "quay.io/redhat-ai-tools/rhsm-mcp"
      ],
      "env": {
        "ACCESS_TOKEN_URL": "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token",
        "ACCESS_TOKEN_CLIENT_ID": "rhsm-api",
        "OFFLINE_TOKEN": "REDACTED",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

使用非stdio传输运行

要使用非stdio传输(如SSE)运行服务器,请设置 MCP_TRANSPORT 将环境变量转换为其他值 stdio (例如。, sse).

连接到非stdio MCP服务器的示例配置:

{
  "mcpServers": {
    "rhsm": {
      "url": "https://rhsm-mcp.example.com/sse",
      "headers": {
        "Offline-Token": "REDACTED"
      }
    }
  }
}

替换 REDACTED 值从https://console.redhat.com/openshift/token.