otterkit

v0.52.0
io.github.useotterkit/otterkit Checked 1 day ago Published 13 days ago

Webhooks, tunnels, rooms and public URLs for local MCP servers, set up by your AI agent.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

webhook_create Create webhook endpoint

Provision a public webhook capture endpoint (https://<subdomain>.otterkit.app). Always-on and server-answered: the endpoint keeps responding and capturing even if the daemon dies. Requests land in a local log readable with requests_list/request_await. Costs 1 credit per hour, never more than 300 credits/30 days. Returns the public URL.

ParameterTypeDescription
emailbooleanGive the endpoint an email inbox: mail to <subdomain>@otterkit.app lands in the capture feed as a request with method EMAIL (JSON body: from/subject/text/html) - awaitable with request_await
respondintegerAuto-response HTTP status (default 200)
respondBodystringAuto-response body (default {"received":true})
subdomainstringStable reserved subdomain (claimed to the account on first use)
ttlstringAuto-stop after e.g. 45m, 4h, 3d (default 24h, or "never" to run until stopped)
verifyobjectVerify each request's webhook signature: captures record valid/invalid/missing and forwarded requests carry an X-OtterKit-Verified header

tunnel_create Create tunnel to localhost

Expose a local port on a public URL (https://<subdomain>.otterkit.app). Runs as a background daemon. Costs 1 credit per connected hour (never more than 300 credits/30 days). Set capture=true to also log every request for requests_list/request_await/request_replay.

ParameterTypeDescription
port *integerLocal port to forward to
authstringRequire HTTP Basic auth as "user:pass" (enforced locally, never sent to servers)
capturebooleanAlso capture requests to the local log
hoststringLocal host (default 127.0.0.1)
subdomainstringStable reserved subdomain
ttlstringAuto-stop after e.g. 4h, 3d (default 24h, or "never" to run until stopped)

sessions_list List running sessions

List running OtterKit tunnel/webhook daemons on this machine.

session_stop Stop a session

Stop a running tunnel/webhook daemon. The capture log is kept on disk so requests_list and request_replay still work afterwards.

ParameterTypeDescription
subdomain *stringSubdomain of the daemon to stop

requests_list List captured requests

Read requests captured on a webhook or tunnel(capture=true) session, newest last. Bodies are decoded when printable. Filters combine.

ParameterTypeDescription
subdomain *stringSession subdomain
lastintegerMax entries to return (default 20)
methodstringOnly this HTTP method
pathstringOnly paths containing this substring
statusstringOnly this response status (e.g. 500 or 5xx)

request_await Wait for a request to arrive

Block until a request matching the filters arrives on a capture log, then return it. The perfect assertion step: trigger an event, await its arrival, inspect the payload. Only matches NEW requests from the moment of the call. The session keeps running afterwards.

ParameterTypeDescription
subdomain *stringSession subdomain to watch
methodstringOnly match this HTTP method
pathstringOnly match paths containing this substring
statusstringOnly match this response status (e.g. 200 or 2xx)
timeoutSecondsintegerGive up after this many seconds (default 60, max 300)

request_replay Replay a captured request

Re-send a captured request to a local target (no tunnel round-trip, no credits). Optionally override method/path/headers/body or edit individual JSON body fields via set (e.g. ["data.amount=999"]). The exchange is appended to the capture log.

ParameterTypeDescription
subdomain *stringSession whose capture log to replay from
bodystringReplace the request body
headersarrayOverride/add headers, each "Key: value"
indexintegerWhich request: 1 = oldest, -1 = latest (default -1)
methodstringOverride the HTTP method
pathstringOverride the request path
resignstringRe-sign the edited body with this provider scheme (needs secret) so the handler still accepts it
secretstringSigning secret for resign
setarrayEdit JSON body fields before sending, each "path=value" e.g. "data.amount=999"
targetstringhost:port to send to (defaults to the running tunnel daemon's target)

try_claim Claim an otterkit.com/try session

Continue a session started on the otterkit.com/try page: same public URL, converted to a normal metered webhook session on this account. Captures from the page are imported into the local log. The claim code comes from the /try page ("subdomain:secret"). Note: this registers the session for capture but a live connection requires `otterkit webhook --claim` in a terminal; prefer webhook_create unless continuing a /try session specifically.

ParameterTypeDescription
code *stringClaim code from the /try page, "try-xxxx:secret"
ttlstringAuto-stop TTL, e.g. 4h (default 24h)

event_send Send a synthetic signed provider event

Fire a correctly-signed synthetic webhook event (Stripe, GitHub, Shopify, Slack) at a local handler - develop and test a webhook handler with NO provider account, dashboard, or real event needed. Pass the signing secret and the handler will pass its signature verification. Omit event/target and pass list=true to see available events. Fully local, no credits.

ParameterTypeDescription
bodystringOverride the generated payload with raw JSON
eventstringprovider:event, e.g. "stripe:payment_intent.succeeded" or "github:push"
listbooleanList available providers and events instead of sending
secretstringSigning secret - signs the event so the handler's verification passes
targetstringLocal handler, e.g. "127.0.0.1:3000/webhooks/stripe"

request_verify Verify captured request signatures

Check whether captured requests carry a valid provider signature for the given secret - answers "is my signature-verification code wrong, or is the payload wrong?". Returns per-request valid/invalid with the reason. Fully local; the secret never leaves the machine.

ParameterTypeDescription
provider *stringSignature scheme
secret *stringThe signing secret to verify against
subdomain *stringSession whose captured requests to verify
lastintegerVerify the last N requests (default 20)

pulse_create Create a pulse (scheduled HTTP / dead-man switch)

Provision a pulse - the scheduled third primitive. Active mode calls a public URL on an interval (min 30s) and stores every response as run history (read it with webhook_history). Expect mode returns a URL that must be pinged within the window, alerting the owner on silence. Fully server-side: survives this machine dying. Costs 1 credit per 100 runs, never more than 300 credits/30 days; 1 credit charged at creation. Default TTL "never".

ParameterTypeDescription
bodystringRequest body for active runs
expectstringExpect mode: alert if no check-in arrives within e.g. 15m, 1h, 1d
intervalstringActive mode: run every e.g. 30s, 10m, 4h, 1d (min 30s)
methodstringHTTP method for active runs (default GET)
subdomainstringStable name for the pulse
ttlstringAuto-stop after e.g. 4h, 3d (default: never)
urlstringActive mode: public http(s) URL to call each run

pulse_update Edit a live pulse in place

Change an owned pulse's schedule without recreating it: interval/window, mode, and for active mode the target URL, method, and body. Run history, the pulse URL, and the billing window all survive; the next run (or check-in window) is measured from the update. Omitted fields keep their current values.

ParameterTypeDescription
subdomain *stringThe pulse to edit
bodystringActive mode: new request body (default: keep)
intervalstringNew interval/window e.g. 30s, 10m, 4h, 1d (min 30s; default: keep)
methodstringActive mode: new HTTP method (default: keep)
modestringSwitch mode (default: keep)
urlstringActive mode: new target URL (default: keep)

webhook_domain Custom domain on a webhook endpoint

Serve an owned webhook endpoint on a domain the user controls (e.g. hooks.their-company.com) - the certificate is issued and renewed automatically once they add the returned CNAME record. Actions: status (poll issuance), attach {hostname}, remove. One hostname per endpoint.

ParameterTypeDescription
action *string
subdomain *stringWebhook endpoint to configure
hostnamestringattach: the hostname to serve the endpoint on

history_replay Replay a server-stored capture to a URL

Re-deliver a request from server-side stored history (webhook_history returns the ids) to any target URL - original method, headers (transport noise stripped), and body, plus an X-OtterKit-Replay marker. Optional overrides edit the method, headers, or body first. Cloud endpoints only; local-log captures replay with request_replay.

ParameterTypeDescription
requestId *stringStored request id (from webhook_history)
subdomain *stringEndpoint whose stored history holds the request
targetUrl *stringWhere to deliver the copy
bodyTextstringReplace the body
headersobjectReplace the header set entirely
methodstringOverride the HTTP method

webhook_history Server-side stored capture history

Read the requests OtterKit stored server-side for a webhook endpoint - works from any machine on the account, no local log needed. Console (cloud) endpoints only; CLI webhook captures stay on the machine (use the local capture log tools). Returns headers, base64 body, source IP, and served status, newest first.

ParameterTypeDescription
subdomain *stringWebhook endpoint whose stored history to read
beforestringISO receivedAt cursor: return strictly older requests
limitintegerUp to N requests (default 50)
methodstringOnly this HTTP method
pathstringOnly paths containing this substring

account_status Account and credit balance

Show the logged-in OtterKit account and prepaid credit balance (1 credit = $0.01 = 1 tunnel hour).

room_open Open a room to reach a person

Open a chat page a person can read and reply to from any device, with no account. Use it when you need a decision, an approval or a correction and the person may not be at this terminal. Returns the link to give them; their devices also get a push notification when you post (if they enabled push in the console). Then use room_ask to ask and wait, and room_say for updates. You only hear the room while room_ask or room_wait is running, and the page tells the person whether you are listening, so keep one running while you expect a reply; if your client can run shell commands in the background, ru…

ParameterTypeDescription
title *stringWhat the room is about, e.g. "Deploying v2"
agentstringName you post under (default: your client name)
ttlstringAuto-close after e.g. "4h" (default 24h)

room_ask Ask a question in a room and wait

Post a question to a room and wait for a person to reply. Offer short options when the answer is a choice: they appear as buttons, and the person can also type. Returns answered:false when nobody replies in time; in that case do not assume approval. Call room_wait to keep waiting.

ParameterTypeDescription
question *stringThe question, with the context needed to decide
optionsarrayAnswers offered as buttons, e.g. ["Approve","Deny"]
roomstringRoom name (default: the newest open room)
timeoutSecondsintegerHow long to wait (default 300)

room_say Post an update to a room

Post progress or a result to a room without waiting for a reply. Keep it short and say whether anything is needed from the person.

ParameterTypeDescription
text *stringThe update
roomstringRoom name (default: the newest open room)

room_wait Wait for a reply in a room

Return what people have written in a room since you last looked, waiting for the next reply if there is nothing new. Use it after room_ask timed out, or to pick up follow-up instructions.

ParameterTypeDescription
roomstringRoom name (default: the newest open room)
timeoutSecondsintegerHow long to wait (default 300)

room_close Close a room

Close a room when the task is finished. Billing for it stops and the page becomes read-only.

ParameterTypeDescription
roomstringRoom name (default: the newest open room)

webhook_forwarding

Manage a webhook endpoint's forwarding rules - part of its config. Every request matching a rule is also delivered to its callback URL, HMAC-signed, with retries, until the rule is removed (the create secret verifies X-OtterKit-Signature; shown once). An optional transform template reshapes the delivery: placeholders like {{data.object.id}} pull from the JSON body ({{$method}}, {{$path}}, {{$body}}, {{$header.name}} are built-ins) - e.g. shape a Slack message and point callbackUrl at a Slack webhook. destination 'email' emails the owner instead (throttled, no callback); destination 'push' send…

ParameterTypeDescription
action *string
subdomain *stringA live webhook endpoint
callbackUrlstringadd: URL matching requests are delivered to
destinationstringadd: where matches go - 'url' (default, needs callbackUrl), 'email' (throttled owner email), or 'push' (Web Push to the owner's enabled devices, max 1/min per rule)
fieldEqualsstringadd: required value at fieldPath
fieldPathstringadd: JSON body dot-path, e.g. event.type
methodstringadd: only match this HTTP method
pathstringadd: only match paths with this prefix
requireVerifiedbooleanadd: only deliver requests whose inbound signature verified 'valid' (needs verification armed on the endpoint)
ruleIdstringremove: the rule to delete
scriptstringadd: JavaScript run per match in a sandboxed isolate (no network, 50ms CPU) - export default {transform(req)} returning string | {body, contentType?} | object (JSON) | null (skip); req is {method, pat…
tokenstringSession connect token (defaults to a local daemon record)
transformstringadd: template delivered instead of the raw capture, e.g. {"text": "paid {{data.object.amount}}"}
transformContentTypestringadd: Content-Type of the transformed delivery (default application/json)

schema_drift Payload Drift Watch

Payload Drift Watch for a webhook endpoint: OtterKit baselines the JSON shape of arriving requests per event group (first path segment + a type/event/action discriminator; ~20 samples arm a group), then records findings when a provider's payloads change - new_field, missing_field, type_change, format_change, new_event_type. Findings dedupe by (group, path, kind) and email the owner (throttled). Actions: status (config + groups + findings), enable, disable, accept (close a finding - the baseline already follows reality), ignore (close and mute that path forever), unignore (re-watch paths).

ParameterTypeDescription
action *string
subdomain *stringA live webhook endpoint
findingIdstringaccept/ignore: finding id from status
pathsarrayunignore: dot paths to start watching again
tokenstringSession connect token (defaults to a local daemon record)