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:
| Kind | Description |
|---|---|
item.created | New item |
item.updated | Item changed |
item.answered | Form submitted |
item.dismissed | Item dismissed |
item.archived | Item archived |
bulk.updated | Bulk change |
item.viewed | Item 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
| Transport | Best 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.