Add device
add_deviceCreates a new Portveil device: saves WireGuard tunnel files to import on phones or laptops, or returns root commands so a Linux machine registers itself. Uses one device slot.
Instructions
Add a new device to the account. kind "phone_or_computer" (iPhone, Android, Mac, Windows using the WireGuard app): creates the device now and saves one WireGuard tunnel file per location, with a private key made locally, into a folder on the machine running this MCP server; the key is never shown in the reply. Import a file in the WireGuard app to connect. These devices are view-only: they can't be moved remotely. kind "linux_machine" (a server or the machine an agent runs on): returns the exact commands to run as root on that machine; it makes its own key and registers itself, and can then be moved, rotated and switched with the other tools. Uses one device slot (see get_account). Needs an admin-scope token for phone_or_computer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | phone_or_computer: WireGuard app on a phone or laptop. linux_machine: a Linux server or agent machine running the Portveil agent | |
| name | Yes | Display name for the new device, e.g. "Miguel iPhone" or "scraper-box" | |
| folder | No | phone_or_computer only: folder to save the tunnel files in. Default ~/Portveil/<name> | |
| split_tunnel | No | linux_machine only, advanced: default false (full tunnel), which sends everything the machine connects to through Portveil and keeps SSH and other incoming connections on their normal route, so remote servers stay reachable. true only reaches Portveil's own network: the machine's internet traffic would NOT go through Portveil | |
| temporary_minutes | No | phone_or_computer only: delete the device automatically after this many minutes (5 to 43200, i.e. 30 days). Omit for a permanent device |