vcf-lifecycle
# vcf-lifecycle
## Overview
An MCP server and a skill that let Claude Code run VMware Cloud Foundation 9.1 upgrades, one
component at a time, in the order of your Upgrade Planner export. You approve every change.
| Component | Upgraded through |
| - | - |
| Management components | Fleet LCM |
| SDDC Manager | SDDC Manager |
| Avi Load Balancer | Avi controller. Backup, image download and upload stay with you. |
| vCenter, NSX, ESX, Supervisor | Not handled. The skill lists them as manual steps. |
## How it works
1. You paste the Upgrade Planner text export. The `vcf-upgrade` skill reads the live state and
shows the whole run as one table before it changes anything.
2. For each component it runs the precheck, then the upgrade. Each write tool checks the live
state, refuses if the call is not safe, and asks for your approval before it sends
anything.
3. Waits run as background MCP tasks, so the session stays free while an upgrade runs.
4. At an Avi step the skill pauses for you to check interoperability and upload the image.
5. The run stops on any failure. Nothing is retried or rolled back.

More in [architecture](docs/explanation/architecture.md).
## Quick start
You need Python 3.12 or later, [uv](https://docs.astral.sh/uv/) and Claude Code 2.1.331 or
later in the terminal. The desktop app
[does not show the approval prompt](docs/how-to/approve-without-a-prompt.md).
1. Install the server:
```bash
uv tool install git+https://github.com/warroyo/vcf-lifecycle
```
2. Register it. SDDC Manager and Avi are optional; Avi upgrades need all three hosts:
```bash
claude mcp add vcf-lifecycle \
-e VCF_FLEET_LCM_HOST=https://fleetlcm.example.com \
-e VCF_SDDC_MANAGER_HOST=https://sddcm.example.com \
-e VCF_SDDC_USERNAME=administrator@vsphere.local \
-e VCF_AVI_HOST=https://avi.example.com \
-e VCF_CA_FILE=/path/to/ca.pem \
-- vcf-lifecycle
```
3. Put the passwords in the shell that starts Claude Code, then start it:
```bash
export VCF_PASSWORD=... VCF_SDDC_PASSWORD=... VCF_AVI_PASSWORD=...
claude
```
4. Run `/vcf-lifecycle:vcf-upgrade` and paste your Upgrade Planner text export.
All settings are in [configuration](docs/reference/configuration.md).
## Repo structure
```
src/vcf_lifecycle/ MCP server: tools, API clients, guards
skills/vcf-upgrade/ the upgrade workflow skill the server ships
tests/ unit tests, all HTTP mocked
scripts/ env loader and live read-only smoke tests
docs/ how-to, reference and explanation pages
LICENSE MIT
```
See [docs/README.md](docs/README.md) for all documentation.
TDQS
Scored across 29 tools
Tools are mostly separated by product prefix (fleet_, sddc_, avi_, vsp_) and by lifecycle stage (list/status, plan, precheck, apply/upgrade, wait). A few singular/plural and action/read pairs such as fleet_plan/fleet_plans, fleet_task/fleet_tasks, and sddc_upgrades/sddc_upgrade rely heavily on descriptions, but an agent can generally distinguish them.
All names use snake_case with a consistent product/domain prefix, which makes the set predictable. The convention is not strictly verb_noun throughout, with many noun-style read tools and a few singular/plural distinctions, but it is still readable and coherent.
At 29 tools, the surface is heavy for the stated purpose and exceeds the typical well-scoped range. Several tools appear consolidatable, especially singular/plural status tools and repeated wait/precheck/status patterns across Fleet, SDDC Manager, and Avi.
The set covers the core lifecycle across Fleet LCM, SDDC Manager, and Avi: inventory/status, planning, precheck, execution, and waiting, plus VSP health. Minor gaps such as task cancellation or explicit rollback/retry operations remain, but normal upgrade workflows are well covered.