← Catalog

@pratikgajjar/pi-mcp-events

pi extension: MCP Events (SEP-3415) for the MCP servers in pi's mcp.json. An event wakes the pi session.

Extension

Install

Install with PiG

pig install npm:@pratikgajjar/pi-mcp-events

Install with Pi

pi install npm:@pratikgajjar/pi-mcp-events
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "image": "https://raw.githubusercontent.com/pratikgajjar/pi-mcp-events/main/assets/demo.png",
  "extensions": [
    "./src/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.2 (README.md). PiG does not review it.

pi-mcp-events

An MCP server sends an event. Your pi session wakes and acts on it.

A pi session wakes when a letagents message arrives as an MCP event

Install

pi install npm:@pratikgajjar/pi-mcp-events

It uses the servers in pi's own mcp.json. No adapter, no fork, no build step.

How it works

An MCP server pushes or polls an event to pi-mcp-events, which wakes the pi session

Subscribe

Ask the agent: "Subscribe to message.received on letagents."

Or list subscriptions for every session in ~/.pi/agent/mcp-events.json:

{ "subscriptions": [{ "server": "letagents", "event": "message.received" }] }

/mcp-events shows the subscriptions and their state.

Good to know

  • Spec: SEP-3415, accepted commit 4165cc2. Push and poll.
  • Safe input: event data reaches the model as untrusted data, never as your instruction.
  • Replay: per-session outboxes keep accepted events until Pi persists them. Crashes may replay duplicates. Delivery is not exactly-once.
  • Bounds: complete payloads arrive in pages. Disk quotas pause intake, never evict pending events. See durability and recovery.
  • Not supported: webhooks (a laptop has no public URL) and OAuth servers.

License

MIT