CLI & MCP server
@roundtrip/mcp is a Model Context Protocol
server for AI agents. It wraps @roundtrip/sdk, so an agent can send a
notification, ask for human approval, list channels, and read the status of a
notification it sent.
Register the server
claude mcp add roundtrip \
--env ROUNDTRIP_API_KEY=ak_xxx \
--env ROUNDTRIP_BASE_URL=https://api.roundtrip.sh \
-- npx -y @roundtrip/mcpROUNDTRIP_API_KEYak_...requiredA workspace API key. New keys include notifications:write,
notifications:read, and channels:read.
ROUNDTRIP_BASE_URLurlrequiredYour deployment host, for example https://api.roundtrip.sh.
Tools
send_requesttooloptionalGeneral structured notification. Supply push plus optional content,
detail, response, metadata, and idempotency_key.
request_human_approvaltooloptionalShortcut for approve/reject decisions. Builds content actions with stable
approve and reject ids and returns a notification id immediately.
get_request_statustooloptionalReads the current notification snapshot, named slots, append history, and responses by notification id.
list_channelstooloptionalLists channels available to the API key.
Agent prompts
These are prompts you can give the agent after the MCP server is registered.
Send a Roundtrip notification to the "deploys" channel:
push title "Deploy finished" and body "v2.4.1 is live in production."send_request
send_request is the general tool. Its name stays stable for agents, but the
payload is the notification API shape:
{
"channel": "on-call",
"push": {
"title": "Checkout latency is high",
"body": "p95 crossed 2.4s",
"priority": "high"
},
"content": {
"title": "Checkout latency",
"description": "Investigating elevated p95 latency.",
"status": "warning"
},
"metadata": { "incidentId": "inc_42" },
"idempotency_key": "incident-inc_42-open"
}request_human_approval
The approval shortcut fills in an approve/reject card for the agent:
channelstringrequiredThe channel to publish into.
titlestringrequiredThe decision, phrased as a clear question.
bodystringoptionalOne-line summary used as push body and content description.
detailsstringoptionalMarkdown context rendered in the detail screen.
contextobjectoptionalMetadata echoed back in the signed webhook event.
webhookurloptionalWhere the signed response event is posted.
The tool does not block
The tool returns the notification id immediately. The actual human decision
arrives later as a signed response.submitted webhook event.
Local development
ROUNDTRIP_API_KEY=ak_xxx \
ROUNDTRIP_BASE_URL=https://api.roundtrip.sh \
pnpm --filter @roundtrip/mcp devstdout is sacred
MCP uses stdout for the protocol stream. Debug logging must go to stderr.