VMware VKS

io.github.zw008由 GitHub 账号 zw008 发布v1.8.8更新于 Oct 24, 2026

vSphere with Tanzu (VKS): Namespace and TanzuKubernetesCluster lifecycle. Requires vSphere 8.x+.

概览

AI 生成的概览

让 AI 助手管理 VMware vSphere Kubernetes Service(VKS)的 Supervisor 集群、vSphere 命名空间和 TanzuKubernetesCluster 生命周期。

可以做什么
通过 stdio 提供 23 个 MCP 工具,用于 vSphere with Tanzu 管理。只读工具涵盖 Supervisor 状态、存储策略、命名空间、VM 类、TKC 集群、可用 Kubernetes 版本、Harbor 仓库信息和命名空间存储用量。写入工具可创建、更新、删除命名空间和 TKC 集群,扩缩工作节点、升级 Kubernetes 版本,并获取 Supervisor 或 TKC 的 kubeconfig。破坏性调用默认先预览影响范围,需显式确认才会执行。
适用场景
当助手需要检查或操作已启用工作负载管理的 vSphere 8.x 环境时适用:检查 Supervisor 兼容性、创建命名空间、部署或扩缩 TanzuKubernetesCluster 工作负载,以及获取集群访问用的 kubeconfig。
运行要求
需本地 Python 3.10+,通过 uv 或 pip 安装 PyPI 包 vmware-vks,并以 vmware-vks mcp 的 stdio 进程运行。需要 vSphere 8.0+ 且启用工作负载管理,并具备 Enterprise Plus 或 VCF 许可;需要含 vCenter 主机和用户名的 config.yaml,以及在 .env 文件中按目标命名的密码环境变量,例如 VMWARE_VKS_VCENTER01_PASSWORD。需能访问 vCenter 及 Supervisor API 的 6443 端口。
安装前请注意
写入工具会创建、修改、扩缩、升级和删除命名空间与集群;删除虽有防护但仍具破坏性。kubeconfig 工具返回有效数小时的 bearer 令牌,并可写入磁盘,应视为凭据。密码仅从 VMWARE_VKS_VCENTER01_PASSWORD 等环境变量读取,不写入 config.yaml。写入操作会记录到本地审计文件。该项目为社区项目,并非 VMware 官方产品。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

VMware VKS

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 | 中文

MCP Skill + CLI for VMware vSphere Kubernetes Service (VKS) management — Supervisor clusters, vSphere Namespaces, and VKS Cluster lifecycle. 25 MCP tools.

[License: MIT]

Upgrading to 3.0

3.0 renames the two kubeconfig tools: get_supervisor_kubeconfig → issue_supervisor_kubeconfig, get_tkc_kubeconfig → issue_tkc_kubeconfig. They issue a credential (a Supervisor bearer token) rather than read something, and a get_ name told agents otherwise. Parameters, annotations, safety and CLI commands (vmware-vks kubeconfig supervisor / kubeconfig get) are unchanged; callers of the old names must switch (saved vmware-pilot workflows are translated by Pilot ≥ 2.0.0). Deny rules in ~/.vmware/rules.yaml naming the old names keep working with vmware-policy ≥ 1.19.0. Details in RELEASE_NOTES.md.

Upgrading to 2.0

2.0 renames the three VM Service tools: list_vm_snapshots → list_vm_service_snapshots, list_vm_groups → list_vm_service_groups, list_vm_network_interfaces → list_vm_service_network_interfaces. The reason is a name clash: in the family's 2.0, vmware-aiops and vmware-monitor call their vSphere VM snapshot tool list_vm_snapshots, while these list Kubernetes VM Service (vm-operator) objects. Trap: an agent prompt, script or saved workflow that still calls list_vm_snapshots with vmware-aiops or vmware-monitor also loaded now reaches the vSphere tool, not this one — update it. A VKS-scoped deny rule naming list_vm_snapshots now also matches the aiops/monitor tool (vmware-policy ≥ 1.18 matches both names; vmware-audit policy lists such rules). Parameters, safety gates and CLI commands are unchanged; the full table is in RELEASE_NOTES.md. 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.

Companion Skills

Part of the VMware MCP Skills family. Each skill handles a distinct domain — install only what you need.

SkillScopeToolsInstall
vmware-aiops ⭐ entry pointVM lifecycle, deployment, guest ops, clusters49uv tool install vmware-aiops
vmware-monitorRead-only monitoring, alarms, events, VM info27uv tool install vmware-monitor
vmware-storageDatastores, iSCSI, vSAN11uv tool install vmware-storage
vmware-nsxNSX networking: segments, gateways, NAT, IPAM33uv tool install vmware-nsx-mgmt
vmware-nsx-securityDFW microsegmentation, security groups, Traceflow21uv tool install vmware-nsx-security
vmware-ariaAria Ops metrics, alerts, capacity planning28uv tool install vmware-aria

