31-Tool Local MCP Server & macOS Ecosystems
Connect Claude Code, Cursor, Codex, Antigravity, Raycast, Hookmark, PopClip, KastDrive, and Cal.com/TidyCal to SagaMail over 127.0.0.1.
Architecture & Security Model
SagaMail embeds two strictly local loopback interfaces managed by SagaMailAgent:
- MCP Socket Server (
127.0.0.1:7892) — Relayed over stdio via/Applications/SagaMail.app/Contents/Resources/sagamail-mcp-bridge(orvohux-dev/sagamail-plugin) using a0600per-user bearer token (~/Library/Application Support/SagaMail/mcp-token). - Local REST API (
127.0.0.1:7890) — Authenticated via constant-timeAuthorization: Bearer <token>(~/Library/Application Support/SagaMail/.rest-token).
Draft-First & Prompt-Injection Hardened: By default, SagaMail starts in the Read-Only permission profile (19 read-only tools). Untrusted inbound email bodies, attachment text, receipts, and calendar invites are wrapped in content fences so AI agents never mistake inbound email prose for system instructions.
One-Click Agent Setup
Open SagaMail → Settings (Cmd+,) → Integrations → Agent Plugins and click Install next to Claude Code, OpenAI Codex, Antigravity, Cursor, or Claude Desktop — or install from the CLI:
# Claude Code
/plugin install sagamail --marketplace vohux-dev/sagamail-plugin
# OpenAI Codex CLI
codex plugin marketplace add vohux-dev/sagamail-plugin && codex plugin add sagamail
# Google Gemini CLI
gemini extensions install https://github.com/vohux-dev/sagamail-plugin
Complete 31-Tool MCP Catalog (v0.3)
Read-Only Profile (19 Default Tools)
| Tool | Purpose |
|---|---|
search_emails | Full-text FTS5 search across accounts, folders, and labels |
read_email | Read full message headers and body by ID |
get_thread | Read every message in a conversation thread |
get_unread | Unread counts per account |
list_accounts | Configured accounts and provider metadata |
list_labels | Folder and label inventory |
get_contacts | Contact frequency graph and search |
get_subscriptions | Newsletter and recurring sender tracker |
sagamail_analytics | Read rate, volume, and top senders over lookback window |
sagamail_bundle_list | Smart triage bundles with counts |
list_drafts / read_draft | Inspect existing drafts before editing or sending |
get_today_briefing | Structured daily briefing (needsYou, schedule, waiting, fyi) |
get_attachment_text | Local text extraction for PDF, DOCX, RTF, and plain-text attachments |
list_agent_actions | Tamper-evident local audit log of MCP tool invocations |
get_context | Context Brain recipient profiles, guardrails, and variables |
get_waiting_for_reply | New in v0.3: Unanswered Sent threads + active Watch-for-Reply reminders |
extract_receipts | New in v0.3: Structured vendor, amount, currency, category, and order # extraction (Polar.sh, Stripe, AppSumo, Apple, AWS, etc.) |
list_calendar_invites | New in v0.3: Upcoming calendar invites and .ics meeting extraction |
Draft & Organize Profile (+9 Tools)
Unlock in Settings → Integrations → Permission Profile → Draft & Organize:
create_draft,update_draft— Prepare or refine drafts safely without sendingmove_email,apply_label,sagamail_snooze,sagamail_screener_decide,sagamail_create_rule— Triage and organize mail idempotentlyupdate_context— Append open loops or update Context Brain variablessave_attachment(New in v0.3) — Save downloaded attachments to validated user roots (~/Downloads,~/Documents,~/Desktop,/Volumes) forDigiParser,FinanceFlow,CorpBooks, orRemio
Full + Confirm Send Profile (+3 Tools)
send_draft— Requires explicitconfirm: true, enforces daily MCP send caps and PHIPA preflight checks, and queues into Outbox with an undo windowcancel_send— Abort a queued send inside its undo window (sendID)send_email— Legacy 1-step send (disabled by default even in Full mode unless explicitly opted in)
macOS Productivity & Vohux Ecosystem Bridges
- Hookmark & Deep Links (
message://+sagamail://): SagaMail registers bothsagamail://message/<id>and standard RFC 2392message://%3CMessage-ID%3EURLs, plusGET /api/selected-messageso Hookmark, OmniFocus, Things, and Obsidian link bi-directionally to exact emails. - KastDrive & Proton Drive Large Attachments: Attach links or mounted cloud files from iCloud Drive, KastDrive (
com.vohux.kastdrive), Proton Drive, Google Drive, Dropbox, and OneDrive. - 1-Click Cal.com & TidyCal Booking Links: Configure your Cal.com, TidyCal, or custom booking link once in the Compose toolbar calendar menu and insert formatted availability links in one click.
- Raycast & PopClip Companion Pack: Ready-to-install Raycast Script Commands, Hookmark AppleScripts, and PopClip
.popclipextactions ship in the repository'sintegrations/directory.