VMware VDI (Horizon)

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

VMware/Omnissa Horizon VDI ops: pools, sessions, machines, images — 27 MCP tools.

概览

AI 生成的概览

让助手通过 Horizon 8 Connection Server REST API 读取和操作 VMware/Omnissa Horizon VDI 的桌面池、会话、虚拟机、镜像与任务。

可以做什么
基于 Horizon 8 Connection Server REST API 提供 27 个 MCP 工具(16 个读取、11 个写入):健康摘要、会话与虚拟机列表、事件、会话并发与按池利用率统计,以及池、RDS 场、应用池、授权和镜像列表。写入工具包括池启用/禁用、授权添加/移除、会话注销/断开/发送消息、虚拟机重置/维护/移除,以及镜像推送,另有任务状态与取消。读取被描述为非破坏性;写入会预览影响范围并记录审计日志。
适用场景
适合 vSphere 层工具看不到的 VDI 日常运维:查找卡在故障桌面上的用户、注销用户以解锁配置文件、排查池为何无法置备,或向池推送已打补丁的黄金镜像。它同时以 MCP 服务器和 CLI 形式发布,供服务台与脚本使用。
运行要求
从 PyPI 安装的本地进程(uv tool install vmware-vdi),以 vmware-vdi mcp 运行,仅限桌面端。需要可访问的 Horizon 8.x 或 Omnissa Horizon Connection Server、管理员用户名、AD 域和密码,并通过 VMWARE_VDI_CONFIG 指定配置路径。凭据可通过 VMWARE_VDI_ _PASSWORD 注入。默认启用 TLS 校验。
安装前请注意
写入工具会改变真实 VDI 状态:会话注销/断开、虚拟机重置、维护与移除、授权变更、池启用/禁用,以及会重建池中每台桌面的镜像推送。受控写入需要 confirm(默认 false),应在用户查看返回的影响范围后再确认。凭据存放在 0600 的 .env 文件中(静态混淆);建议从密钥管理器注入 VMWARE_VDI_ _PASSWORD。授权取决于 Horizon 账户自身的 RBAC 角色。项目处于 beta,GET 字段投影尚待对真实服务器验证。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

VMware VDI (Horizon)

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.

AI-powered intelligent operations for VMware / Omnissa Horizon VDI — manage desktop pools, RDS farms, published apps, user sessions, desktop machines, entitlements, instant-clone images, and Horizon events/health/statistics through the Horizon 8 Connection Server REST API. Ships as both an MCP server (for AI agents) and a CLI (for help-desk and scripting). Part of the VMware skill family.

Disclaimer: Community-maintained open-source project, not affiliated with, endorsed by, or sponsored by VMware, Inc., Broadcom Inc., or Omnissa, LLC. "VMware", "Horizon", and "Omnissa" are trademarks of their respective owners. Source is publicly auditable under the MIT license.

Status: v1.0.0 (beta). REST endpoints are verified against the official Horizon Server API; GET-response field projections are defensive and pending validation against a live Connection Server (a field-name mismatch yields empty results, not a crash — see the beta note).

Upgrading to 2.0

2.0 renames all 27 MCP tools so every name starts with a verb (e.g. ad_user_search → search_ad_users, app_pool_list → list_app_pools, entitlement_add → add_entitlement). 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.

Why vmware-vdi

Every other VMware family skill stops at the vСenter VM. A Horizon desktop pool sits on those VMs — so vmware-aiops can reset the backing VM, but it cannot see a user session, log a user off, disable a pool, or push a golden image. vmware-vdi fills exactly that day-2 VDI gap — "who is stuck on a broken desktop", "log this user off so their profile unlocks", "why is this pool not provisioning", "push the patched image to Finance tonight" — with the family's governed-ops harness: every write is audited, previews its blast radius, and is authorized by the Horizon account's own RBAC role.

Capabilities — 27 MCP tools (16 read / 11 write)

CategoryTools
Monitoringhealth summary · session list/get · machine list/get · event list
Statisticssession concurrency stats · per-pool utilization
Managementpool list/get · farm list · app-pool list · entitlement list · image list · AD search · pool enable/disable · entitlement add/remove
Ops actionssession logoff / disconnect / message · machine reset / maintenance / remove
Taskstask status · image push · task cancel