Prerequisites

  • Python 3.10+ — required for uv tool install
  • vSphere 8.0+ — Workload Management (Supervisor) APIs require vSphere 8.x
  • Workload Management enabled — WCP must be enabled on at least one compute cluster
  • License — vSphere Kubernetes Service (Enterprise Plus or VMware Cloud Foundation)

Run vmware-vks check after setup to verify all requirements are met.

Quick Start

bash
# Installuv tool install vmware-vks
# Configuremkdir -p ~/.vmware-vkscp config.example.yaml ~/.vmware-vks/config.yaml# Edit config.yaml with your vCenter host and username
# One password env var per target, named after the target in config.yaml:# target "vcenter01" (the one config.example.yaml ships) -> VMWARE_VKS_VCENTER01_PASSWORDecho "VMWARE_VKS_VCENTER01_PASSWORD=your_password" > ~/.vmware-vks/.envchmod 600 ~/.vmware-vks/.env
# Verifyvmware-vks check
# Common operationsvmware-vks supervisor status domain-c1vmware-vks namespace listvmware-vks tkc listvmware-vks tkc create my-cluster -n dev --version v1.28.4+vmware.1 --vm-class best-effort-largevmware-vks tkc create my-cluster -n dev --apply

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-vks

Common Workflows

Deploy a New TKC Cluster

  1. Check compatibility → vmware-vks check
  2. List available K8s versions → vmware-vks tkc versions -n dev
  3. Create namespace (if needed) → vmware-vks namespace create dev --cluster domain-c1 --storage-policy <policy-id> --cpu 16000 --memory 32768 --apply (get the policy ID from vmware-vks supervisor storage-policies)
  4. Create TKC cluster → vmware-vks tkc create dev-cluster -n dev --version v1.28.4+vmware.1 --control-plane 1 --workers 3 --vm-class best-effort-large --apply
  5. Get kubeconfig (credential; only when you need cluster access) → vmware-vks kubeconfig get dev-cluster -n dev -o ./kubeconfig — writes an owner-only file instead of printing the token

Scale Workers for Load Testing

  1. Check current state → vmware-vks tkc get dev-cluster -n dev
  2. Scale up → vmware-vks tkc scale dev-cluster -n dev --workers 6
  3. Monitor progress → vmware-vks tkc get dev-cluster -n dev (watch phase)
  4. Scale back down after test

Namespace Resource Management

  1. List namespaces → vmware-vks namespace list
  2. Check usage → vmware-vks storage -n dev
  3. Update quota → vmware-vks namespace update dev --cpu 32000 --memory 65536

Tool Reference (25 tools)

Supervisor

ToolDescriptionType
check_vks_compatibilityvCenter version check + WCP statusRead
get_supervisor_upgrade_riskvCenter 9.1.0/9.1.1 pre-upgrade advisory scope; VUMDB schema remains unmeasured; links to the official checkerRead
get_supervisor_statusSupervisor cluster status and K8s API endpointRead
list_supervisor_storage_policiesvCenter storage policies (policy ID, name, description)Read

For an upgrade from vCenter 8.0 Update 3 or 9.0.0–9.0.2 to 9.1.0/9.1.1, run supervisor upgrade-risk before scheduling. Its report cannot inspect the VUMDB schema or establish upgrade clearance. If a Supervisor/VKS environment is in scope, follow the Broadcom checker and remediation instructions or VDT, then back up vCenter and Supervisor before upgrading.

Namespace

ToolDescriptionType
list_namespacesAll vSphere Namespaces with statusRead
get_namespaceNamespace detail (quotas, storage, roles)Read
create_namespaceCreate Namespace; previews by default (confirm=True applies)Write
update_namespaceModify quotas and storage policyWrite
delete_namespaceDelete with TKC guard (rejects if clusters exist)Write
list_vm_classesAvailable VM classes for TKC sizingRead

TKC

ToolDescriptionType
list_tkc_clustersTanzuKubernetesCluster list with statusRead
get_tkc_clusterCluster detail (nodes, health, conditions)Read
get_tkc_available_versionsSupported K8s versions on SupervisorRead
create_tkc_clusterCreate TKC; previews the YAML plan by default (confirm=True applies)Write
scale_tkc_clusterScale worker node countWrite
upgrade_tkc_clusterUpgrade K8s versionWrite
delete_tkc_clusterDelete with workload guardWrite

Access

