Mail

io.github.honeycrisp-suite由 GitHub 帳號 honeycrisp-suite 發布v0.1.2更新於 Oct 24, 2026

Apple Mail over MCP: fenced reads, draft-only writing, human-gated actions, audited with undo.

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

讓助理在 Mac 上讀取、搜尋、起草和傳送 Apple Mail,寫入操作需人工核准並留下稽核記錄。

可以做什麼
Cortland 的 Mail 套件為助理提供受控管的 Apple Mail 存取:搜尋、閱讀、追蹤郵件串、起草、傳送、加旗標和歸檔。讀取操作可直接進行,而傳送、刪除等有後果的操作會先預覽,透過模型無法觸及的管道等待核准,寫入本機 SQLite 稽核記錄,並在有復原方案時可撤銷。從郵件讀取的內容會放在帶隨機定界符的圍欄中回傳,被視為資料而非指令。
適用情境
當你希望 Claude Code、Cursor、Codex 或本機模型等 AI 用戶端在 Mac 上處理真實的 Apple Mail,並且希望每次傳送或刪除都停下來等待你明確核准而不是立即執行時,適合使用。它不適用於 Windows 或 Linux,也不存取網頁。
執行需求
macOS 13 Ventura 或更新版本、Node.js 20 LTS 或更新版本、Xcode Command Line Tools(better-sqlite3 需要編譯原生程式碼),以及一個 MCP 用戶端。Mail 應用程式需以你的身分登入,並需授予用戶端控制 Mail 的 macOS 自動化權限。不需要開發者帳號、iCloud 或 API 金鑰;選用的 iMessage 橋接還需要完全磁碟存取權限、對 Messages 的自動化權限,以及在 Messages.app 中登入的第二個 Apple ID。
安裝前請注意
寫入操作預設為試執行狀態,只有在本機設定中設定 "live": true 後才會執行,即便如此傳送和刪除仍會逐次詢問。核准透過帶外管道送達,因此被竊的權杖只能提出請求而無法執行操作。稽核記錄以長度和雜湊儲存郵件本文,而非明文。選用的 iMessage 橋接使用第二個 Apple ID 作為傳聲筒,收件人在本機設定中固定。預設不會向雲端服務傳送任何內容。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mail,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Cortland 🍎

Your agent brings the brain. Cortland brings the hands — and the human gate.

Give an AI real access to your Mac — Mail, Calendar, Reminders, Notes, files — without giving it the keys. Every consequential action previews first, waits for your approval through a channel the model can't touch, gets logged, and can be undone.

Cortland has no model of its own, no cloud, and no web access. That is the point. Whatever agent you already use — Claude, Codex, Cursor, or a local Gemma that never leaves the machine — gets a governed way to touch your real data and to reach you.


A worked example

An agent watched a handful of retailer pages for days, waiting for a limited-run controller to come back in stock. When it finally did — unattended, at an hour I was nowhere near my desk — my phone buzzed with an iMessage. I bought one.

Cortland never touched a website. It has no web-fetch tool and never has. The watching was done by a coding agent with internet access. Cortland was the part that reached me: on my own Mac, through Messages, with the recipient fixed in local config so nothing the agent generated could point that message at anyone else.

That division is the pitch in one story. Your agent has the reasoning and the internet. Cortland has your Mac, your Apple apps, and your attention — and every outward action still stops to ask.

The part worth telling

The first version cheated, and I only found out by reading my own audit log.

No governed "tell the human" tool existed. The iMessage bridge could answer me, but nothing could start a conversation — so the monitor imported Cortland's send module directly and called it. It worked, and it was genuinely Cortland doing the sending: same owner handle from config, same AppleScript escaping, same hourly rate cap. But it went around the framework instead of through it, so days of running left zero audit rows.

That is this project failing its own test. A guarantee with no legitimate path through it is a guarantee people route around — and the person who routed around it was the one who wrote the guarantee.

The fix is notify_owner: write-safe, because a message to you is not an outward action, it is the review loop. It has no recipient argument at all — the handle comes from local config, so no model output and no injected content can redirect it. Its hourly cap is counted from the audit log rather than from memory, so a cron job that starts fresh every run still can't exceed it. A notification now leaves a row behind. This one is real, copied out of the audit DB after sending a test message to my own phone:

notify_owner | Messages | write-safe | undo=none | dry_run=0 | okprincipal: cli:notify   tool_version: 0.2.0args: {"text":{"redacted":true,"length":84,"sha256":"3e389e33…"},       "source":"cortland-test"}

