RHOAI Observability MCP

RHOAI Observability MCP

Provides AI assistants with direct access to Red Hat OpenShift AI observability data, enabling querying of Prometheus metrics, Alertmanager alerts, Loki logs, Grafana dashboards, and Kubernetes cluster state to troubleshoot vLLM inference workloads.

Category
访问服务器

README

Red Hat OpenShift AI (RHOAI) Observability MCP

CI Build codecov Python 3.11+ License: MIT

An MCP (Model Context Protocol) server that gives AI assistants direct access to Red Hat OpenShift AI observability data. Query Prometheus metrics, Alertmanager alerts, Loki logs, Grafana dashboards, and Kubernetes cluster state to troubleshoot vLLM inference workloads.

Features

  • 21 tools across 7 categories for comprehensive observability
  • vLLM-aware metrics (TTFT, TPOT, E2E latency, KV cache, queue depth)
  • Composite investigation tools that correlate metrics, logs, and alerts automatically
  • Auto-detection of in-cluster vs external access to OpenShift services
  • Built on FastMCP with async backends via httpx

Architecture

graph TD
    A[Claude / AI Assistant] -->|MCP Protocol| B[rhoai-observability-mcp]
    B --> C[Thanos / Prometheus]
    B --> D[Alertmanager]
    B --> E[Loki]
    B --> F[Tempo]
    B --> G[Grafana]
    B --> H[Kubernetes / OpenShift]

Backends:

Backend Purpose Source
Prometheus (Thanos) Metrics queries (PromQL) backends/prometheus.py
Alertmanager Active alerts and alert groups backends/alertmanager.py
Loki Log queries (LogQL) backends/loki.py
Tempo Distributed trace queries (TraceQL) backends/tempo.py
Grafana Dashboard discovery and panel queries backends/grafana.py
Kubernetes (OpenShift) Pods, events, nodes, InferenceServices backends/openshift.py

Quick Start

# Clone and install
git clone https://github.com/opendatahub-io/rhoai-observability-mcp.git
cd rhoai-observability-mcp
uv pip install -e ".[dev]"

# Configure (see INSTALL.md for all options)
export THANOS_URL=https://thanos-querier.openshift-monitoring.svc:9091
export ALERTMANAGER_URL=https://alertmanager-main.openshift-monitoring.svc:9093
export OPENSHIFT_TOKEN=$(oc whoami -t)

# Run
python -m rhoai_obs_mcp.server

See INSTALL.md for detailed setup, configuration, and Claude Desktop integration.

Build & Deploy

Build the container image

make build

Override the image name or tag:

make build IMAGE_NAME=quay.io/myorg/rhoai-observability-mcp IMAGE_TAG=v1.0.0

Push to registry

make push

Deploy to OpenShift

Prerequisites: oc login to your cluster, kustomize installed, and create the target project:

oc new-project rhoai-obs-mcp

Then deploy:

make deploy

This uses Kustomize to build the OpenShift overlay (deploy/overlays/openshift/) on top of the base manifests (deploy/base/) and applies them to the rhoai-obs-mcp namespace. To deploy to a different namespace:

make deploy NAMESPACE=my-namespace

Undeploy

make undeploy

If you deployed to a custom namespace, pass the same value:

make undeploy NAMESPACE=my-namespace

CI-built images

Container images are automatically built from main and published to GHCR:

ghcr.io/opendatahub-io/rhoai-observability-mcp:latest

Local Development with Kind

Set up a local Kubernetes cluster with mock observability backends for development and testing:

# Prerequisites: kind, kubectl, helm, kustomize
make kind-up

This creates a Kind cluster, installs Prometheus + Alertmanager + Grafana via Helm, deploys a fake vLLM metrics exporter, and deploys the MCP server. Access the MCP server at http://localhost:30080.

To point at real external backends instead of the mocks:

make kind-deploy THANOS_URL=https://real-cluster:9091 ALERTMANAGER_URL=https://real-cluster:9093 GRAFANA_URL=https://real-cluster:3000 TEMPO_URL=https://real-cluster:8080

Tear down:

make kind-down

Tool Reference

Metrics

Tool Description
query_prometheus Execute a raw PromQL query against ThanosQuerier
query_prometheus_range Execute a PromQL range query to get time-series data (trends, spikes, correlations)
get_vllm_metrics Get a summary of key vLLM metrics (TTFT, TPOT, E2E, cache, queue) for a model
list_metrics List available Prometheus metric names, optionally filtered by regex

Alerts

Tool Description
get_alerts Get active alerts from Alertmanager, filterable by severity and labels
get_alert_groups Get alerts grouped by their routing labels

Logs

Tool Description
query_logs Execute a LogQL query against OpenShift LokiStack
get_pod_logs Get logs for a specific pod by namespace and name

Traces

Tool Description
get_trace Fetch a distributed trace by its trace ID
search_traces Search for traces using TraceQL expressions
list_trace_tags List available trace tag names for building TraceQL queries

Cluster

Tool Description
get_pods List pods in a namespace with status, restarts, and creation time
get_events List Kubernetes events, filterable by resource and reason
get_node_status Get node status, capacity, and GPU allocation info
describe_resource Get detailed description of a Kubernetes resource
get_inference_services List KServe InferenceService resources

Dashboards

Tool Description
list_dashboards List available Grafana dashboards, filterable by tag or title
get_dashboard_panels Get panels and their queries from a Grafana dashboard

Investigation

Tool Description
investigate_latency Correlate latency metrics, error logs, and alerts for a vLLM model
investigate_gpu Correlate GPU utilization, KV cache, queue depth, and pod status
investigate_errors Correlate error logs, alerts, and Kubernetes events in a namespace

Documentation

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选