Skip to content
Back to search

vmware-aiops

AI-powered VMware vCenter/ESXi VM lifecycle and deployment with 61 MCP tools.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/vmware-skills--vmware-aiops/badge.svg)](/listings/vmware-skills--vmware-aiops)

HTML

<a href="/listings/vmware-skills--vmware-aiops"><img src="/api/listings/vmware-skills--vmware-aiops/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/plugin.json · Manifest · 21 lines
  1. {
  2. "$schema": "https://anthropic.com/claude-code/plugin.schema.json",
  3. "name": "vmware-aiops",
  4. "displayName": "VMware AIops",
  5. "version": "2.5.2",
  6. "description": "AI-powered VMware vCenter/ESXi VM lifecycle and deployment with 61 MCP tools.",
  7. "author": {
  8. "name": "Wei Zhou",
  9. "email": "zhouwei008@gmail.com",
  10. "url": "https://github.com/vmware-skills"
  11. },
  12. "homepage": "https://github.com/vmware-skills/VMware-AIops",
  13. "repository": "https://github.com/vmware-skills/VMware-AIops",
  14. "license": "MIT",
  15. "keywords": [
  16. "aiops",
  17. "mcp",
  18. "vmware",
  19. "vsphere"
  20. ]
  21. }
README.md · README · 67 lines
  1. <!-- mcp-name: io.github.vmware-skills/vmware-aiops -->
  2. # VMware-AIops
  3. <a id="readme-overview"></a>
  4. Turn VM lifecycle requests into explicit, auditable operations for vCenter and ESXi.
  5. English · [简体中文](https://github.com/vmware-skills/VMware-AIops/blob/main/README-CN.md)
  6. Community-maintained · MIT · Not an official VMware/Broadcom product.
  7. [![24-second illustrative investigation demo](https://raw.githubusercontent.com/vmware-skills/marketplace/main/assets/demos/vmware-skills-en.gif)](https://github.com/vmware-skills/marketplace/releases/download/demos-2026-11-13-operations/vmware-skills-en.mp4)
  8. Synthetic-data GIF; video includes redacted historical screenshots. [Download the AI-narrated family introduction (~3 min)](https://github.com/vmware-skills/marketplace/releases/download/demos-2026-11-13-operations/vmware-skills-en.mp4)
  9. <a id="readme-capabilities-and-workflows"></a>
  10. ## Why use it?
  11. - Deploy and manage VMs, snapshots and guest tasks.
  12. - Preview destructive actions and inspect task results.
  13. - Use dedicated companion modules for focused investigations.
  14. <a id="readme-quick-start"></a>
  15. ## Get started
  16. Install the published CLI and inspect its commands:
  17. ```sh
  18. uv tool install vmware-aiops==2.5.2
  19. vmware-aiops --help
  20. ```
  21. Requires uv and Python >=3.10. Configure targets and credentials locally before remote queries. [Setup guide](https://github.com/vmware-skills/VMware-AIops/blob/main/skills/vmware-aiops/references/setup-guide.md).
  22. One-click installs, after `init`: [Claude Desktop extension (.mcpb)](https://github.com/vmware-skills/VMware-AIops/releases/download/v2.5.2/vmware-aiops-2.5.2.mcpb), which offers read-only tools until you change its setting · [Install in VS Code](https://insiders.vscode.dev/redirect/mcp/install?name=vmware-aiops&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22vmware-aiops%3D%3D2.5.2%22%2C%22vmware-aiops-mcp%22%5D%7D). Both run the pinned 2.5.2 server and read the configuration `init` wrote.
  23. For agent-host installation, use the [setup guide](https://github.com/vmware-skills/VMware-AIops/blob/main/skills/vmware-aiops/references/setup-guide.md) and [Cursor, Codex, Gemini CLI, Cline and local-model examples](https://github.com/vmware-skills/marketplace/blob/main/docs/agent-hosts.md).
  24. Choose a model with the [shared model-fit workflow](https://github.com/vmware-skills/marketplace/blob/main/model-fit/RUNNER.md): compare the same tasks, review quality and safety, then select the smallest tested passing configuration per task group; this is not a production guarantee.
  25. <a id="readme-safety-and-audit"></a>
  26. ## Know the boundaries
  27. Includes sensitive infrastructure writes, guest execution and file transfers. Account permissions, local Policy and host-path boundaries apply; confirmation is not independent human approval.
  28. <a id="readme-mcp-configuration"></a> <a id="readme-troubleshooting"></a> <a id="readme-reference"></a>
  29. ## Go deeper
  30. - [Capabilities](https://github.com/vmware-skills/VMware-AIops/blob/main/skills/vmware-aiops/references/capabilities.md)
  31. - [CLI reference](https://github.com/vmware-skills/VMware-AIops/blob/main/skills/vmware-aiops/references/cli-reference.md)
  32. - [Agent guardrails](https://github.com/vmware-skills/VMware-AIops/blob/main/skills/vmware-aiops/references/agent-guardrails.md)
  33. - [Detailed usage and architecture](https://github.com/vmware-skills/VMware-AIops/blob/main/skills/vmware-aiops/references/detailed-guide.md)
  34. - [MCP launch configuration](https://github.com/vmware-skills/VMware-AIops/blob/main/.mcp.json)
  35. - [Canonical skill instructions](https://github.com/vmware-skills/VMware-AIops/blob/main/skills/vmware-aiops/SKILL.md)
  36. <a id="readme-companion-skills"></a>
  37. Part of [VMware Skills](https://github.com/vmware-skills/marketplace): 15 skills, 14 MCP servers and one shared Policy library. If it helps your work, star the family portal.
  38. <a id="readme-license"></a>
  39. [Share setup progress or a first result](https://github.com/vmware-skills/marketplace/issues/new?template=setup-feedback.yml) · [Using it at your organization?](https://github.com/orgs/vmware-skills/discussions/71) · [Report a bug](https://github.com/vmware-skills/VMware-AIops/issues) · [MIT](https://github.com/vmware-skills/VMware-AIops/blob/main/LICENSE)
vmware_aiops/mcp_server/tools/guest.py · Bundled script · 313 lines · 1 finding marked
  1. """Guest Operations tools: exec, exec-with-output, upload, download, provision."""
  2. from typing import Optional
  3. from vmware_policy import vmware_tool
  4. from vmware_aiops.mcp_server._shared import _get_connection, mcp, tool_errors
  5. from vmware_aiops.ops.gate import preview, refuse_on
  6. from vmware_aiops.ops.guest_gate import (
  7. measure_guest_exec,
  8. measure_guest_exec_output,
  9. measure_guest_provision,
  10. measure_guest_upload,
  11. )
  12. from vmware_aiops.ops.guest_ops import (
  13. guest_download,
  14. guest_exec,
  15. guest_exec_with_output,
  16. guest_provision,
  17. guest_upload,
  18. )
  19. from vmware_aiops.ops.step_policy import (
  20. authorize_reached,
  21. used_by_provision,
  22. with_policy_blockers,
  23. )
  24. # The four tools below hand caller-supplied content to the guest OS — a program
  25. # to run, or a file to place at a chosen path — and every one of them advertised
  26. # `destructiveHint: false`. The command string is unbounded and runs with the
  27. # credentials passed in, which the example here makes root; `rm -rf /` is a
    • Note: Quoted as data in code: Runs `rm -rf` against a root or home-directory path
    • Line 31 on GitHub
  28. # well-formed argument. `destructiveHint` is the field a client consults before
  29. # deciding whether to ask its user, so the label was disarming the one prompt
  30. # that mattered most. `download_vm_guest_file` below keeps `false`: it reads the
  31. # guest and writes the *caller's* disk, which is a different hazard with its own
  32. # guard, and a label applied to everything tells a client nothing.
  33. #
  34. # The same four sit behind the HLD §7 gate: a bare call returns the blast
  35. # radius (which VM, as whom, what would run or be written) and does nothing;
  36. # confirm=True re-measures, refuses on a blocker or an unreadable field, and
  37. # only then calls the same ops function the CLI calls.
  38. _HINT = (
  39. "Nothing was run or written in the guest. Show blast_radius to the user; "
  40. "re-run with confirm=True only after they agree."
  41. )
  42. @mcp.tool(annotations={"readOnlyHint": False, "destructiveHint": True, "idempotentHint": False, "openWorldHint": True})
  43. @vmware_tool(risk_level="critical", sensitive_params=['password'])
  44. @tool_errors("dict")
  45. def run_vm_guest_command(
  46. vm_name: str,
  47. command: str,
  48. username: str,
  49. arguments: str = "",
  50. password: str = "",
  51. working_directory: Optional[str] = None,
  52. confirm: bool = False,
  53. target: Optional[str] = None,
  54. ) -> dict:
  55. """[WRITE] Execute a command inside a VM via VMware Tools.
  56. Requires VMware Tools running in the guest OS. Returns exit_code, stdout,
  57. stderr, timed_out, and blast_radius.
  58. Without confirm=True this only previews: blast_radius names the VM (name,
  59. instance UUID), the guest account, the exact command, arguments and working
  60. directory, VMware Tools status and any blockers; nothing runs. Show it to
  61. the user. Do not set confirm=True on your own because the user asked
  62. earlier: they have not seen the preview yet. Refused outright: VM not
  63. powered on, VMware Tools not running, an identity or status that cannot be
  64. read, or a name that matches more than one VM.
  65. Note: the Guest Ops API does not capture stdout/stderr directly, so use this
  66. only for fire-and-forget commands — prefer run_vm_guest_command_with_output whenever you
  67. need the output.
  68. Args:
  69. vm_name: Target VM name.
  70. command: Full path to program (e.g. "/bin/bash", "C:\\Windows\\System32\\cmd.exe").
  71. arguments: Command arguments (e.g. "-c 'whoami'").
  72. username: Guest OS account to run as. Required — there is no default, so a
  73. call can never act as root without choosing root.
  74. password: Guest OS password.
  75. working_directory: Working directory inside guest (optional).
  76. confirm: False (default) returns the blast radius and changes nothing. True applies it.
  77. target: Optional vCenter/ESXi target name from config.
  78. """
  79. si = _get_connection(target)
  80. radius = measure_guest_exec(
  81. si, vm_name, command, username,
  82. arguments=arguments, working_directory=working_directory,
  83. )
  84. if not confirm:
  85. return preview(radius, _HINT)
  86. refuse_on(radius, "run_vm_guest_command")
  87. result = guest_exec(
  88. si, vm_name, command, username, password,
  89. arguments=arguments,
  90. working_directory=working_directory,
  91. expect_instance_uuid=radius["instance_uuid"],
  92. )
  93. return {**result, "action": "executed", "blast_radius": radius}
  94. @mcp.tool(annotations={"readOnlyHint": False, "destructiveHint": True, "idempotentHint": False, "openWorldHint": True})
  95. @vmware_tool(risk_level="critical", sensitive_params=['password'])
  96. @tool_errors("dict")
  97. def run_vm_guest_command_with_output(
  98. vm_name: str,
  99. command: str,
  100. username: str,
  101. password: str = "",
  102. timeout: int = 300,
  103. confirm: bool = False,
  104. target: Optional[str] = None,
  105. ) -> dict:
  106. """[WRITE] Execute a shell command inside a VM and capture stdout + stderr.
  107. Automatically detects guest OS (Linux/Windows) and selects the correct
  108. shell. Output is captured by redirecting to a temp file, downloading it,
  109. then cleaning up — no manual redirection needed. Prefer this over
  110. run_vm_guest_command whenever you need the output. Requires VMware Tools running
  111. and a writable temp directory in the guest.
  112. Returns exit_code, stdout, stderr, timed_out, os_family, and blast_radius.
  113. Without confirm=True this only previews: blast_radius names the VM (name,
  114. instance UUID), the guest account, the exact command and the shell it runs
  115. through, VMware Tools status and any blockers; nothing runs. Show it to the
  116. user. Do not set confirm=True on your own because the user asked earlier:
  117. they have not seen the preview yet. Refused outright: VM not powered on,
  118. VMware Tools not running, an unreadable identity or status, a name that
  119. matches more than one VM, or a rules.yaml deny on run_vm_guest_command or
  120. download_vm_guest_file (the preview lists it as a blocker).
  121. Args:
  122. vm_name: Target VM name.
  123. command: Shell command (e.g. "df -h", "ls /etc", "ipconfig").
  124. username: Guest OS account to run as. Required — there is no default, so a
  125. call can never act as root without choosing root.
  126. password: Guest OS password.
  127. timeout: Max wait seconds (default 300).
  128. confirm: False (default) returns the blast radius and changes nothing. True applies it.
  129. target: Optional vCenter/ESXi target name from config.
  130. """
  131. si = _get_connection(target)
  132. radius = measure_guest_exec_output(si, vm_name, command, username, timeout)
  133. if not confirm:
  134. return preview(with_policy_blockers(radius, "run_vm_guest_command_with_output",
  135. {"vm_name": vm_name, "username": username},
  136. target), _HINT)
  137. refuse_on(radius, "run_vm_guest_command_with_output")
  138. authorize_reached("run_vm_guest_command_with_output",
  139. {"vm_name": vm_name, "username": username}, target)
  140. result = guest_exec_with_output(si, vm_name, command, username, password, timeout=timeout,
  141. expect_instance_uuid=radius["instance_uuid"])
  142. return {**result, "action": "executed", "blast_radius": radius}
  143. @mcp.tool(annotations={"readOnlyHint": False, "destructiveHint": True, "idempotentHint": False, "openWorldHint": True})
  144. @vmware_tool(risk_level="high", sensitive_params=['password'])
  145. @tool_errors("dict")
  146. def upload_vm_guest_file(
  147. vm_name: str,
  148. local_path: str,
  149. guest_path: str,
  150. username: str,
  151. password: str = "",
  152. confirm: bool = False,
  153. target: Optional[str] = None,
  154. ) -> dict:
  155. """[WRITE] Upload a file from local machine to a VM via VMware Tools.
  156. Returns a dict with action, message and blast_radius (a status string
  157. before the confirmation gate). Requires VMware Tools running in the guest
  158. OS. An existing file at guest_path is replaced. Use download_vm_guest_file for
  159. the reverse direction, and provision_vm_guest instead when uploads and
  160. commands belong to one ordered provisioning run.
  161. Without confirm=True this only previews: blast_radius names the VM (name,
  162. instance UUID), the guest account, the local path and size, the guest path,
  163. VMware Tools status and any blockers; nothing is transferred. Show it to the
  164. user. Do not set confirm=True on your own because the user asked earlier:
  165. they have not seen the preview yet. Refused outright: VM not powered on,
  166. VMware Tools not running, a local file that is missing or unreadable, an
  167. unreadable identity or status, or a name that matches more than one VM.
  168. Args:
  169. vm_name: Target VM name.
  170. local_path: Local file path to upload.
  171. guest_path: Destination path inside the guest.
  172. username: Guest OS account to run as. Required — there is no default, so a
  173. call can never act as root without choosing root.
  174. password: Guest OS password.
  175. confirm: False (default) returns the blast radius and changes nothing. True applies it.
  176. target: Optional vCenter/ESXi target name from config.
  177. """
  178. si = _get_connection(target)
  179. radius = measure_guest_upload(si, vm_name, local_path, guest_path, username)
  180. if not confirm:
  181. return preview(radius, _HINT)
  182. refuse_on(radius, "upload_vm_guest_file")
  183. message = guest_upload(si, vm_name, local_path, guest_path, username, password,
  184. expect_instance_uuid=radius["instance_uuid"])
  185. return {"action": "uploaded", "message": message, "blast_radius": radius}
  186. # Reading a file out of the VM is a read of the VM; writing it to local_path is
  187. # not, and readOnlyHint is what a client consults before deciding whether to ask
  188. # the user. Annotated exactly like its mirror upload_vm_guest_file — same operation,
  189. # opposite direction.
  190. @mcp.tool(annotations={"readOnlyHint": False, "destructiveHint": False, "idempotentHint": False, "openWorldHint": True})
  191. @vmware_tool(risk_level="high", sensitive_params=['password'])
  192. @tool_errors("str")
  193. def download_vm_guest_file(
  194. vm_name: str,
  195. guest_path: str,
  196. local_path: str,
  197. username: str,
  198. password: str = "",
  199. overwrite: bool = False,
  200. target: Optional[str] = None,
  201. ) -> str:
  202. """[WRITE] Download a file from a VM and write it to a local path.
  203. Reads from the guest, writes the local filesystem — the write is why this is
  204. not a read tool. Returns a status string. Requires VMware Tools running in
  205. the guest OS. Use upload_vm_guest_file for the reverse direction; to capture
  206. command output use run_vm_guest_command_with_output instead — it redirects and
  207. downloads for you.
  208. Refuses a destination that already exists unless overwrite=True, and never
  209. writes through a symlink or over a directory. Pick a path that does not
  210. exist yet rather than passing overwrite=True by default.
  211. Args:
  212. vm_name: Target VM name.
  213. guest_path: File path inside the guest to download.
  214. local_path: Local destination path, including the file name.
  215. username: Guest OS account to run as. Required — there is no default, so a
  216. call can never act as root without choosing root.
  217. password: Guest OS password.
  218. overwrite: True replaces an existing file at local_path (default False).
  219. target: Optional vCenter/ESXi target name from config.
  220. """
  221. si = _get_connection(target)
  222. return guest_download(
  223. si, vm_name, guest_path, local_path, username, password, overwrite=overwrite
  224. )
  225. @mcp.tool(annotations={"readOnlyHint": False, "destructiveHint": True, "idempotentHint": False, "openWorldHint": True})
  226. @vmware_tool(risk_level="critical", sensitive_params=['password'])
  227. @tool_errors("dict")
  228. def provision_vm_guest(
  229. vm_name: str,
  230. username: str,
  231. password: str,
  232. steps: list[dict],
  233. timeout: int = 300,
  234. confirm: bool = False,
  235. target: Optional[str] = None,
  236. ) -> dict:
  237. """[WRITE] Provision a VM by running an ordered sequence of guest operations.
  238. Prefer this over repeated run_vm_guest_command / upload_vm_guest_file calls when the steps
  239. form one provisioning run. Steps stop on the first failure, so a partial run
  240. leaves the guest half-configured. Requires VMware Tools running in the guest.
  241. Without confirm=True this only previews: blast_radius names the VM (name,
  242. instance UUID), the guest account and every step it would run, in order,
  243. with counts per type, local file sizes and any blockers; nothing runs. Show
  244. it to the user. Do not set confirm=True on your own because the user asked
  245. earlier: they have not seen the preview yet. Refused outright: VM not
  246. powered on, VMware Tools not running, an empty step list, a step with an
  247. unknown type or a missing key, an upload whose local file is missing or
  248. unreadable, a service step on a Windows guest, an unreadable identity or
  249. status, a name that matches more than one VM, or a rules.yaml deny on a
  250. guest tool these steps run: exec and service steps run_vm_guest_command
  251. and run_vm_guest_command_with_output, upload steps upload_vm_guest_file
  252. (the preview lists it as a blocker).
  253. Step types:
  254. - exec: {"type": "exec", "command": "apt-get install -y nginx"}
  255. - upload: {"type": "upload", "local_path": "...", "guest_path": "..."}
  256. - service: {"type": "service", "name": "nginx", "action": "start"}
  257. Args:
  258. vm_name: Target VM name.
  259. username: Guest OS username.
  260. password: Guest OS password.
  261. steps: Ordered list of step dicts (see Step types).
  262. timeout: Per-step timeout in seconds (default 300).
  263. confirm: False (default) returns the blast radius and changes nothing. True applies it.
  264. target: Optional vCenter/ESXi target name from config.
  265. Returns:
  266. dict with success, completed_steps, total_steps, results, error, and
  267. blast_radius.
  268. """
  269. si = _get_connection(target)
  270. radius = measure_guest_provision(si, vm_name, username, steps, timeout)
  271. if not confirm:
  272. return preview(with_policy_blockers(radius, "provision_vm_guest",
  273. {"vm_name": vm_name, "username": username},
  274. target, used=used_by_provision(steps)), _HINT)
  275. refuse_on(radius, "provision_vm_guest")
  276. # The password stays out of the policy check and its audit row.
  277. authorize_reached("provision_vm_guest", {"vm_name": vm_name, "username": username}, target,
  278. used=used_by_provision(steps))
  279. result = guest_provision(si, vm_name, username, password, steps, timeout=timeout,
  280. expect_instance_uuid=radius["instance_uuid"])
  281. return {**result, "action": "provisioned", "blast_radius": radius}

Version history

  • v2.5.211/17/2026

  • v2.5.111/16/2026

  • v2.5.011/11/2026

  • v2.4.511/9/2026

  • v2.4.311/8/2026

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.