Disclaimer: This is a community-maintained open-source project and is not affiliated with, endorsed by, or sponsored by VMware, Inc. or Broadcom Inc. "VMware" and "NSX" are trademarks of Broadcom. Source code is publicly auditable at github.com/vmware-skills/VMware-NSX under the MIT license.
VMware NSX networking management — 33 MCP tools for segments, gateways, NAT, routing, and IPAM.
Domain-focused networking skill for NSX-T / NSX 4.x Policy API. Companion skills: vmware-nsx-security (DFW/firewall), vmware-aiops (VM lifecycle), vmware-monitor (read-only monitoring), vmware-storage (iSCSI/vSAN), vmware-vks (Tanzu Kubernetes), vmware-aria (metrics/alerts/capacity), vmware-avi (AVI/ALB/AKO), vmware-harden (compliance baselines). | vmware-pilot (workflow orchestration) | vmware-policy (audit/policy)
CategoryToolsCountRead / WriteSegmentslist, get details, create, update, delete52R / 3WTier-0 Gatewayslist, get details, BGP neighbors, configure BGP43R / 1WTier-1 Gatewayslist, get details, create, update, delete52R / 3WNATlist rules, create rule, delete rule31R / 2WStatic Routeslist, create, delete31R / 2WIP Poolslist, get usage, create pool, delete pool42R / 2WFabric Inventorytransport zones, transport nodes, edge clusters33R / 0WHealthNSX alarms, transport node status, edge cluster status, manager status44R / 0WTroubleshootinglogical port status, VM-to-segment lookup22R / 0W
Total: 33 tools (20 read-only + 13 write)
bash
uv tool install vmware-nsx-mgmt==1.14.0
vmware-nsx init # guided setup: writes config + .env (chmod 600, password grep-safe), then verifies
vmware-nsx doctor
Use it only when the request is explicitly about NSX (NSX-T / NSX 4.x, NSX Manager). Writes only on request: call a create/update/delete tool, NAT/route/IP-pool change, or Tier-0 BGP change only when the user has explicitly asked for that specific change — never as a side step of a read, health check, or troubleshooting task. Diagnose with read tools first and propose the change instead.
Use companion skills for:
vmware-nsx-securityvmware-aiopsvmware-aiopsvmware-monitorvmware-storagevmware-vksvmware-aviUser IntentRecommended SkillNSX networking: segments, gateways, NAT, routing, IPAMvmware-nsx ← this skillNSX security: DFW rules, security groups, IDS/IPSvmware-nsx-securityRead-only vSphere monitoring, alarms, eventsvmware-monitorVM lifecycle, deployment, guest opsvmware-aiopsvSphere distributed port groups, host VMkernel adaptersvmware-aiopsStorage: iSCSI, vSAN, datastoresvmware-storageTanzu Kubernetes (vSphere 8.x+)vmware-vksAria Ops: metrics, alerts, capacity planningvmware-ariaMulti-step workflows with approvalvmware-pilotCompliance baselines (CIS / 等保 / PCI-DSS), drift detection, LLM remediation advisorvmware-harden ( uv tool install vmware-harden)Load balancer, AVI, ALB, AKO, Ingressvmware-avi ( uv tool install vmware-avi)Audit log queryvmware-policy ( vmware-audit CLI)
Pre-flight (judgment, not blind sequence):
inventory list-segments and networking list-ip-pools for any overlap with the proposed CIDR. Overlapping subnets cause asymmetric routing or silent blackholing — NSX will not warn you.--edge-cluster is healthy ( inventory list-edge-clusters + health edge-cluster-status <id>) and not at SR (Service Router) limit. A fully-loaded edge cluster will accept the T1 creation but routing will fail.--translated IP must be from a routable address pool announced by T0; using a random IP creates a half-working network.--dry-run first — once a segment is attached to running VMs, deleting it requires detaching every port.Steps:
vmware-nsx gateway create-tier1 app-t1 --name app-t1 --edge-cluster <ec-path> --tier0 <t0-path> --dry-run → review, then run for realvmware-nsx segment create app-web-seg --name app-web-seg --tz <tz-overlay-path> --subnet <gw-cidr>vmware-nsx nat create-rule --tier1 app-t1 --rule-id snat-1 --action SNAT --source <private-cidr> --translated <pub-ip>inventory list-segments, networking list-nat-rules app-t1, AND test with a VM attached to the new segmentvmware-nsx doctor to verify connectivity and credentials, fix, and re-run the failed step — earlier completed steps are idempotent PUTs and safe to re-apply.Judgment: don't just enumerate health endpoints — correlate them. The order below maps cause to symptom: if manager is down, transport nodes will look down too (false positive); fix top-down.
vmware-nsx health manager-status — if any manager node is DEGRADED or DOWN, stop here and resolve before trusting downstream signalsvmware-nsx inventory list-transport-nodes then health transport-node-status <id> for any node not UP — flag nodes down ≥ 5 min; transient blips are normalvmware-nsx inventory list-edge-clusters then health edge-cluster-status <id> — verify SR placement is balanced; one edge holding 80% of SRs is a single point of failurevmware-nsx health alarms --severity HIGH (repeat with CRITICAL) — severity filter is exact-match, not "and above"vmware-monitor for vSphere host events — a host losing connection to vCenter often masquerades as an NSX problemJudgment: connectivity failures happen at one of three layers. Identify which layer first, then drill — don't probe randomly.
troubleshoot vm-segment + troubleshoot port-statusinventory get-tier1 shows no Tier-0 pathnetworking bgp-neighbors, networking list-nat-rulesSteps (stop as soon as the failing layer is identified):
troubleshoot vm-segment my-vm-01 → if no port, check vSphere vNIC binding firsttroubleshoot port-status <segment-id> → admin-down or DFW-blocked? If DFW, jump to vmware-nsx-securityinventory get-tier1 app-t1 → Tier-0 path present and route advertisement enabled? If not, T1↔T0 link brokennetworking bgp-neighbors tier0-gw → all neighbors ESTABLISHED? Flapping → upstream issuenetworking list-nat-rules app-t1 → SNAT rule covers the source CIDR? Mis-typed CIDR is the most common causeAll commands accept --target <name> to operate against a specific NSX Manager from your config (default: the first target in config.yaml), e.g. vmware-nsx inventory list-segments --target nsx-prod.
ScenarioRecommendedWhyLocal/small models (Ollama, Qwen)CLI~2K tokens vs ~8K for MCPCloud models (Claude, GPT-4o)EitherMCP gives structured JSON I/OAutomated pipelinesMCPType-safe parameters, structured output
All MCP tools accept an optional target parameter to select which NSX Manager to connect to.
CategoryToolTypeDescriptionSegmentlist_segmentsReadList all segments with type, subnet, admin state, port countget_segmentReadGet segment details including ports and subnet configcreate_segmentWriteCreate overlay or VLAN segment with subnet and gatewayupdate_segmentWriteUpdate segment properties (name, subnets, gateway link)delete_segmentWriteDelete a segment; refuses (listing port ids) while ports are attachedTier-0 GWlist_tier0_gatewaysReadList Tier-0 gateways with HA mode and transit subnetsget_tier0_gatewayReadGet Tier-0 details: HA mode, failover, transit subnetsget_bgp_neighborsReadList BGP neighbor sessions with state, ASN, prefixesconfigure_tier0_bgpWriteConfigure BGP (local AS, ECMP, inter-SR iBGP) on a Tier-0Tier-1 GWlist_tier1_gatewaysReadList Tier-1 gateways with linked Tier-0 and route advertisementget_tier1_gatewayReadGet Tier-1 details: Tier-0 link, route advertisementcreate_tier1_gatewayWriteCreate Tier-1 gateway with edge cluster and Tier-0 linkupdate_tier1_gatewayWriteUpdate Tier-1 properties (route advertisement, Tier-0 link)delete_tier1_gatewayWriteDelete a Tier-1 gateway; refuses (listing blocking ids) while segments, NAT rules, routes, interfaces or VPN / DNS / LB services remainNATlist_nat_rulesReadList NAT rules on a Tier-1 gatewaycreate_nat_ruleWriteCreate SNAT/DNAT/reflexive NAT rule on a gatewaydelete_nat_ruleWriteDelete a NAT ruleStatic Routeslist_static_routesReadList static routes on a Tier-1 gatewaycreate_static_routeWriteAdd a static route with network and next-hopdelete_static_routeWriteRemove a static routeIP Poolslist_ip_poolsReadList IP pools with usage summaryget_ip_pool_usageReadShow allocation usage for a poolcreate_ip_poolWriteCreate a new IP address pool with allocation rangesdelete_ip_poolWritePermanently delete an IP address pool; refuses while IPs are allocatedFabriclist_transport_zonesReadList transport zones with type (OVERLAY/VLAN)list_transport_nodesReadList transport nodes with node type and statuslist_edge_clustersReadList edge clusters with member count and deployment typeHealthlist_nsx_alarmsReadList active NSX alarms filtered by severityget_transport_node_statusReadTransport node connectivity and config statusget_edge_cluster_statusReadEdge cluster member status and failover configget_nsx_manager_statusReadNSX Manager cluster health and node rolesTroubleshootget_logical_port_statusReadRealized state of all ports on a segmentget_segment_port_for_vmReadFind which segment a VM is connected to by display name
Write tools require explicit parameters and are audit-logged. The five delete_* tools preview by default: without confirm=True they return blast_radius (what would be removed, blockers, unmeasured) and change nothing. Show it to the user and pass confirm=True only after they decide; it is refused while a blocker remains or a read failed. Other MCP write tools execute directly — call one only after the user has explicitly asked for that change.
truncated before you summarise#Every list-returning tool above returns {items, returned, limit, total, truncated, hint}, not a bare array. Rows live under items: empty items with truncated: false means the query genuinely matched nothing — report that, not a tool failure. truncated: true means items is not the whole collection — never call it complete. It does not mean more rows can be fetched: it stays true on the last page. Page with next_offset, stopping when it is null; hint says which situation you are in. Field semantics, total sourcing, and an example payload: references/capabilities.md.
Running with local or small models? See references/agent-guardrails.md for explicit operating rules that keep tool calls reliable.
bash
# Inventory (read-only)
vmware-nsx inventory list-segments [--target <name>]
vmware-nsx inventory get-segment <segment-id>
vmware-nsx inventory list-tier0s
vmware-nsx inventory get-tier0 <tier0-id>
vmware-nsx inventory list-tier1s
vmware-nsx inventory get-tier1 <tier1-id>
vmware-nsx inventory list-transport-zones
vmware-nsx inventory list-transport-nodes
vmware-nsx inventory list-edge-clusters
# Networking (read-only)
vmware-nsx networking list-nat-rules <tier1-id>
vmware-nsx networking bgp-neighbors <tier0-id>
vmware-nsx networking list-static-routes <tier1-id>
vmware-nsx networking list-ip-pools
vmware-nsx networking ip-pool-usage <pool-id>
# Segment management (write; full option lists in references/cli-reference.md)
vmware-nsx segment create <id> --name <name> --tz <tz-path> [--vlan|--subnet] [--dry-run]
vmware-nsx segment update <id> [--name|--subnet] [--dry-run]
vmware-nsx segment delete <id> [--dry-run]
# Gateway management (write)
vmware-nsx gateway create-tier1 <id> --name <name> [--tier0|--edge-cluster] [--dry-run]
vmware-nsx gateway update-tier1 <id> [--name|--tier0|--advertise] [--dry-run]
vmware-nsx gateway delete-tier1 <id> [--dry-run]
vmware-nsx gateway configure-tier0-bgp <tier0-id> --local-as <asn> [--ecmp] [--dry-run]
# NAT (write)
vmware-nsx nat create-rule --tier1 <id> --rule-id <id> --action SNAT --source <cidr> --translated <ip> [--dry-run]
vmware-nsx nat delete-rule --tier1 <id> --rule-id <id> [--dry-run]
# Static routes (write)
vmware-nsx route create-static --tier1 <id> --route-id <id> --network <cidr> --next-hop <ip> [--dry-run]
vmware-nsx route delete-static --tier1 <id> --route-id <id> [--dry-run]
# IP pools (write)
vmware-nsx ip-pool create <pool-id> --name <name> --start <ip> --end <ip> --cidr <cidr> [--dry-run]
# Health & Troubleshooting (read-only)
vmware-nsx health alarms [--severity CRITICAL]
vmware-nsx health transport-node-status <node-id>
vmware-nsx health edge-cluster-status <cluster-id>
vmware-nsx health manager-status
vmware-nsx troubleshoot port-status <segment-id>
vmware-nsx troubleshoot vm-segment <vm-display-name>
# Diagnostics
vmware-nsx doctor [--skip-auth]
Full CLI reference with all options and output formats: see
references/cli-reference.md
Segment display names and Policy API IDs can differ. Use vmware-nsx inventory list-segments to get the exact ID. The Policy API uses the segment id field, not display_name. Common mistakes: using the display name with spaces instead of the hyphenated ID.
NAT rules are created on Tier-1 gateways (or Tier-0 for some topologies). Verify the gateway name with vmware-nsx inventory list-tier1s. The gateway must have an edge cluster assigned for NAT to function.
The BGP session is not established. Common causes:
bgp-neighbors outputA transport node in degraded state has partial connectivity. Steps:
vmware-nsx health transport-nodes for the specific failure reasonThe password environment variable is missing. Variable names follow the pattern VMWARE_NSX_<TARGET_NAME_UPPER>_PASSWORD where hyphens become underscores. Example: target nsx-prod needs VMWARE_NSX_NSX_PROD_PASSWORD. Check your ~/.vmware-nsx/.env file.
~/.vmware/audit.db (SQLite WAL, via vmware-policy) with timestamp, user, target, operation, parameters, and result--dry-run to preview API calls without executing (MCP deletes preview unless confirm=True; other MCP writes execute directly and are audit-logged)--dry-run runs the same check). Only a clean gateway has its default locale-service removed and is then deleted. IP pool delete (MCP) refuses while addresses are allocated- and _; NAT action checked against the allowed set; required fields checked (translated address for SNAT/DNAT/REFLEXIVE, CIDR + ranges per IP-pool subnet). CIDR/IP syntax and gateway existence are not checked client-side — they are left to NSX Manager's own API validation_sanitize() — strips control characters, truncates to 500 chars.env file), never from config.yamlvmware-nsx-securitybash
uv tool install vmware-nsx-mgmt==1.14.0
vmware-nsx init # writes ~/.vmware-nsx/config.yaml + .env (chmod 600), then verifies
vmware-nsx doctor
All tools are automatically audited via vmware-policy. Audit logs:
vmware-audit log --last 20
Full setup guide with multi-target config, MCP server setup, and Docker: see
references/setup-guide.md
text
User (natural language)
|
AI Agent (Claude Code / Goose / Cursor)
| reads SKILL.md
vmware-nsx CLI or MCP server (stdio transport)
| NSX Policy API (REST/JSON over HTTPS)
NSX Manager
|
Segments / Gateways / NAT / Routes / IP Pools / Transport Nodes
All operations are automatically audited via vmware-policy ( @vmware_tool decorator):
~/.vmware/audit.db (SQLite, framework-agnostic)~/.vmware/rules.yaml (deny rules, maintenance windows, risk levels)vmware-audit log --last 20vmware-audit log --status deniedvmware-policy is automatically installed as a dependency — no manual setup needed.