vm_forward
Forward this Mac's ports to a virtual machine.
Forwards ports of this Mac's localhost (127.0.0.1 and ::1) to the guest through its guest agent, to the guest's localhost unless an address the guest has is given, now and at its next starts. add takes "8080:80", "15353:53/udp" or "9000:[::1]:9000"; remove takes "8080" or "15353/udp"; with neither it lists them. Mac ports below 1024 are refused: only root binds them there. The person approves each addition. A program on this Mac that binds the same port later loses its localhost clients to the forward until the forward goes. Clones get none.
- Profiles
- operator, full
- Read-only
- No
- Destructive
- Yes
- Idempotent
- No
- Open world
- No
- Runs as a task
- No
Parameters
addarray of stringsForwards to add, such as "8080:80", "15353:53/udp" or "9000:[::1]:9000".
removearray of stringsForwards to remove, such as "8080" or "15353/udp".
vmstringRequiredThe machine's name or identifier, as vm_list shows it.
Output
The result's structured content is an object with these fields.
JSON Schema: /schemas/0/mcp/tools/vm_forward/output.json
forwardsarray of objectsRequiredforwards[].connectionsintegerRequiredforwards[].droppedintegerRequiredforwards[].forwardobjectRequiredforwards[].statestring or objectRequiredOne of
listening,stopped, or an object that holds one key:unavailable.
Fields nested deeper are in the schema.