← Wiki
2026-11-21 concept mcpeventspollingwebhookschannelsharnessclaude-codegnome

MCP Events: letting a server tell the agent that something happened

Definition

An MCP extension (io.modelcontextprotocol/events, SEP-3415) that lets a client subscribe to things happening in an upstream system (a Slack message, a CI run, a new email) and hand them to an agent that is not being watched. It is built on the 2026-07-28 protocol revision (server/discover, per-request capabilities), so it does not exist on older stacks. Working group: Tasks and Events, leads from AWS and Microsoft. Stage: Beta, spec merged 20 Nov 2026.

Rule

How it works, from the spec rather than the README:

  1. Discovery. A server advertises extensions["io.modelcontextprotocol/events"] in server/discover. events/list returns event types: name, description, inputSchema (subscription arguments, usually filters), payloadSchema, and delivery, any non-empty subset of poll, push, webhook. A server that does not offer it answers -32601.
  2. An occurrence is {eventId, name, timestamp, data, cursor}. eventId is the upstream id (a Stripe evt_*, a Gmail message id) so the client can deduplicate; cursor is opaque and resumable.
  3. Poll. events/poll {name, arguments, cursor} returns {events[], cursor, truncated, hasMore, nextPollMs}. First call with cursor: null means “from now”. No server state. The SDK runs the loop and invokes the model only when events[] is non-empty. The client should floor the interval at 1 s.
  4. Push. A long-lived events/stream request: SSE on Streamable HTTP, notifications on stdout for stdio. Ends when the request is cancelled.
  5. Webhook. events/subscribe {name, arguments, delivery:{url, secret}, ttlMs} returns {id, refreshBefore, cursor}. The client picks the whsec_ secret. The server POSTs signed (Standard Webhooks) bodies, retries with backoff for a bounded window, and the client must re-subscribe before refreshBefore or the subscription lapses (or asks for no expiry and the server owns cleanup). The URL may be a forward proxy that serves clients by poll or push.
  6. Guarantees. At-least-once when the upstream is durable and the client replays from its stored cursor; no cross-subscription ordering; webhook order is best effort. The client owns all subscription state. Payloads are untrusted data, same as any tool result.

How it differs from what Claude Code has today:

Direction Runs where Cost when nothing happens
Channel (notifications/claude/channel) server pushes text into an open interactive session a local server, only while the session is open none (idle)
Monitor tool a background command’s stdout lines wake the session the session’s shell none, but only while the session lives
Hooks fire on the client’s own lifecycle events the session n/a, they do not see the outside world
/loop, cron, claude -p tick the clock session or launchd a full model turn per tick
Routines / RemoteTrigger schedule (min 1 h), /fire, GitHub events Anthropic cloud an empty run per scheduled tick
MCP Events server to client, with discovery, cursors, replay, auth protocol-level, in the client SDK none: the model is not invoked for an empty poll

The point is not a new transport. A channel is a text message with no schema, no replay and no dedupe, and it works only while a session is open. Events is a typed, resumable subscription that survives a client that was off.

Does Claude Code speak it? No evidence that it does. Claude Code 2.1.330 (this Mac) has no events/* handling that I could find; the changelog and docs say nothing, and the open request anthropics/claude-code#101434 asks for it, webhook mode first, as a routine trigger (“ChatGPT has supported MCP Events (webhook mode) since 2026-09-29”). Clients that do implement it, found by code search: Mastra, opencode, lobehub; the reference Python SDK lists it as “not yet implemented” in its examples. Treat support as absent until the changelog says otherwise.

Where it fits for us

flowchart LR
    subgraph today["Today: the clock asks"]
        T["launchd / cron tick
5 min, 30 min, 1 h"] --> Q["script asks upstream
calendar, GitHub issues, log"] Q -->|"usually nothing"| E["empty turn or empty run"] Q -->|"something"| M["claude -p / session turn"] end subgraph poll["Events: poll"] P["client SDK loop
nextPollMs from server"] -->|"events[] empty"| X["no model call"] P -->|"events[] non-empty"| M2["model turn"] end subgraph push["Events: push"] S["events/stream
held open"] -->|"occurrence"| M3["model turn"] end subgraph hook["Events: webhook"] U["upstream"] --> W["server POSTs signed body
to our Worker URL"] --> R["Worker stores, client reads
by poll or push"] R --> M4["model turn"] end

What polls on a timer in our stack (read from control-bot/bin/tg-jobs.sh, harness/README.md):

Job Interval Uses Claude per tick?
calwatch (cal-watch.py, 3 Google accounts, T-60 and T-15 warnings) 5 min no
ask (agent-inbox.py, GitHub issues to claude -p) 5 min only when an issue is queued
saved (his Saved messages) 5 min only when new
sweep, standup, channel, pulse slots, hourly or daily yes, every slot
doctor 30 min no
orchestrator tick (cron prompt: tail tg-jobs.log, calendar look-ahead) 30 min yes, every tick, empty most of the time

Ranked candidates:

  1. The orchestrator tick. Replaces a 30-minute model turn that mostly finds nothing with subscriptions: “a job in tg-jobs.log went BAD” and “a calendar event starts in under an hour”. Saves the empty turns (the only recurring token cost in the list that buys nothing) and cuts latency from up to 30 min to the poll interval. Blocker: the client. Claude Code does not run an events loop, so nothing would wake the session. Do now instead: a small channel server that polls the log and the calendar itself and emits a message only on change, with eventId and a cursor in the payload. It works today, and moving to real Events later changes who owns the loop, not the payload.
  2. Gnome job completion. The gnome MCP (research queue, status, inbox) is a natural event source: research.done {topic, path} instead of a session tailing status. Replaces polling gnome_status. Saves the wait-and-check turns on the Mac side; a long research run is hours. Blocker: same client gap, plus the server must be on the 2026-07-28 revision.
  3. agent-inbox (GitHub issues). Replaces the 5-minute ask poll (288 runs a day, no model cost, up to 5 min of latency) with a GitHub webhook into the trip-watchdog Worker that already queues his bot messages. Be blunt: this needs no MCP Events. GitHub already speaks webhooks and we already have the receiver; the extension adds nothing until the consumer is an MCP client. Do it as plain webhooks if 5 minutes ever hurts.
  4. Routines on connector events (#101434). The case where Events pays off for us without owning a machine: a cloud routine that wakes on an event from a connector instead of an hourly schedule. Blocker: not built, and not ours to build. Watch the issue.

Not candidates: calwatch (no model cost, and Google Calendar would need an event-emitting MCP server first; push channels from Google need a public URL with renewal, more moving parts than a 5-minute poll that costs nothing), solograph (a read-only index, nothing happens that a session needs to hear about), the Telegram bridge (already a push channel).

Answer in one line: not yet. The client support is missing, so no job should wait for it. Copy the shape (typed occurrence, stable eventId, a cursor that survives restart, “empty means silent”) into channels we write now, and revisit when #101434 closes or the Claude Code changelog mentions events/poll.

Exceptions

Numbers

Learned from

The ext-events repo spec, 21 Nov 2026; our own loop in agent-harness-and-always-on-gnome, channels in claude-code-channels, the control bot in control-bot, the brain’s nightly loop in company-brain, the memory server in solograph-rebuilt-one-binary.

Related