VMware AVI

io.github.vmware-skills由 GitHub 账号 vmware-skills 发布v2.4.0更新于 Nov 6, 2026

VMware AVI (NSX ALB) load balancer plus AKO Kubernetes ops — 28 MCP tools.

概览

AI 生成的概览

本地 MCP 服务器,提供 28 个工具,用于 VMware AVI(NSX ALB)负载均衡管理与 AKO Kubernetes 运维。

可以做什么
  • 查看虚拟服务状态并启用或停用虚拟服务
  • 列出负载均衡池与成员,并对成员执行摘流或恢复流量
  • 查看 SSL 证书及到期情况,以及虚拟服务分析与错误日志
  • 查看 Service Engine 清单与健康状态
  • 操作 AKO Pod:状态、日志、重启、版本,并查看、比对和升级 AKO Helm 配置
  • 诊断 Ingress 注解、Ingress 到虚拟服务的映射、K8s 与 Controller 的同步漂移,并列出集群与 AMKO 状态
适用场景
适合让助手协助运维 AVI/NSX ALB 负载均衡与基于 AKO 的 Kubernetes Ingress:排查 Ingress 未生成虚拟服务、维护窗口内摘除池成员、审计证书到期,或检查 Kubernetes 与 Controller 之间的同步漂移。
运行要求
以本地 Python 包运行(uv tool install vmware-avi 或 uvx),通过 vmware-avi mcp 命令启动。需要 VMWARE_AVI_CONFIG 指向的配置文件(默认 ~/.vmware-avi/config.yaml),其中列出 Controller 主机、用户名与租户;AKO 操作还需 kubeconfig。Controller 密码来自名为 {CONTROLLER_NAME_UPPER}_PASSWORD 的环境变量,通常由 .env 文件加载。需要能访问 AVI Controller 与 Kubernetes 集群的网络。
安装前请注意
该服务器持有 AVI Controller 凭据和 kubeconfig,应使用最小权限服务账号与命名空间级访问。多个工具会改变状态:停用虚拟服务或池成员、重启 AKO、强制重新同步、升级 AKO Helm 图表;这些工具需 confirm 参数,未提供时只返回影响范围,Helm 升级默认演练模式。将 verify_ssl 设为 false 会削弱 TLS 校验。若以 HTTPS 对外提供服务,所有调用者都以该服务器的账号行事,应限制暴露的工具并使用令牌与角色。

安装

在 SourceWeft 中

  1. 打开 控制台中的 VMware AVI,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

VMware AVI

For a read-only check of this skill with your model and agent host, use the shared model-fit self-test in the marketplace root.

Author: Wei Zhou, VMware by Broadcom — [email protected] This is a community-driven project by a VMware engineer, not an official VMware product. For official VMware developer tools see developer.broadcom.com.

English | 中文

AVI (NSX Advanced Load Balancer) management and AKO Kubernetes operations tool — 28 tools across 10 categories.

Dual mode: Traditional AVI Controller management + AKO K8s operations in one skill.

Companion skills handle everything else:

SkillScopeInstall
vmware-aiopsVM lifecycle, deployment, guest ops, clusteruv tool install vmware-aiops
vmware-monitorRead-only: inventory, health, alarms, eventsuv tool install vmware-monitor
vmware-storageDatastores, iSCSI, vSAN managementuv tool install vmware-storage
vmware-vksTanzu Namespaces, TKC cluster lifecycleuv tool install vmware-vks
vmware-nsxNSX networking: segments, gateways, NATuv tool install vmware-nsx-mgmt
vmware-nsx-securityDFW firewall rules, security groupsuv tool install vmware-nsx-security
vmware-ariaAria Ops: metrics, alerts, capacityuv tool install vmware-aria

[PyPI] [Python] [License: MIT] [ClawHub]


Upgrading to 2.0