The body is stored as a length and a hash — the row proves a message was sent without keeping what it said. source stays readable because it is a label, constrained to a slug, and not content anyone can compose.


What it looks like in use

Text it like a contact — the bridge, answered by a 4 GB model on an 8 GB MacBook Air. Nothing left the Mac:

You:       Add a reminder to call the vet tomorrow at 2pmCortland: Received — working on it…Cortland: Added "Call vet" for tomorrow, Aug 3 at 2:00 PM.

The texting interface needs a second Apple ID, signed into Messages on the Mac only — a mouthpiece, not a worker. It owns no mail, no calendar, no data. You text it from your phone like any contact; the Mac still does the work as you. Your system iCloud stays yours. Claude Code, Cursor, Codex, and other MCP clients skip this step: they talk to the same tools over stdio.

Ask about your week — reads are free, no approval needed:

You:       Anything from the school this week?Cortland: Three emails from Lincoln Elementary. Two are the weekly            newsletter; one from Ms. Alvarez on Tuesday asks for a            permission slip by Friday.

Ask it to change something — writes stop and ask, every time:

[An iMessage thread: the user asks to delete a reminder; Cortland acknowledges, then replies with an approval request naming the reminder, its list, and its due date, asking the user to reply "yes a3f9c1"; the user replies with the code; Cortland confirms the deletion with the same details.]

The code in that prompt is generated by the framework and never enters the model's context — so even a fully prompt-injected model can't forge your approval. Ignore the message and the action expires, refused.

Ask what it can do — answered from the tools actually installed, so it can't overclaim:

You:       what can you do?Cortland: Here's what I can do with your Mac:            • Calendar: list, look up, create, delete            • Mail: search, read, follow threads, draft, send (asks first), flag, file            • Notes: search, read, create, add to            • Reminders: list, search, create, tick off, delete
            Anything that deletes or changes things asks you first — I text            you a code and wait for "yes <code>". Reads just happen.

In Claude Code or Claude Desktop, the same tools are just there:

You: send a reply to Ms. Alvarez saying the slip is coming Thursday Claude: [searches mail, reads the thread] I can send this from your Personal account to [email protected]. Approve in the usual channel.

mail_send is write-gated. Live mode plus per-action human approval. A stolen token can only ask.


Requirements

macOS only. Nothing here runs on Windows or Linux — the tools talk to Apple apps via Automation.

MinimumComfortable
OSmacOS 13 VenturamacOS 15+
MacAny Mac that runs Ventura (Intel can drive Cursor/Claude)Apple Silicon (M1 or newer)
Node20 LTS (node -v)22
ToolchainXcode Command Line Tools (xcode-select -p)same — better-sqlite3 compiles native code
ClientOne MCP app: Cursor, Claude Code, Claude Desktop, Codex, or LM Studioplus Ollama if you want to text it
RAM8 GB (cloud/Cursor model, or Gemma 4 E2B)16 GB+ for larger local models
Disk~500 MB for this repo’s build+6 GB if you pull gemma4:e2b-it-qat
Apple appsThe apps you want touched, signed in as youMail + Reminders is the usual first pair

iMessage bridge only: macOS 13+ (modern chat.db), Full Disk Access for the process that runs Node, Automation → Messages, and a second Apple ID signed into Messages.app — not into System Settings. See SETUP.md §5.1.

Osaurus as a client: Apple Silicon, macOS 15.5+.

Not required: a developer account, iCloud for Path A, or any API key.


Quick start

Fastest path to “it searched my mail” — Cursor (or Claude Code) as the brain, no second Apple ID, no Ollama:

bash
xcode-select --install          # if `xcode-select -p` failsgit clone https://github.com/cortland-suite/cortland.gitcd cortlandnpm install && npm run build    # first install compiles sqlite — a minute

Then Cursor Settings → MCP, add servers pointing node at packages/mail/dist/server.js (and reminders/notes/calendar if you want them). Absolute paths. JSON is in docs/08_local_models.md.

Ask: search my mail for anything from school this week. macOS will prompt Automation (Cursor → Mail). Allow it.

Writes stay previews until you set "live": true in ~/Library/Application Support/cortland/config.json. Even then, send/delete asks you per action.

Texting it from your phone is a longer path (second Apple ID + Ollama). SETUP.md is the ordered list; docs/08 is the illustrated one.


Why it exists

Most MCP servers for personal data are thin wrappers around AppleScript: delete_email, send_message, executed the instant a model calls them. That's a hard thing to trust with an inbox, and the alternatives don't help — cloud assistants (Poke, Arlo, Lindy) can't touch Apple-native data at all, because Apple gives them no API, and self-hosted agents like OpenClaw run ungoverned (a CVSS 8.8 in January 2026, with permission gates still on the roadmap).

