Skip to Content
Bryfo Docsv0.2.1

Real-Time SSE & Streamable HTTP MCP

Event payloads on /api/v1/events and the 12 tools exposed by the built-in bryfo-mail MCP server.

Real-Time Events (GET /api/v1/events)

Authenticated browsers connect to /api/v1/events (text/event-stream) with a 25-second heartbeat and 50-event per-user ring-buffer replay (Last-Event-ID):

Event NamePayload HighlightsDescription
thread.updatedthread_ids, actionNew mail ingested, draft sent, archived, snoozed, or follow-up triggered
account.sync_statusaccount_id, sync_status, last_errorLive IMAP IDLE / incremental sync transition
ai.classify_progressprocessed, totalBackground inbox categorization progress
ai.digest_readydigest_id, periodMorning, evening, or manual AI Brief completed
mcp.approval_requestedaction_id, tool, summaryconfirm_write MCP tool awaiting human approval
session.revokedreasonImmediate live disconnect upon logout or admin containment

Streamable HTTP MCP (/mcp, bryfo-mail v0.2.0)

Authenticate with Authorization: Bearer <token> minted at POST /api/v1/mcp/tokens. Every email subject, sender name, and body is wrapped inside `<untrusted_email_content>` tags, and outbound PII redaction runs whenever apply_privacy_filter = true.

Tool NameMinimum ScopePurpose
list_accountsread_onlyList connected mailboxes permitted for this token
list_threadsread_onlyPaginate threads by folder, account, label, or unread state
search_emailsread_onlyRun hybrid lexical + vector RRF (k=60) search with operators
get_threadread_onlyRead full messages and attachment metadata in a thread
create_draftdraft_onlyCreate an unsent draft message
apply_labelconfirm_write / fullAttach or remove thread labels
mark_readconfirm_write / fullMark threads read or unread
archive_threadconfirm_write / fullArchive threads and propagate MOVE to IMAP
snooze_threadconfirm_write / fullSnooze threads until an ISO-8601 timestamp
trash_threadconfirm_write / fullMove threads to Trash
send_emailconfirm_write / fullTransmit outbound email over SMTP
delete_threadconfirm_write / fullPermanently expunge threads

On this page