2.0 renames all 28 MCP tools so every name starts with a verb (e.g. ako_amko_status → get_ako_amko_status, ako_clusters → list_ako_clusters, ako_config_diff → diff_ako_config). The full old → new table is in RELEASE_NOTES.md. Nothing else changes: same tools, parameters, safety gates and CLI commands. If an agent prompt, script or ~/.vmware/rules.yaml names a tool, update it — though deny rules written with the old names keep working with vmware-policy ≥ 1.18 (vmware-audit policy lists any rule the renames widened), and vmware-pilot ≥ 1.13 translates old names in saved workflows. If an install older than 2.0 shares that rules.yaml, give it vmware-policy ≥ 1.18.2 too: it matches each rule against both the old and the new name, so one file serves both.

Quick Install

bash
# Via uv (recommended)uv tool install vmware-avi
# Or via pippip install vmware-avi
# China mainland mirrorpip install vmware-avi -i https://pypi.tuna.tsinghua.edu.cn/simple
# Verify installationvmware-avi doctor

Offline / Air-Gapped Install (from source)

This project uses the modern PEP 517 build system (hatchling), so there is no setup.py by design — that is expected, not a missing file. If you cloned the source and hit ERROR: File "setup.py" or "setup.cfg" not found ... editable mode currently requires a setuptools-based build, your pip is older than 21.3 and cannot do an editable (-e) install with a non-setuptools backend. Editable mode is a developer convenience, not needed to run the tool — do one of:

bash
# From the source tree — a normal (non-editable) install builds a wheel:pip install .              # NOT  pip install -e .
# ...or upgrade pip first, and editable works too:pip install --upgrade pip && pip install -e .

For a truly air-gapped host, build the wheels on a connected machine and copy them over — the target then needs no network:

bash
# On a connected machine, collect this package + its dependencies as wheels:pip wheel . -w dist        # → dist/*.whl   (or: uv build, for just this package)
# Copy dist/ to the air-gapped host, then install offline:pip install --no-index --find-links dist vmware-avi

Capabilities Overview

What This Skill Does

CategoryToolsCount
Virtual Servicelist, status, enable/disable3
Pool Memberpool discovery, member list, enable/disable member (drain/restore traffic)4
SSL Certificatelist, expiry check2
AnalyticsVS metrics overview, request error logs2
Service Enginelist, health check2
AKO Pod Opsstatus, logs, restart, version info4
AKO Configvalues.yaml view, Helm diff, Helm upgrade3
Ingress Diagnosticsannotation validation, VS mapping, error diagnosis, fix recommendation4
Sync DiagnosticsK8s-Controller comparison, inconsistency list, force resync3
Multi-clustercluster list, cross-cluster AKO overview, AMKO status3

CLI vs MCP: Which Mode to Use

ScenarioRecommendedWhy
Local/small models (Ollama, Qwen)CLI~2K tokens vs ~8K for MCP
Cloud models (Claude, GPT-4o)EitherMCP gives structured JSON I/O
Automated pipelinesMCPType-safe parameters, structured output
AKO troubleshootingCLIInteractive log tailing, Helm diff output

Rule of thumb: Use CLI for cost efficiency and small models. Use MCP for structured automation with large models.

Architecture

User (Natural Language)  |AI CLI Tool (Claude Code / Gemini / Codex / Cursor / Trae)  | reads SKILL.md  |vmware-avi CLI  |--- avisdk (AVI REST API) ---> AVI Controller ---> Virtual Services / Pools / SEs  |--- kubectl / kubernetes ---> K8s Cluster ---> AKO Pods / Ingress / Services

Configuration

Step 1: Create Config Directory

bash
mkdir -p ~/.vmware-avivmware-avi init          # generates config.yaml and .env templateschmod 600 ~/.vmware-avi/.env

Step 2: Edit config.yaml

yaml
controllers:  - name: prod-avi    host: avi-controller.example.com    username: admin    api_version: "22.1.4"    tenant: admin    port: 443    verify_ssl: true
default_controller: prod-avi
ako:  kubeconfig: ~/.kube/config  default_context: ""  namespace: avi-system

