Menu
MCP: p2p
P2P apps: signaling, relay, TURN, mailbox
| Toolset | p2p (default) |
| Tools | 10 |
Permissions granted by weird mcp setup | p2p:read, p2p:write |
With --read-only | p2p:read |
| Turn it on | on by default |
weird_p2p_apps#
P2P apps. List the user's p2p apps, or show one (by app_id) with its addresses, origins, settings, mailbox and billing state. Small credit charge per successful request (charge key p2p.reads per_request in weird_credits_charges); failed calls are free.
| Changes something | no (read-only) |
Needs confirmed: true | no |
| Cost | a small credit charge per successful request (failed calls are free) |
| Calls | listP2pApps, getP2pApp |
Arguments:
app_id, string — show this app instead of listing
weird_p2p_app_create#
Create a p2p app. Create a p2p app answering on its name under the p2p domain, with the web origins allowed to connect, its limits and the offline mailbox on or off. BILLS HOURLY while it exists (see weird_credits_charges; the first hour must be covered). Charge keys (see weird_credits_charges): recurring.p2p-app-hourly at per_hour, every hour while it exists; recurring.p2p-app-hourly at per_mb_hour_cached × the mailbox's cached MB, every hour while it exists; p2p.relay-traffic at per_mb_relayed, as used; p2p.mailbox-traffic at per_mb_served_mailbox, as used.
| Changes something | yes |
Needs confirmed: true | yes (costs credits) |
| Calls | createP2pApp |
Arguments:
confirmed, boolean, required — must be true, and only after the user explicitly agreed to this action and its cost or consequenceidempotency_key, string — optional, for an action that costs credits: pass the same value again if you retry this exact action; a repeat never creates or bills a second one. Leave it out the first time: the answer returns the key usedmailbox_enabled, boolean — turn the offline mailbox onname, string, required — a DNS label: 1-63 of a-z, 0-9 and inner hyphensorigins, null or array of strings — web origins allowed to connect (exact, or *.domain wildcards; at most 20); none admits any originsettings, object — limits as key: positive integer, held under their ceilings
weird_p2p_app_update#
Change a p2p app. Change a p2p app's origins, settings, relay, mailbox or who may mint mailbox tokens; keys left out are untouched. Free. origins and settings each REPLACE the whole list or map: read them first with weird_p2p_apps and send the complete new value. Turning the mailbox off drops its stored messages.
| Changes something | yes |
Needs confirmed: true | no |
| Call first | weird_p2p_apps |
| Calls | updateP2pApp |
Arguments:
app_id, string, required — the app's idmailbox_enabled, null or boolean — the offline mailbox on or off (off drops its messages)mailbox_open_mint, null or boolean — whether browsers may mint mailbox tokens themselvesorigins, null or array of strings — the COMPLETE new origin list (replaces the current one; an empty list admits any origin)relay_enabled, null or boolean — the relay on or offsettings, object — the COMPLETE new settings map (replaces the current one)
weird_p2p_app_delete#
Delete a p2p app. Delete a p2p app: its clients lose it at once, its mailbox is dropped and its hourly billing stops. Free. Irreversible.
| Changes something | yes |
Needs confirmed: true | yes (cannot be undone) |
| Calls | deleteP2pApp |
Arguments:
app_id, string, required — the app's idconfirmed, boolean, required — must be true, and only after the user explicitly agreed to this action and its cost or consequenceidempotency_key, string — optional, for an action that costs credits: pass the same value again if you retry this exact action; a repeat never creates or bills a second one. Leave it out the first time: the answer returns the key used
weird_p2p_domains#
App hostnames. List a p2p app's own hostnames with their state and the DNS record each needs. Small credit charge per successful request (charge key p2p.reads per_request in weird_credits_charges); failed calls are free.
| Changes something | no (read-only) |
Needs confirmed: true | no |
| Cost | a small credit charge per successful request (failed calls are free) |
| Calls | listP2pAppDomains |
Arguments:
app_id, string, required — the app's id (from weird_p2p_apps)
weird_p2p_domain_attach#
Add an app hostname. Add one of the user's hostnames to a p2p app; the answer names the record to point it at (it goes live once the record has held two minutes). Free. At most 5 per app; a hostname another product uses is refused.
| Changes something | yes |
Needs confirmed: true | no |
| Calls | attachP2pAppDomain |
Arguments:
app_id, string, required — the app's idhostname, string, required — a fully qualified hostname of the user'swildcard, boolean — a wildcard hostname (its zone must be hosted for the user)
weird_p2p_domain_verify#
Check an app hostname. Check an app hostname's DNS now instead of waiting for its next turn. Free.
| Changes something | yes |
Needs confirmed: true | no |
| Calls | verifyP2pAppDomainDns |
Arguments:
app_id, string, required — the app's iddomain_id, string, required — the app hostname's id (from weird_p2p_domains)
weird_p2p_domain_detach#
Remove an app hostname. Remove a hostname from a p2p app; clients using it lose the app. Free. Irreversible (attach it again to restore it).
| Changes something | yes |
Needs confirmed: true | yes (cannot be undone) |
| Calls | detachP2pAppDomain |
Arguments:
app_id, string, required — the app's idconfirmed, boolean, required — must be true, and only after the user explicitly agreed to this action and its cost or consequencedomain_id, string, required — the app hostname's id (from weird_p2p_domains)idempotency_key, string — optional, for an action that costs credits: pass the same value again if you retry this exact action; a repeat never creates or bills a second one. Leave it out the first time: the answer returns the key used
weird_p2p_mailbox#
Mailbox deposit or replay. Deposit a payload in a room of a p2p app's offline mailbox (action send), or replay a room's messages (action receive). Free. Cached and served bytes are billed per MB. The mailbox must be on (weird_p2p_app_update). Payloads are stored as sent: encrypt sensitive data first.
| Changes something | yes |
Needs confirmed: true | no |
| Calls | mintP2pMailboxCredentials |
Arguments:
action, string, required — send or receiveafter, string — receive: replay forward from this seqapp_id, string, required — the app's idbase64, boolean — send: the payload is base64before, string — receive: scroll back from this seqlimit, integer — receive: at most this manypayload, string — send: the payload (text, or base64 with base64 true)room, string, required — the room id
weird_p2p_protocol#
P2P protocol document. Return the protocol a p2p app's clients speak: discovery, signaling messages, origins and limits, TURN, the relay and the offline mailbox. Free. Read it before writing client code.
| Changes something | no (read-only) |
Needs confirmed: true | no |
No arguments.
This page is generated from the weird CLI; it changes when the CLI does.