Cortland inverts the default. A tool call previews what it would do unless you've opted into live mode, and even then every consequential action waits for you. The framework enforcing that is a small library with a test suite proving each guarantee can't be bypassed — and every tool in the suite is built on it.


The guarantees

Dry-run by defaultGated tools preview instead of executing. Every config error resolves toward dry-run.
The human gate is out-of-bandApproval arrives via a native dialog, a file you move, your client's own UI, or a text you reply to — never through model text.
Everything is auditedSuccess, failure, dry-run, denial, refusal: one local SQLite row each. "What did my tools actually do?" always has an answer.
Undo is enforced at registrationA tool claiming native undo must produce a recipe before the write, or the framework refuses it.
Content is data, not instructionsEverything read from mail, notes, or messages returns inside a nonce-delimited fence.
Safety by absenceNo ungated send. No attendee invitations. No reading conversations other than your own.
Local-firstNo accounts, no credentials, no cloud. Your model, your machine, your disk.

Install

From the repo:

bash
git clone https://github.com/cortland-suite/cortland.gitcd cortlandnpm installnpm run buildnpx cortland setup

The wizard asks before every step and records what it did. Full walkthrough — including the iMessage bridge, permissions, and model choice — in SETUP.md. Connecting Cursor, Codex, LM Studio, Osaurus, or Ollama: docs/08_local_models.md.


Packages

PackageWhat it does
@cortland/governedThe framework: dry-run defaults, approval gates, audit, provenance, undo, injection fencing. Build your own governed tools on it.
@cortland/mailApple Mail: read, search (two tiers), threads, drafts, send (write-gated).
@cortland/remindersReminders: lists, search, create, complete, delete — with native undo.
@cortland/notesNotes: folders, search, read, create, append.
@cortland/calendarCalendar: window queries, create, delete. Cannot send invitations, by design.
@cortland/contextLocal context layer: mail/calendar metadata (pointers, never bodies), briefings, person lookups, a corrections flywheel.
@cortland/imessageText your own AI. Second Apple ID in Messages (mouthpiece only); owner-only by construction, approvals by reply, plus notify_owner so an unattended agent can reach you first.
@cortland/foldersFolder-as-API: drop a file in iCloud from any device, a declared local pipeline runs.
@cortland/remoteReach the suite from your other devices over your own private network.
@cortland/setupThe onboarding wizard.

Bring your own model

Cortland is the tools. You pick the brain.

[Path A: an MCP client hosts the model and Cortland is a plugin. Path B: you text an iMessage bridge; Ollama is the brain; the Mac still acts as you.]

Path A. Cursor, Claude Code, Claude Desktop, Codex, LM Studio, or Osaurus hosts the model. Cortland is an MCP plugin. No second Apple ID.

Path B. You text it. A second Apple ID signs into Messages on the Mac (mouthpiece only). Ollama runs Gemma 4 on disk. Approvals are yes <code> in the same thread.

Field-tested on an 8 GB M2: gemma4:e2b-it-qat (4.3 GB) makes clean tool calls and refuses honestly. The governed contract matters more with a small model, not less.

Walkthroughs, including LM Studio and Osaurus from a clean install: docs/08_local_models.md. Clean-Mac order, permissions, and the iMessage second-ID steps: SETUP.md.


Privacy model

  • Pointers, not copies. The context layer stores metadata referencing messages by ID; bodies are never stored. Delete a message in Mail and the pointer dangles and gets pruned.
  • Model use is opt-in and declared. Works fully deterministically with no model. Configure one and its network egress is declared in config and recorded in the audit log on every run.
  • Nothing phones home. The only optional outbound call is a push ping you configure yourself, and its body is a fixed string carrying no information.

Docs

  • SETUP.md — clean Mac to working assistant, with the gotchas.
  • docs/08_local_models.md — connect Cursor, Codex, LM Studio, Osaurus, or Ollama; illustrated, from zero.
  • SECURITY.md — reporting, and what's in scope.
  • docs/ — one design doc per component: the framework contract (01), Mail (02), folder-as-API (03), the context layer (04), remote access (05), the iMessage bridge (06), the threat model / review guide (07), and local models (08).
  • NOTES.md — the engineering log: decisions with dates, open questions, and every field finding, including the ones that were embarrassing.

License

MIT. See LICENSE.

來源:README.md,提交 c4bf1bb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分