Step 3: Set Passwords

Create ~/.vmware-avi/.env:

bash
# AVI Controller passwords# Format: {CONTROLLER_NAME_UPPER}_PASSWORDPROD_AVI_PASSWORD=your-password-here

Password environment variable naming convention:

{CONTROLLER_NAME_UPPER}_PASSWORD# Replace hyphens with underscores, UPPERCASE# Example: controller "prod-avi" -> PROD_AVI_PASSWORD# Example: controller "staging-alb" -> STAGING_ALB_PASSWORD

Step 4: Verify

bash
vmware-avi doctor    # checks Controller connectivity + kubeconfig + avisdk

CLI Usage

Virtual Service Management

bash
# List all virtual servicesvmware-avi vs list [--controller prod-avi]
# Check status of a specific VSvmware-avi vs status my-webapp-vs
# Enable / disable a VS (disable requires double confirmation)vmware-avi vs enable my-webapp-vsvmware-avi vs disable my-webapp-vs

Pool Member Drain / Restore

bash
# List pool members and health statusvmware-avi pool members my-pool
# Graceful drain (disable) — double confirmation requiredvmware-avi pool disable my-pool 10.1.1.5
# Restore traffic (enable)vmware-avi pool enable my-pool 10.1.1.5

SSL Certificate Expiry Check

bash
# List all certificatesvmware-avi ssl list
# Check certificates expiring within 30 daysvmware-avi ssl expiry --days 30

Analytics and Error Logs

bash
# VS analytics: throughput, latency, error ratesvmware-avi analytics my-webapp-vs
# Request error logsvmware-avi logs my-webapp-vs --since 1h

Service Engine Health

bash
# Name, mgmt IP, operational status, SE group — status sourced from the# serviceengine-inventory endpoint (config + runtime merged)vmware-avi se list
# Per-SE operational status + connected-VS countsvmware-avi se health

AKO Troubleshooting

bash
# Check AKO pod statusvmware-avi ako status [--context my-k8s-context]
# View AKO logsvmware-avi ako logs [--tail 100] [--since 30m]
# Restart AKO pod (double confirmation)vmware-avi ako restart
# Show AKO versionvmware-avi ako version

AKO Helm Config Management

The AKO Helm release is discovered automatically (official installs use helm install --generate-name, so the release is not named ako). Upgrades pull the official Broadcom OCI chart oci://projects.packages.broadcom.com/ako/helm-charts/ako with --reuse-values.

bash
# View current AKO Helm values (release auto-discovered)vmware-avi ako config show
# Show pending changes (diff against the official OCI chart)vmware-avi ako config diff
# Helm upgrade (double confirmation + --dry-run default)vmware-avi ako config upgrade

Ingress Diagnostics

bash
# Validate Ingress annotationsvmware-avi ako ingress check <namespace>
# Show Ingress-to-VS mappingvmware-avi ako ingress map
# Diagnose why an Ingress has no VSvmware-avi ako ingress diagnose <ingress-name>

Sync Diagnostics

bash
# Check K8s-Controller sync statusvmware-avi ako sync status
# Show inconsistencies between K8s and Controllervmware-avi ako sync diff
# Force AKO resync (double confirmation)vmware-avi ako sync force

Multi-cluster AKO

bash
# List every kube-context and whether AKO runs therevmware-avi ako clusters
# Cross-cluster AKO status overviewvmware-avi ako cluster-overview
# AMKO GSLB statusvmware-avi ako amko status

MCP Server

The MCP server exposes all 28 tools via the Model Context Protocol. Works with any MCP-compatible client.

After uv tool install vmware-avi, start the MCP server with one command (v1.5.15+):

bash
# Recommended — single command, no network re-resolvevmware-avi mcp
# With custom config pathVMWARE_AVI_CONFIG=/path/to/config.yaml vmware-avi mcp

