Skip to content

SSE (Agent Events)

The Server-Sent Events endpoint at GET /mcp/sse provides real-time notifications for MCP agents, per the MCP specification.

Connection

bash
curl -N http://localhost:3000/mcp/sse \
  -H "Authorization: Bearer API_KEY"

Event Format

event: notifications/klaxon
data: {"org_id":"...","kind":"item.created","id":"item-uuid"}

All events use the notifications/klaxon event type. The data field is a JSON object.

Event Kinds

Same as WebSocket events:

KindDescription
item.createdNew item
item.updatedItem changed
item.answeredForm submitted
item.dismissedItem dismissed
item.archivedItem archived
bulk.updatedBulk change
item.viewedItem viewed

Keep-Alive

The server sends periodic keep-alive comments (: lines) to prevent proxy timeouts. No action needed from the client.

When to Use SSE vs WebSocket

TransportBest for
SSE (/mcp/sse)MCP agents — one-directional, matches MCP spec
WebSocket (/api/ws)Web/mobile clients — bidirectional, supports ping/pong

Both receive the same events from the same Postgres LISTEN/NOTIFY source.