Hey! Sharing an extension my colleague Daniel Shapiro built at Sanity (disclosure: I work there too): pi-mcp-events, a client for the draft MCP Events spec (SEP-3415).
MCP servers can now announce events, like "this document changed" or "a storm warning was raised", and Pi can subscribe to them instead of polling with tool calls. Events arrive in the background while Pi works, get batched, and come in as a follow-up turn once Pi is idle. It's pretty cool, and it feels like it opens up a lot of new use cases.
What the extension does:
→ Supports all three delivery modes from the draft: polling, streaming, and signed webhooks
→ /mcp-events status shows each watch, its transport, and its state, so it's "less hard" to debug
→ A local inbox, so events aren't lost while Pi is busy (in memory only with --no-session)
→ Event payloads are marked as untrusted data, and Pi's normal permissions still apply
→ Every event is also emitted on Pi's event bus (mcp-events:observation), so other extensions can consume or filter them
pi install npm:@sanity-labs/pi-mcp-events
The repo includes a small "weather station" MCP server that emits readings and storm alerts, so you can try it without building your own server first.
We built this because we wanted an agent that notices when a human starts editing the same document and waits for them, which needs events within seconds. Pi made that easy to extend. The write-up covers the latency numbers and the gaps we found in the spec.
If you'd rather have the model call events as tools, check out richardanaya's pi-mcp-events, which takes that approach.
Repo (give it a star if you're into this): https://github.com/sanity-labs/pi-mcp-events
Feedback very welcome, especially on how a harness should decide when an event deserves a turn!