ToolDescriptionType
issue_supervisor_kubeconfigSupervisor kubeconfig — credential (bearer token); inline or owner-only fileWrite
issue_tkc_kubeconfigTKC kubeconfig — credential (bearer token); inline or owner-only fileWrite
get_harbor_infoEmbedded Harbor registry info (id, cluster, version, URL, health, storage used)Read
list_namespace_storage_usagePVC list and capacity statsRead

VCF 9.1 TKC access: In one live 9.1 report, issue_tkc_kubeconfig put a Supervisor JWT into the guest kubeconfig and the TKC API rejected it with 401. Treat the generated file as unverified for guest access; test it against the guest API before use. See issue #27. Supervisor-scoped TKC reads are unaffected in that report.

VM Service (vm-operator)

ToolDescriptionType
list_vm_service_snapshotsVirtualMachineSnapshot objects in a vSphere NamespaceRead
list_vm_service_groupsVirtualMachineGroup objects and their boot order in a NamespaceRead
list_vm_service_network_interfacesNetwork interfaces (multi-NIC) of one VM Service VirtualMachineRead

Permissions

ToolDescriptionType
get_access_infoWhich account the server uses and whether it holds each tool's vSphere privileges on the root folder. Kubernetes calls are authorized by the namespace's own permissions, which it does not checkRead

Architecture

User (Natural Language)  ↓AI Agent (Claude Code / Goose / Cursor)  ↓ reads SKILL.md  ↓vmware-vks CLI  ─── or ───  vmware-vks MCP Server (stdio)  │  ├─ Layer 1: pyVmomi (/sdk) + vSphere Automation REST (/api)  │   Supervisor status, storage policies, Namespace CRUD, VM classes, Harbor  │   Two session stores: the SOAP session from SmartConnect, and a separate  │     REST session id from POST /api/session (vmware-api-session-id header)  │  └─ Layer 2: kubernetes client → Supervisor K8s API endpoint      TKC CR apply / get / delete  (cluster.x-k8s.io API version auto-detected:        prefers v1 when Supervisor serves it, falls back to v1beta1 for vSphere 8.0)      Kubeconfig built in-memory from the POST /wcp/login bearer token        (a third credential, and no temp file on disk)  ↓vCenter Server 8.x+ (Workload Management enabled)  ↓Supervisor Cluster → vSphere Namespaces → TanzuKubernetesCluster

CLI Reference

bash
# Pre-flight diagnosticsvmware-vks check
# Supervisorvmware-vks supervisor status <cluster-id>vmware-vks supervisor upgrade-risk --to 9.1.1vmware-vks supervisor storage-policies
# Namespacevmware-vks namespace listvmware-vks namespace get <name>vmware-vks namespace create <name> --cluster <id> --storage-policy <policy>vmware-vks namespace create <name> --cluster <id> --storage-policy <policy> --applyvmware-vks namespace update <name> [--cpu <mhz>] [--memory <mib>]vmware-vks namespace delete <name>vmware-vks namespace vm-classes
# VKS Clustervmware-vks tkc list [-n <namespace>]vmware-vks tkc get <name> -n <namespace>vmware-vks tkc versions -n <namespace>vmware-vks tkc create <name> -n <namespace> [--version <v>] [--vm-class <c>]vmware-vks tkc create <name> -n <namespace> --applyvmware-vks tkc scale <name> -n <namespace> --workers <n>vmware-vks tkc upgrade <name> -n <namespace> --version <v>vmware-vks tkc delete <name> -n <namespace>
# Kubeconfigvmware-vks kubeconfig supervisor -n <namespace> [-o <path>]vmware-vks kubeconfig get <cluster-name> -n <namespace> [-o <path>]
# Harbor & Storagevmware-vks harborvmware-vks storage -n <namespace>

MCP Server

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

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

Agent Configuration

Add to your AI agent's MCP config:

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

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

Safety

FeatureDescription
Read-heavy16/25 tools are read-only
Preview by defaultcreate_namespace, create_tkc_cluster, delete_namespace, delete_tkc_cluster take confirm (default False): a call without it changes nothing and returns blast_radius — what would be created, or the TKC clusters, VMs, PVCs, nodes and workloads a delete destroys. confirm=True is refused when a blocker stands or part of the blast radius could not be read. the old confirmed / dry_run aliases were removed in 3.4.2 and are refused as unknown arguments
TKC guarddelete_namespace rejects if TKC clusters exist inside
Workload guarddelete_tkc_cluster rejects if Deployments/StatefulSets are running
Credential safetyPasswords only from environment variables (.env file), never in config.yaml
In-memory kubeconfigFor the skill's own API calls the Supervisor/TKC kubeconfig (with the Supervisor bearer token) is built as an in-memory dict and loaded via load_kube_config_from_dict() — never written to a temp file on disk (v1.5.18+)
Kubeconfig is credential accessissue_supervisor_kubeconfig / issue_tkc_kubeconfig return a bearer token valid for hours: annotated readOnlyHint: false (clients ask first), risk_level: medium, audit row redacts the kubeconfig. Run only on explicit request; export with output_path / -o to an owner-only (0600) file
Audit loggingAll write operations logged to ~/.vmware-vks/audit.log
stdio transportNo network listener; MCP runs over stdio only