Claude Desktop Config

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "vmware-avi": {      "command": "vmware-avi",      "args": ["mcp"],      "env": {        "VMWARE_AVI_CONFIG": "~/.vmware-avi/config.yaml"      }    }  }}
Alternative: uvx (no install) or legacy entry point
bash
# Run without installing (requires PyPI access each launch)uvx --from vmware-avi vmware-avi mcp
# Legacy entry point (still works, kept for backward compatibility)vmware-avi-mcp

Behind a corporate TLS proxy? uvx may fail with invalid peer certificate: UnknownIssuer. Use the recommended vmware-avi mcp form above (no network needed), or set UV_NATIVE_TLS=true.

MCP Tools (28)

CategoryTools
Virtual Service (3)list_virtual_services, get_virtual_service_status, set_virtual_service_enabled
Pool Member (4)list_lb_pools, list_lb_pool_members, enable_lb_pool_member, disable_lb_pool_member
SSL Certificate (2)list_ssl_certs, check_ssl_cert_expiry
Analytics (2)get_virtual_service_analytics, get_virtual_service_error_logs
Service Engine (2)list_service_engines, get_service_engine_health
AKO Pod (4)get_ako_status, get_ako_logs, restart_ako, get_ako_version
AKO Config (3)get_ako_config, diff_ako_config, upgrade_ako_config
Ingress Diagnostics (3)check_ako_ingress, list_ako_ingresses, diagnose_ako_ingress
Sync Diagnostics (3)get_ako_sync_status, diff_ako_sync, force_ako_sync
Multi-cluster (2)list_ako_clusters, get_ako_amko_status

Common Workflows

1. Maintenance Window -- Drain a Pool Member

When taking a backend server offline for patching:

  1. List pool members and health status
    bash
    vmware-avi pool members my-pool
  2. Disable the target server (graceful drain)
    bash
    vmware-avi pool disable my-pool 10.1.1.5
  3. Monitor analytics to confirm active connections are draining
    bash
    vmware-avi analytics my-vs
  4. Perform maintenance on the server
  5. Re-enable the server
    bash
    vmware-avi pool enable my-pool 10.1.1.5
  6. Verify health status is green
    bash
    vmware-avi pool members my-pool

2. AKO Ingress Not Creating VS

When a developer reports their Ingress is not producing a Virtual Service:

  1. Verify AKO is running
    bash
    vmware-avi ako status
  2. Validate Ingress annotations
    bash
    vmware-avi ako ingress check <namespace>
  3. Check sync status between K8s and Controller
    bash
    vmware-avi ako sync status
  4. If annotations are wrong, diagnose the specific Ingress
    bash
    vmware-avi ako ingress diagnose <ingress-name>
  5. If sync drift is detected, review the diff and force resync if needed
    bash
    vmware-avi ako sync diffvmware-avi ako sync force

3. SSL Certificate Expiry Audit

Expired certificates cause outages. Run periodic checks:

  1. Check all certificates expiring within 30 days
    bash
    vmware-avi ssl expiry --days 30
  2. Review which VS uses each expiring certificate (output includes VS mapping)
  3. Plan renewal with the certificate team
  4. After renewal, verify the new certificate is in place
    bash
    vmware-avi ssl list

Troubleshooting

"Controller unreachable" error

  1. Run vmware-avi doctor to verify connectivity
  2. Check if the controller address and port are correct in ~/.vmware-avi/config.yaml
  3. For self-signed certs: set verify_ssl: false in config.yaml (lab environments only)

AKO Pod in CrashLoopBackOff

  1. Check logs: vmware-avi ako logs --tail 50
  2. Common causes: wrong controller IP in values.yaml, network policy blocking AKO to Controller, expired credentials
  3. Fix config: vmware-avi ako config show to inspect, then vmware-avi ako config upgrade with corrected values (release auto-discovered; pulls the official Broadcom OCI chart)

