Inference AIops
Enables governance-grade AIops for GPU inference clusters with root-cause analysis, metrics, and policy-governed operations for vLLM and Ray.
README
<!-- mcp-name: io.github.AIops-tools/inference-aiops -->
Inference AIops (preview)
Disclaimer: Community-maintained open-source project. Not affiliated with, endorsed by, or sponsored by the vLLM or Ray projects or any inference-serving vendor. Product and trademark names belong to their owners. MIT licensed.
Governed AI-ops for GPU inference clusters — vLLM (OpenAI API + Prometheus
/metrics) and Ray Serve / Ray Jobs (Ray dashboard) — with a built-in
governance harness: unified audit log, policy engine, token/runaway budget
guard, undo-token recording, and graduated-autonomy risk tiers. It parses
vLLM's Prometheus /metrics directly (no Prometheus server required) and probes
the Ray dashboard independently. A bearer token is optional (many stacks run
open). Preview — mock-validated only, not yet verified against a live cluster.
What it does
The flagship value is root-cause analysis, wrapped in guarded reads and writes:
diagnose_latency_spike(flagship RCA) — when TTFT/TPOT/e2e latency climbs, it correlates queue depth (running vs waiting), KV-cache pressure / preemptions, and prefix-cache locality into a ranked cause plus the specific knob to turn (add replicas, raisemax-num-seqs, fix routing, enlarge KV cache). Every flag is a number, not a black-box verdict.diagnose_low_utilization— the inverse: idle GPUs, over-provisioned replicas, or routing that strands a cache-warm replica → what to scale down.- Prometheus-native — reads vLLM's
/metricsendpoint directly; no Prometheus/Grafana deployment needed. - Governance-grade — the first governance-grade entrant in this niche: audit + budget + risk-tier approval + undo-token + prompt-injection sanitize, with dry-run + double-confirm on the fragile prod ops (scale-down, scale-to-zero, drain, redeploy, hot-swap) the community reports as dangerous.
- Laptop self-test — ~80% of the tool self-tests free: vLLM on a single GPU
or CPU-mock + Ray in one local container (
ray start --head).
Capability matrix (30 MCP tools)
| Group | Tools | Count | R/W (risk) |
|---|---|---|---|
| Metrics & RCA | request_metrics, queue_depth, kv_cache_stats, diagnose_latency_spike, diagnose_low_utilization |
5 | read |
| Ray Serve (read) | serve_deployment_list, deployment_status, replica_list, autoscale_config_get |
4 | read |
| Ray Serve (write) | scale_replicas_up, scale_replicas_down, scale_to_zero, autoscale_config_update, drain_replica |
5 | write (med / high) |
| Models / vLLM | model_list, model_info, lora_load, lora_unload, model_hot_swap |
5 | read + write (med / high) |
| Ray cluster / jobs / GPU | ray_cluster_resources, ray_dashboard_status, ray_job_list, gpu_utilization, ray_job_cancel, replica_restart |
6 | read + write (med / high) |
| Deploy lifecycle | model_deploy, model_undeploy, deployment_redeploy, routing_policy_update |
4 | write (med / high) |
| Cost | cost_per_token |
1 | read |
16 read, 14 write. High-risk writes (scale_replicas_down,
scale_to_zero, drain_replica, lora_unload, model_hot_swap,
replica_restart, model_undeploy, deployment_redeploy) all support
dry_run + double-confirm; reversible writes record an undo descriptor.
Install
uv tool install inference-aiops # or: pipx install inference-aiops
Quick start
inference-aiops init # wizard: host + ray_port + vllm_port + scheme
inference-aiops doctor # probes BOTH the Ray dashboard and vLLM independently
inference-aiops overview # deployments + total replicas + queue backpressure
inference-aiops metrics diagnose # why is inference slow? ranked RCA + the knob to turn
inference-aiops serve list # Ray Serve deployments + replica counts
Run as an MCP server (stdio) for the full 30-tool surface:
export INFERENCE_AIOPS_MASTER_PASSWORD=... # only if a bearer token is stored
inference-aiops mcp
The CLI is a convenience subset (init, overview, serve …, metrics …,
secret …, doctor, mcp); the full 30 tools are exposed via the MCP server.
Governance
Every MCP tool passes through the bundled @governed_tool harness:
- Audit — every call (params, result, status, duration, risk tier,
approver, rationale) logged to
~/.inference-aiops/audit.db(relocatable viaINFERENCE_AIOPS_HOME). - Budget / runaway guard — token and call budgets trip a circuit breaker on tight poll/retry loops.
- Risk tiers — graduated autonomy; high-risk ops can require a named
approver (
INFERENCE_AUDIT_APPROVED_BY/INFERENCE_AUDIT_RATIONALE). - Undo recording — reversible writes (scale, autoscale-config, routing, hot-swap, LoRA load) record an inverse descriptor.
Supported scope + limitations
Preview / mock-only. All behaviour is validated against mocked vLLM
/metrics, vLLM OpenAI API, and Ray dashboard responses. ~80% of the tool
self-tests on a laptop — vLLM on a single GPU or CPU-mock plus a local
one-node Ray head. Not yet verified against a live production cluster.
Unverified against real hardware / topology:
- multi-GPU tensor-parallel / pipeline-parallel deployments,
- real GPU thermal / throttle telemetry (utilisation is best-effort from
the Ray dashboard's
/api/nodes), - multi-node drain and node-reboot orchestration.
The fastest live check is inference-aiops doctor.
Missing a capability?
This is the GPU-inference member of the AIops-tools family (governed AI-ops with audit + budget + undo + risk tiers). If a vLLM or Ray capability you need is missing, or your stack speaks a dialect these tools don't yet handle — open an issue or a PR. Contributions welcome.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。