Troubleshooting

"VKS not compatible" error

Workload Management must be enabled in vCenter. Check: vCenter UI -> Workload Management. Requires vSphere 8.x+ with Enterprise Plus or VCF license.

Every command fails with "session is not authenticated"

The password is right. Either the session expired (run the command again; a new session is opened) or the account has no vSphere role, so vCenter shows no session for it and every call fails. VKS does not refuse such a login when it connects, because an account holding only Supervisor namespace permissions can look the same and still work; the error appears on the first call that needs a role. Assign the account a role (Read-Only or higher) on the vCenter root folder under Administration > Access Control > Global Permissions; Namespace and TKC work also needs Workload Management privileges.

Every REST tool returns 401

The namespace, storage-policy and Supervisor-status tools authenticate against the vSphere Automation REST API with a session id from POST /api/session — not the pyVmomi SOAP session key, which that API never issued and always rejects. A 401 is refreshed automatically once; if it persists, check whether a proxy between you and vCenter strips the vmware-api-session-id header. An account short of Workload Management permissions gets a 403, not a 401.

Namespace creation fails with "storage policy not found"

List policies first: vmware-vks supervisor storage-policies, then pass the Policy ID column value (not the display name) as --storage-policy.

TKC cluster stuck in "Creating" phase

Check Supervisor events in vCenter. Common causes: insufficient resources on ESXi hosts, network issues with NSX-T, or storage policy not available on target datastore.

Kubeconfig retrieval fails

Supervisor API endpoint must be reachable from the machine running vmware-vks. Check firewall rules for port 6443.

Scale operation has no effect

Verify the cluster is in "Running" phase before scaling. Clusters in "Creating" or "Updating" phase reject scale operations.

Delete namespace rejected unexpectedly

The namespace delete guard prevents deletion when TKC clusters exist inside. Delete all TKC clusters in the namespace first, then retry.

Version Compatibility

vSphere / VCFSupportNotes
9.0 / 9.1⚠ Partial external 9.1 reportA 9.1 lab confirmed Supervisor /wcp/login on the Supervisor endpoint, but its guest TKC API rejects the kubeconfig from this skill with 401 (#27). Maintainers have not verified the full Workload Management API surface; run check_vks_compatibility and report results.
8.0+FullWorkload Management APIs available
7.xNot supportedWCP API surface is different; use vSphere 8.x
Official Broadcom References

Related Projects

SkillScopeToolsInstall
vmware-aiops ⭐ entry pointVM lifecycle, deployment, guest ops, clusters49uv tool install vmware-aiops
vmware-monitorRead-only monitoring, alarms, events, VM info27uv tool install vmware-monitor
vmware-storageDatastores, iSCSI, vSAN11uv tool install vmware-storage
vmware-nsxNSX networking: segments, gateways, NAT, IPAM33uv tool install vmware-nsx-mgmt
vmware-nsx-securityDFW microsegmentation, security groups, Traceflow21uv tool install vmware-nsx-security
vmware-ariaAria Ops metrics, alerts, capacity planning28uv tool install vmware-aria

Remote access (HTTPS) and limiting tools

By default vmware-vks 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-vks 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-vks https://mcp.example.com:8443/mcp \    --header "Authorization: Bearer $VMWARE_MCP_TOKEN"
json
{  "mcpServers": {    "vmware-vks": {      "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.
  • Tools that read or write files on this server (here: issue_*_kubeconfig(output_path)) never touch its configuration, tokens, audit log or TLS key, and over the network they are off unless VMWARE_MCP_FILE_ROOT names a directory for them (vmware-policy ≥ 1.23.1).
  • The audit log records each caller as token:<name>. Calls run side by side, also on the same target: the server keeps up to VMWARE_MCP_POOL_SIZE (default 2) sessions per target, each one a login on that target, and a call waits at most 300 s for a free session (vmware-policy ≥ 1.22.0).
  • 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. vmware-vks access-info shows which account that is and what it may do.
  • 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-vks mcp --expose read --allow-write create_namespace# or: VMWARE_VKS_MCP_EXPOSE=read VMWARE_VKS_MCP_ALLOW_WRITE=create_namespace vmware-vks 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-vks/references/setup-guide.md ("Serving MCP over HTTPS", "Limiting which tools are offered").

License

MIT

来源:README.md,提交 a6d5bf3

工具

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

版本历史

1
  1. v1.8.8最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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