
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 助理管理 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 埠。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 VMware VKS,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
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.
MCP Skill + CLI for VMware vSphere Kubernetes Service (VKS) management — Supervisor clusters, vSphere Namespaces, and VKS Cluster lifecycle. 25 MCP tools.
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.
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
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:
For a truly air-gapped host, build the wheels on a connected machine and copy them over — the target then needs no network:
Common Workflows
Deploy a New TKC Cluster
- Check compatibility →
vmware-vks check - List available K8s versions →
vmware-vks tkc versions -n dev - 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 fromvmware-vks supervisor storage-policies) - 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 - 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
- Check current state →
vmware-vks tkc get dev-cluster -n dev - Scale up →
vmware-vks tkc scale dev-cluster -n dev --workers 6 - Monitor progress →
vmware-vks tkc get dev-cluster -n dev(watch phase) - Scale back down after test
Namespace Resource Management
- List namespaces →
vmware-vks namespace list - Check usage →
vmware-vks storage -n dev - Update quota →
vmware-vks namespace update dev --cpu 32000 --memory 65536
Tool Reference (25 tools)
Supervisor
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
TKC
Access
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)
Permissions
Architecture
CLI Reference
MCP Server
After uv tool install vmware-vks, start the MCP server with one command (v1.5.15+):
Agent Configuration
Add to your AI agent's MCP config:
Alternative: uvx (no install) or legacy entry point
Behind a corporate TLS proxy? uvx may fail with
invalid peer certificate: UnknownIssuer. Use the recommendedvmware-vks mcpform above (no network needed), or setUV_NATIVE_TLS=true.
Safety
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
Official Broadcom References
- SDKs: https://developer.broadcom.com/sdks — VCF Python SDK (unified SDK in VCF 9+)
- REST APIs: https://developer.broadcom.com/xapis — vSphere Automation API (Workload Management endpoints)
- CLI Tools: https://developer.broadcom.com/tools — kubectl-vsphere, PowerCLI 9.1
Related Projects
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:
Connect a client (Claude Code shown; any MCP client that supports streamable HTTP and custom headers works):
- 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.comand pass theAuthorizationheader through. - Behind a load balancer or gateway on another machine, keep
--transport https(a self-signed certificate is fine), list in--public-namethe host name the balancer sends asHost, and have it forwardAuthorization. Its health probe can useGET /healthz, which needs no token and returns only{"status": "ok"}(vmware-policy ≥ 1.23.0). - Send
traceparentorX-Request-IDwith each request to have it stored on the audit row;vmware-audit log --correlation-id IDthen 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 unlessVMWARE_MCP_FILE_ROOTnames 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 toVMWARE_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-infoshows which account that is and what it may do. - Several people or roles on one endpoint: run
vmware-audit roles enableonce, then give each token a role (vmware-audit token create NAME --role reader, or a role inroles.yamlnaming 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:
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
來源:README.md,提交 a6d5bf3
工具
0版本歷史
1- v1.8.8最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分