Reads are strictly non-destructive. Writes preview their blast radius, double-confirm at the CLI, and are audit-logged to ~/.vmware/audit.db. push_desktop_pool_image recreates every desktop in a pool — the highest single-call blast radius in the family — and its preview states affected-desktop and in-session counts before any confirm, together with occupancy: determined when those counts can be believed, unknown when sessions exist that cannot be attributed to any pool or farm. An unknown occupancy refuses the confirm rather than reporting an unverified zero; overriding it needs --acknowledge-unknown-occupancy and is recorded in the audit row. A machine that names no desktop pool also makes the desktop count a lower bound ("at least N"); that refuses the confirm with no override.

On MCP, every gated write takes confirm (default false). A call without it returns blast_radius — the object's identity, counts, identifiers up to 20, blockers and unmeasured — and changes nothing; the acting response carries the same dict. An agent should show it to the user and pass confirm=true only after they agree. When something the blast radius depends on could not be read — a machine's state, a session's user, a task's type or state, a pool's enabled flag, a pool's current entitlements — confirm=true is refused with a message naming what to check.

Quick start

bash
uv tool install vmware-vdivmware-vdi init      # friendly wizard: connect to a Connection Server + discover your poolsvmware-vdi doctor    # verify config / credentials / connectivityvmware-vdi health    # one-glance VDI health

vmware-vdi init prompts for the Connection Server host, admin username, AD domain, and password; writes ~/.vmware-vdi/config.yaml + a 0600 .env (password obfuscated); tests the login; and on success discovers your pools, machines, and sessions with the next commands to try.

Example workflows

Help-desk — a user's desktop is stuck

bash
vmware-vdi session list --user alicevmware-vdi machine list --state AGENT_UNREACHABLEvmware-vdi session logoff --user alice --dry-run   # preview which sessionsvmware-vdi session logoff --user alice             # double-confirm, then logs off + audits

Patch night — push a new golden image

bash
vmware-vdi image listvmware-vdi pool push-image --id pool-fin --dry-run  # BLAST RADIUS: N desktops, M logged-in usersvmware-vdi pool push-image --id pool-fin            # double-confirm; returns a taskvmware-vdi task status --pool pool-fin              # track progress

MCP server

json
{  "mcpServers": {    "vmware-vdi": {      "command": "vmware-vdi",      "args": ["mcp"],      "env": { "VMWARE_VDI_CONFIG": "~/.vmware-vdi/config.yaml" }    }  }}

Using the installed vmware-vdi mcp console script (not uvx) avoids a PyPI re-resolve on every launch — important behind enterprise TLS proxies.

Supported versions

  • VMware Horizon 8.x (primary) — Connection Server REST API /rest/v1.
  • Latest Omnissa Horizon (2406 / 2412+) — same /rest/v1 lineage.

Security

  • Authorization = Horizon RBAC. The skill does not gate read vs write; point a target at a read-only Horizon admin role and every write is refused at the Connection Server, un-bypassably.
  • Credentials live only in ~/.vmware-vdi/.env (0600, obfuscated b64: at rest); config files hold host/username/domain only. Inject VMWARE_VDI_<TARGET>_PASSWORD from a secret manager for real secrecy.
  • TLS verification on by default. All Connection-Server text is sanitize()d against prompt injection.
  • No outbound calls except to the configured Connection Server — no webhooks, no telemetry.

See SECURITY.md and skills/vmware-vdi/references/setup-guide.md.

Beta note

REST endpoints are verified against the official Horizon Server API operation index. GET-response field names (and a few write bodies) are defensive (.get() with fallbacks) and pending validation against a live Connection Server. On a field-name mismatch a list reads empty rather than crashing. First real-Horizon use should run vmware-vdi init and confirm the session/machine/pool projections; please file an issue with raw *_get output if a projection looks empty. Quality: 32 regression tests, ruff clean, bandit 0, tool endpoints pinned to a verified spec.

Companion skills

Part of the VMware skill family — install the modules you need:

Remote access (HTTPS) and limiting tools

By default vmware-vdi 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-vdi 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-vdi https://mcp.example.com:8443/mcp \    --header "Authorization: Bearer $VMWARE_MCP_TOKEN"
json
{  "mcpServers": {    "vmware-vdi": {      "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, with or without a target: each target keeps up to VMWARE_MCP_POOL_SIZE sessions (default 2), and each session is a login on the target. A call that finds them all busy waits at most 300 s for 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-vdi mcp --expose read --allow-write add_entitlement# or: VMWARE_VDI_MCP_EXPOSE=read VMWARE_VDI_MCP_ALLOW_WRITE=add_entitlement vmware-vdi 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-vdi/references/setup-guide.md ("Serving MCP over HTTPS", "Limiting which tools are offered").

License

MIT — see LICENSE.

来源:README.md,提交 0c49764

工具

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

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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