Ingress created but no VS on Controller

  1. Validate annotations: vmware-avi ako ingress check <namespace>
  2. Check AKO logs for rejection reason: vmware-avi ako logs --since 5m
  3. Run sync diff: vmware-avi ako sync diff to see if the object is stuck

Pool member shows "down" after enable

Health monitor may still be failing. The member is enabled but unhealthy. Check the actual health status on the Controller side. Fix the backend service first, then the health status will auto-recover.

SSL expiry check shows 0 certificates

Verify the controller connection has tenant-level access. Certificates are tenant-scoped in AVI. The configured user may only see certs in their tenant.

AKO sync force has no effect

Force resync triggers AKO to re-reconcile all K8s objects. If the drift persists, the issue is likely in the K8s resource definition itself (bad annotation, missing secret). Use vmware-avi ako ingress diagnose to pinpoint the root cause.


Safety Features

FeatureDetails
Double ConfirmationDestructive ops (VS disable, pool member disable, AKO restart, Helm upgrade, force resync) require 2 sequential confirmations
Dry-Run Defaultako config upgrade defaults to --dry-run mode -- user must explicitly confirm to apply
MCP Blast Radiusset_virtual_service_enabled, disable_lb_pool_member, restart_ako, force_ako_sync and upgrade_ako_config take confirm (default false): a call without confirm=true returns blast_radius (what would change: VS/pool and member counts, the AKO pod and its Ingresses, the Helm release and chart move) and changes nothing. confirm=true is refused on a blocker (the pool's only enabled member, a terminating AKO pod, a failing helm --dry-run) or an unreadable field. the old confirmed / dry_run aliases were removed in 2.4.1 and are refused as unknown arguments
Audit TrailAll operations logged to ~/.vmware/audit.db via vmware-policy (@vmware_tool decorator)
Password Protection.env file loading with permission check; never in shell history
SSL Supportverify_ssl: false for self-signed certs in isolated lab environments only
Prompt Injection ProtectionAll API-sourced text truncated (500 chars max) and C0/C1 control characters stripped
Input ValidationPool names, VS names, IP addresses, and namespace names validated before API calls

Security Details

  • Source Code: github.com/vmware-skills/VMware-AVI
  • Config File Contents: config.yaml stores controller addresses, usernames, and AKO settings. No passwords or tokens. All secrets stored exclusively in .env
  • Webhook Data Scope: Disabled by default. No third-party data transmission
  • TLS Verification: Enabled by default. Disable only for self-signed certificate environments
  • Prompt Injection Protection: _sanitize() truncation + control character cleanup on all AVI API responses
  • Least Privilege: Use a dedicated AVI service account with minimal permissions. AKO operations require only namespace-scoped kubeconfig access

Companion Skills

SkillScopeToolsInstall
vmware-aviAVI load balancer, AKO K8s operations28uv tool install vmware-avi
vmware-aiopsVM lifecycle, deployment, guest ops, cluster49uv tool install vmware-aiops
vmware-monitorRead-only monitoring, alarms, events27uv tool install vmware-monitor
vmware-storageDatastores, iSCSI, vSAN11uv tool install vmware-storage
vmware-vksTanzu Namespaces, TKC cluster lifecycle20uv tool install vmware-vks
vmware-nsxNSX segments, gateways, NAT, routing33uv tool install vmware-nsx-mgmt
vmware-nsx-securityDFW firewall, security groups, IDS/IPS21uv tool install vmware-nsx-security
vmware-ariaAria Ops: metrics, alerts, capacity28uv tool install vmware-aria
vmware-hardenCompliance baselines, drift detection6uv tool install vmware-harden

Version Compatibility

AVI Controller / EnvironmentSupportNotes
AVI 30.x in VCF 9.1✅ Fullavisdk 30.x line covers VCF 9.1 bundle
AVI 30.x in VCF 9.0✅ FullStandard AVI / NSX ALB integration
AVI 22.x — 31.x standalone✅ FullPin avisdk>=22.1,<31.0
AKO 1.10+✅ FullKubernetes integration via AKO ConfigMap / GatewayClass
Official Broadcom References

Troubleshooting & Contributing

If you encounter any errors or issues, please send the error message, logs, or screenshots to [email protected]. Contributions are welcome -- feel free to join us in maintaining and improving this project!

Remote access (HTTPS) and limiting tools

By default vmware-avi mcp speaks stdio to one local client and offers every tool. Two options change that (vmware-policy ≥ 1.21.0).

Serve over HTTPS so clients on other machines can connect. Every caller needs a bearer token:

bash
vmware-audit token create alice          # prints the token once; give it to alicevmware-audit token list                  # names onlyvmware-audit token revoke alice          # refused from its next request, no restartvmware-avi mcp --transport https --host 0.0.0.0 --port 8443 \    --cert /etc/vmware-mcp/server.pem --key /etc/vmware-mcp/server-key.pem \    --public-name mcp.example.com

Connect a client (Claude Code shown; any MCP client that supports streamable HTTP and custom headers works):

bash
claude mcp add --transport http vmware-avi https://mcp.example.com:8443/mcp \    --header "Authorization: Bearer $VMWARE_MCP_TOKEN"
json
{  "mcpServers": {    "vmware-avi": {      "type": "http",      "url": "https://mcp.example.com:8443/mcp",      "headers": { "Authorization": "Bearer ${VMWARE_MCP_TOKEN}" }    }  }}
  • The server will not start without a token, refuses Host/Origin values outside --public-name, and checks before it binds that unauthenticated requests get 401. Use a certificate your clients trust for those names.
  • Behind a TLS-terminating reverse proxy on the same machine use --transport http --host 127.0.0.1 --public-name mcp.example.com and pass the Authorization header through.
  • Behind a load balancer or gateway on another machine, keep --transport https (a self-signed certificate is fine), list in --public-name the host name the balancer sends as Host, and have it forward Authorization. Its health probe can use GET /healthz, which needs no token and returns only {"status": "ok"} (vmware-policy ≥ 1.23.0).
  • Send traceparent or X-Request-ID with each request to have it stored on the audit row; vmware-audit log --correlation-id ID then finds the calls behind one platform request.
  • The audit log records each caller as token:<name>. Calls run side by side: each holds its own session to a Controller (or Kubernetes context), up to VMWARE_MCP_POOL_SIZE (default 2) sessions per target. Each Controller session is a login on the Controller; a call waits at most 300 s for a free one.
  • Everyone who can reach the endpoint acts with this server's account. Tokens identify callers; they grant nothing on the platform. Run one endpoint per privilege level.
  • Several people or roles on one endpoint: run vmware-audit roles enable once, then give each token a role (vmware-audit token create NAME --role reader, or a role in roles.yaml naming tools and targets; vmware-policy ≥ 1.24.0). A role limits what the token may call on this endpoint; it cannot grant more than the account has. See vmware-policy's README, "Roles for network callers".

Offer only read tools, plus the writes you choose:

bash
vmware-avi mcp --expose read --allow-write disable_lb_pool_member# or: VMWARE_AVI_MCP_EXPOSE=read VMWARE_AVI_MCP_ALLOW_WRITE=disable_lb_pool_member vmware-avi mcp

Tools not offered do not appear in the client's tool list. A bad value or an unknown write tool stops the server (exit 2). This limits what clients are offered; it is not authorization, so the account itself should be least-privilege.

Details: skills/vmware-avi/references/setup-guide.md ("Serving MCP over HTTPS", "Limiting which tools are offered").

License

MIT

来源:README.md,提交 29800a7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

8
  1. v2.4.0最新Oct 16, 2026
  2. v2.3.0Oct 15, 2026
  3. v2.2.0Oct 15, 2026
  4. v2.1.0Oct 15, 2026
  5. v2.0.0Oct 14, 2026
  6. v1.11.0Sep 20, 2026
  7. v1.10.0Sep 19, 2026
  8. v1.9.1Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。