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 (or vohux-dev/sagamail-plugin) using a 0600 per-user bearer token (~/Library/Application Support/SagaMail/mcp-token).
  • Local REST API (127.0.0.1:7890) — Authenticated via constant-time Authorization: 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)

ToolPurpose
search_emailsFull-text FTS5 search across accounts, folders, and labels
read_emailRead full message headers and body by ID
get_threadRead every message in a conversation thread
get_unreadUnread counts per account
list_accountsConfigured accounts and provider metadata
list_labelsFolder and label inventory
get_contactsContact frequency graph and search
get_subscriptionsNewsletter and recurring sender tracker
sagamail_analyticsRead rate, volume, and top senders over lookback window
sagamail_bundle_listSmart triage bundles with counts
list_drafts / read_draftInspect existing drafts before editing or sending
get_today_briefingStructured daily briefing (needsYou, schedule, waiting, fyi)
get_attachment_textLocal text extraction for PDF, DOCX, RTF, and plain-text attachments
list_agent_actionsTamper-evident local audit log of MCP tool invocations
get_contextContext Brain recipient profiles, guardrails, and variables
get_waiting_for_replyNew in v0.3: Unanswered Sent threads + active Watch-for-Reply reminders
extract_receiptsNew in v0.3: Structured vendor, amount, currency, category, and order # extraction (Polar.sh, Stripe, AppSumo, Apple, AWS, etc.)
list_calendar_invitesNew 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 sending
  • move_email, apply_label, sagamail_snooze, sagamail_screener_decide, sagamail_create_rule — Triage and organize mail idempotently
  • update_context — Append open loops or update Context Brain variables
  • save_attachment (New in v0.3) — Save downloaded attachments to validated user roots (~/Downloads, ~/Documents, ~/Desktop, /Volumes) for DigiParser, FinanceFlow, CorpBooks, or Remio

Full + Confirm Send Profile (+3 Tools)

  • send_draft — Requires explicit confirm: true, enforces daily MCP send caps and PHIPA preflight checks, and queues into Outbox with an undo window
  • cancel_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 both sagamail://message/<id> and standard RFC 2392 message://%3CMessage-ID%3E URLs, plus GET /api/selected-message so 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 .popclipext actions ship in the repository's integrations/ directory.