Manage WireGuard Peer
manage_wireguard_peerAdd or remove a WireGuard peer on a MikroTik router. Idempotent by public key to prevent duplicate peers.
Instructions
Add or remove a WireGuard peer. Idempotent by public key: add returns already_exists if a peer with the same public key already exists on the interface.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| routerId | Yes | Target router identifier from the router registry | |
| action | Yes | Action to perform | |
| interface | Yes | WireGuard interface name (e.g. wg0) | |
| publicKey | Yes | Peer public key in base64 format (44 characters) | |
| allowedAddress | No | Allowed IP address/CIDR for this peer (e.g. 10.0.0.2/32) | |
| endpoint | No | Peer endpoint as IP:port (e.g. 1.2.3.4:51820) | |
| comment | No | Optional comment | |
| dryRun | No | Preview changes without applying | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |