vmware-nsx-security
Investigate and manage VMware NSX/vDefend distributed firewall security configuration.
List, inspect, create, update, and delete DFW security policies and rules, with delete previews/blast-radius confirmation.
View the DFW exclusion list and manage NSX security groups, including membership criteria and effective members.
Inspect IDPS profiles and global IDS/signature status.
List, apply, and remove NSX tags on virtual machines.
Run Traceflow probes and retrieve results to troubleshoot packet paths and firewall drops.
Use paginated listing envelopes and safety guardrails for destructive operations.
Provides tools for managing VMware NSX security, including distributed firewall (DFW) policies and rules, security groups, VM tags, Traceflow packet tracing, and Intrusion Detection and Prevention Systems (IDPS).
VMware-NSX-Security
Investigate and manage NSX/vDefend security policies.
English · 简体中文
Community-maintained · MIT · Not an official VMware/Broadcom product.

Synthetic-data GIF; video includes redacted historical screenshots. Download the AI-narrated family introduction (~3 min)
Why use it?
Inspect firewall policies, groups and VM tags.
Use Traceflow and IDPS evidence for troubleshooting.
Make security configuration changes through scoped tools.
Related MCP server: vmware-vks
Get started
Install the published CLI and inspect its commands:
uv tool install vmware-nsx-security==1.17.4
vmware-nsx-security --helpRequires uv and Python >=3.10. Configure targets and credentials locally before remote queries. Setup guide.
One-click installs, after local setup: Claude Desktop extension (.mcpb) · Install in VS Code. Both run the same pinned 1.17.4 server. The desktop extension starts with read-only tools; change Tools to offer to all for writes.
For agent-host installation, use the setup guide and Cursor, Codex, Gemini CLI, Cline and local-model examples.
Choose a model with the shared model-fit workflow: compare the same tasks, review quality and safety, then select the smallest tested passing configuration per task group; this is not a production guarantee.
Know the boundaries
Includes security policy and rule writes. Use suitable target permissions and local Policy; a successful tool call is not proof that an application is secure.
Go deeper
Part of VMware Skills: 15 skills, 14 MCP servers and one shared Policy library. If it helps your work, star the family portal.
MCP result contract
Offset-capable listings expose next_offset; stop when it is null rather than looping on truncated. Failed calls provide structuredContent.vmware_error through Policy 1.26.0. Existing text, legacy flags, success values and confirmation checks remain unchanged. See the contract.
Available Tools
22 toolsapply_vm_tagA
[WRITE] Apply an NSX tag to a virtual machine.
Returns {"status": "applied", "vm_id", "scope", "tag"} — not the VM's tag list. Use list_vm_tags first for the vm_id, and again after to see the result. Additive, so existing tags survive, but note that tag-based group membership shifts as NSX re-evaluates: check with get_group.
Inputs: vm_id (required), tag_scope (required), tag_value (required), target.
create_dfw_policyA
[WRITE] Create a new DFW security policy.
Returns the created policy dict (id, path, category, ...), else {"error", "hint"}. The policy is an empty container — rules must be added afterwards with create_dfw_rule.
Inputs: policy_id (required), display_name (required), target, category, +3 more.
create_dfw_ruleA
[WRITE] Create a firewall rule under an existing DFW security policy.
Returns the created rule dict (id, path, action, ...), else {"error", "hint"}; a bad action/direction/ip_protocol lists the valid values. PUT semantics: reusing a rule_id overwrites that rule, enforced immediately unless disabled=True. Pick policy_id with list_dfw_policies first; prefer update_dfw_rule to edit one and delete_dfw_rule to remove one.
Inputs: rule_id (required), policy_id (required), display_name (required), scope, +11 more.
create_groupA
[WRITE] Create an NSX security group with optional membership criteria.
Returns the created group dict (id, path, expression, ...). Criteria are ORed — NSX only permits AND between same-member-type Conditions: tag_scope/tag_value matches VMs carrying that tag, ip_addresses matches IPs or CIDRs, segment_paths every VM on those segments. Use it before create_dfw_rule, which references the group path; confirm members with get_group.
Inputs: group_id (required), display_name (required), target, tag_scope, +4 more.
delete_dfw_policyADestructive
[WRITE] Delete a DFW security policy; refuses while it still holds rules.
Without confirm=True this only previews: it returns blast_radius (the policy's name, category, sequence_number, rule_count and rule_ids, blockers, unmeasured) and deletes nothing. Show that to the user and get their decision. Do not set confirm=True on your own because the user asked to delete earlier: they have not seen the blast radius yet.
confirm=True refuses, deleting nothing, while the policy still holds rules — list them with list_dfw_rules and clear each with delete_dfw_rule first — or when its rules could not be read. Returns {"action": "preview" | "deleted", "blast_radius": ...}, else {"error", "hint", "blast_radius"?}.
Inputs: policy_id (required), target, confirm.
delete_dfw_ruleADestructive
[WRITE] Permanently delete one DFW rule from its parent security policy.
Irreversible and immediate: traffic it matched falls through to lower-priority rules or the policy default. Without confirm=True this only previews: it returns blast_radius (the parent policy, the rule's action, sources, destinations, services, scope, direction, disabled flag, blockers, unmeasured) and deletes nothing. Show that to the user and get their decision. Do not set confirm=True on your own because the user asked to delete earlier: they have not seen the blast radius yet. Check recent hits with get_dfw_rule_stats first; prefer update_dfw_rule with disabled=True when you may need the rule back. A rule_id not in the policy is an error, and confirm=True refuses when the rules could not be read. To remove a whole policy use delete_dfw_policy — it refuses while rules remain. Returns {"action": "preview" | "deleted", "blast_radius": ...}, else {"error", "hint", "blast_radius"?}.
Inputs: rule_id (required), policy_id (required), target, confirm.
delete_groupADestructive
[WRITE] Delete an NSX security group; refuses while anything references it.
Use it once get_group shows the group is unwanted. Without confirm=True this only previews: it returns blast_radius (the group's name, path, expression_count, reference_count and references, blockers, unmeasured) and deletes nothing. Show that to the user and get their decision. Do not set confirm=True on your own because the user asked to delete earlier: they have not seen the blast radius yet.
confirm=True refuses if anything still references the group (parent groups from NSX's group-associations API; DFW and gateway-firewall rules and policy applied-to, by walking the rules), and refuses if that check itself fails (fail-safe). When the refusal names a DFW rule, retarget it with update_dfw_rule or drop it with delete_dfw_rule first. Returns {"action": "preview" | "deleted", "blast_radius": ...}, else {"error", "hint", "blast_radius"?}.
Inputs: group_id (required), target, confirm.
get_dfw_policyARead-onlyIdempotent
[READ] Get full details of a single DFW security policy.
Returns one policy object, not an envelope: category, sequence_number, stateful, scope and rule count. Use it once list_dfw_policies has narrowed to one id — never a display name. Then call list_dfw_rules for the rules inside.
Inputs: policy_id (required), target.
get_dfw_rule_statsARead-onlyIdempotent
[READ] Get packet/byte hit-count statistics for a DFW rule.
Returns one flat stats object, not an envelope: packet_count, byte_count, session_count, hit_count, popularity_index. Use it before update_dfw_rule or delete_dfw_rule to see if a rule still matches traffic; counters are cumulative and may read zero on a new rule. Ids come from list_dfw_rules.
Inputs: rule_id (required), policy_id (required), target.
get_groupARead-onlyIdempotent
[READ] Get details of a security group including membership criteria and effective members.
Returns one group object: its expression rules, member_count (the group's real size), and members — an envelope holding at most the first 50 effective VirtualMachine members, whose truncated flag says whether more were withheld. Report member_count as the size; counting members.items reports the sample instead. Use it once list_groups has narrowed to one id; membership is evaluated by NSX, so a tag written with apply_vm_tag may take seconds to appear.
Inputs: group_id (required), target.
get_idps_statusARead-onlyIdempotent
[READ] Get IDPS signature status and global IDS settings.
Returns one bundle, not an envelope: 'signature_status' (scalar fields of the signature bundle status, e.g. version/update state — names vary by NSX release) and 'settings' (auto_update, ids_events_to_syslog). Use it first to confirm IDS is on and current, then list_idps_profiles for the profiles. No per-signature or per-event detail, and 'signature_status' may be empty where IDS was never enabled.
Inputs: target.
get_traceflow_resultARead-onlyIdempotent
[READ] Get the current state and observations of an existing Traceflow.
Use this to check a previously initiated traceflow without waiting. Returns operation_state (IN_PROGRESS / FINISHED / FAILED) and observations typed by resource_type; Dropped* ones carry reason and acl_rule_id. Only a traceflow run_traceflow left IN_PROGRESS at its timeout is still on the manager — a completed one is deleted server-side and its id 404s here.
Inputs: traceflow_id (required), target.
list_dfw_exclusionsARead-onlyIdempotent
[READ] List the DFW exclusion list — the members no distributed-firewall rule reaches.
Read this before answering any question about a VM being micro-segmented or protected by DFW policy. A VM on this list has no DFW in its datapath: rules that name it, groups that contain it and policies scoped to it all still exist and none of them apply. On a VCF estate the management VMs (vCenter, VCF Operations, NSX managers) are commonly on it.
Returns the list envelope. 'items' holds one row per excluded member: the group 'path', its 'id' and 'display_name', the 'virtual_machines' in it and 'vm_count'. A row with 'members_error' is a group whose members could not be read — that is not an empty group, so do not read it as one.
'scope' says which list answered: "system_and_user" includes NSX's own system-owned exclusions, "user" means this manager refused that variant and system exclusions are NOT in the answer. An empty list under "user" is not proof that nothing is excluded.
Page with 'next_offset': pass the value back as 'offset' and stop when it is null. The list holds at most 100 groups, so one page is normally all of it.
Inputs: limit, offset, target.
list_dfw_policiesARead-onlyIdempotent
[READ] List DFW security policies in the default domain.
Start here. Returns the list envelope: 'items' holds each policy's id, display_name, category, sequence_number, stateful flag and rule count; 'returned'/'limit'/'total'/'truncated'/'hint' say whether the page is the whole answer — never read a full page as complete, narrow with name_filter or page with offset. Then get_dfw_policy for one policy's detail, or list_dfw_rules for the rules inside.
Page with 'next_offset': pass the value back as 'offset' and stop when it is null. Do not loop on 'truncated' — that says this page is not the whole collection, which stays true on the last page of a walk.
'rule_count' is null when NSX did not report one — that means "not retrieved", NOT "no rules", so do not conclude a null policy enforces nothing; call list_dfw_rules on it. Passing name_filter makes every count null (it is resolved via the Policy Search API, which carries no rule counts). A null anywhere adds 'rule_count_note' to the envelope.
Inputs: limit, offset, target, name_filter.
list_dfw_rulesARead-onlyIdempotent
[READ] List rules in a DFW security policy.
Returns the list envelope: 'items' holds each rule's id, display_name, action, sources, destinations, services, direction, disabled flag and sequence number; 'returned'/'limit'/'truncated'/'hint' say whether the page is complete. 'total' is always null here — a full page reports truncated=true and must be paged with offset; one Application policy can hold thousands of rules. Get policy_id from list_dfw_policies; then get_dfw_rule_stats for a rule's hit counts.
Page with 'next_offset': pass the value back as 'offset' and stop when it is null. Do not loop on 'truncated' — that says this page is not the whole collection, which stays true on the last page of a walk.
Inputs: policy_id (required), limit, offset, target.
list_groupsARead-onlyIdempotent
[READ] List NSX security groups in the default domain.
Returns the list envelope: 'items' holds each group's id, display_name, description and expression count; 'returned'/'limit'/'total'/ 'truncated'/'hint' say whether the page is the whole answer — never read a full page as complete, narrow with name_filter or page with offset. Then get_group for one group's criteria and effective members.
Page with 'next_offset': pass the value back as 'offset' and stop when it is null. Do not loop on 'truncated' — that says this page is not the whole collection, which stays true on the last page of a walk.
Inputs: limit, offset, target, name_filter.
list_idps_profilesARead-onlyIdempotent
[READ] List IDPS profiles configured in NSX.
Returns the list envelope: 'items' holds each profile's id, display_name, profile_severity (comma-joined), criteria (filter_name/filter_value pairs, e.g. ATTACK_TYPE or CVSS) and overridden signature count; 'returned'/'limit'/'total'/'truncated'/ 'hint' say whether the page is the whole answer — never read a full page as complete, narrow with name_filter or page with offset. Then get_idps_status for the signature-bundle version and IDS settings.
Page with 'next_offset': pass the value back as 'offset' and stop when it is null. Do not loop on 'truncated' — that says this page is not the whole collection, which stays true on the last page of a walk.
Inputs: limit, offset, target, name_filter.
list_vm_tagsARead-onlyIdempotent
[READ] List all NSX tags applied to a virtual machine.
Returns the list envelope: 'items' holds the VM's scope/tag pairs and 'vm_id' the fabric UUID apply_vm_tag and remove_vm_tag require — call this first to get it. Tags always arrive in one response, so 'truncated' is always false and empty 'items' means the VM really has no tags. 'tags' is a deprecated pre-1.8.0 alias of 'items', removed in 2.0 — read 'items'. Returns {"error", "hint"} if no VM matches, or several do.
Inputs: vm_display_name (required), target.
remove_vm_tagADestructiveIdempotent
[WRITE] Remove an NSX tag from a virtual machine.
Returns {"status": "removed", "vm_id", "scope", "tag"}, not the VM's remaining tags. Only the exact scope/value pair is removed — other tags survive. Removing a tag changes dynamic group membership immediately — groups with tag Conditions stop matching the VM — so re-check with get_group. Use list_vm_tags first to confirm the pair.
Inputs: vm_id (required), tag_scope (required), tag_value (required), target.
run_traceflowA
[WRITE] Run a Traceflow to trace a packet's path through the NSX overlay.
Injects a synthetic probe from the source port. Returns traceflow_id, operation_state (IN_PROGRESS / FINISHED / FAILED) and hop-by-hop observations typed by resource_type; Dropped* ones carry reason and acl_rule_id. Use it to find which DFW rule drops a flow, then get_dfw_rule_stats on that rule. A FINISHED traceflow is deleted server-side and its id 404s; only one still IN_PROGRESS at timeout_seconds survives for get_traceflow_result to poll.
Inputs: dst_ip (required), src_ip (required), src_lport_id (required), ttl, +5 more.
update_dfw_policyA
[WRITE] Partially update a DFW security policy (PATCH — only provided fields change).
Returns the updated policy dict; omitted arguments keep their values, so read them with get_dfw_policy first. Use it to rename or re-prioritise the policy itself — to change a rule inside use update_dfw_rule.
Inputs: policy_id (required), target, stateful, description, +2 more.
update_dfw_ruleA
[WRITE] Partially update a DFW rule (PATCH — only provided fields change).
Returns the updated rule dict; omitted arguments keep their values, so read them with list_dfw_rules first. Use it to retarget, re-prioritise or disable a rule — to add one use create_dfw_rule, to remove one delete_dfw_rule.
Inputs: rule_id (required), policy_id (required), action, logged, +8 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Each tool targets a distinct resource-action pair: DFW policies, DFW rules, groups, VM tags, IDPS, traceflow, and exclusions. The descriptions cross-reference each other and clarify edge cases, so there is no real ambiguity between similarly named tools.
All tools follow a uniform lowercase snake_case verb_noun pattern: list_/get_ for reads, create_/update_/delete_ for writes, plus apply_/remove_ for VM tags and run_/get_ for traceflow. The naming is predictable and consistent across every subdomain.
22 tools is above the well-scoped 3-15 range and feels heavy even though each tool is individually distinct. The server covers six related subdomains, which justifies some breadth, but it is more than 'slightly over' and lands in the borderline zone.
DFW policy/rule lifecycle and VM tag operations are well covered, including create/get/list/update/delete for policies and rules. However, group criteria cannot be updated, IDPS profiles have no create/update/delete, and the exclusion list is read-only, leaving notable management gaps.
Maintenance
Related MCP Connectors
Compliance frameworks (SOC 2, ISO 27001, CMMC, NIST, more) delivered to AI agents as MCP tools.
AI gateway FinOps, live model pricing, balance alerts, usage exports, and reseller ops via MCP.
AI-security knowledge as MCP: standards-mapped tools (OWASP, NIST, MITRE) for AI agents.
MCP gateway: one connection for your AI apps, with tool policies, PII redaction and audit logs.
Related MCP Servers
- AlicenseAqualityBmaintenanceAI-powered VMware NSX networking management. Configure segments, gateways, NAT, routing, and IPAM via natural language with 31 MCP tools.33335 PyPI5MIT
- AlicenseAqualityBmaintenanceAI-powered VMware vSphere with Tanzu (VKS) management. Create and manage Supervisor Namespaces and TanzuKubernetesClusters with 20 MCP tools.25306 PyPI6MIT
- AlicenseAqualityBmaintenanceAI-powered VMware Aria Operations monitoring and capacity planning. Query metrics, manage alerts, detect anomalies, and plan capacity with 18 MCP tools.46412 PyPI4MIT
- AlicenseAqualityBmaintenanceVMware AVI Load Balancer (NSX Advanced Load Balancer) management plus AKO Kubernetes integration. 29 MCP tools across virtual services, pools, analytics, and AKO lifecycle, with double-confirmation gates and audit logging for destructive operations.28148 PyPI2MIT