# 用 Claude 搜尋你的訊息

問 Claude 當時說了什麼、談定了什麼，內容由你自己的 Mac 提供。

## 步驟

1. 將訊息匯出到與其他匯出資料夾並排的資料夾，例如與 `~/Documents/notes` 並排的 `~/Documents/messages`，並在首次讀取完成後按「立即同步」。
2. 在「MCP 伺服器」卡片上按「啟動」。
3. 連接 Claude Code：

```sh
claude mcp add --transport http exporter http://localhost:8744/mcp
```

4. 提問：「關於這趟旅行，我和 Anna 談定了什麼？」搜尋某人的名字就能找到你和對方的對話。

## 你會得到什麼

- `search` 會透過 App 的索引為訊息、Apple 備忘錄和聯絡人排序，所以一個問題就能同時找到對話和備忘錄
- `read` 會以 Markdown 傳回整個對話，每天一個標題
- 如果也匯出了聯絡人，Claude 就能根據卡片和它連結的對話，回答「Anna 的生日是哪天？我們上次聊天是什麼時候？」

## 注意事項

- 伺服器提供與 Apple 備忘錄匯出資料夾位於同一個上層資料夾中的匯出資料夾（沒有 Apple 備忘錄匯出資料夾時，則以它找到的第一個匯出資料夾為準）。請把它們並排放置，並在任何變更之後按卡片上的「停止」再按「啟動」。
- 在免費額度下，Claude 看到的是你最近的 10 個對話。解鎖後，下一次同步會寫出每個對話。
- 工具傳回的內容會成為你和 Claude 對話的一部分，並傳送到它的模型，就像你貼上的任何內容一樣。

連接其他用戶端的方式，以及六個工具，都在 [MCP 伺服器說明文件](https://exporter.dev/docs/mcp)中。

## Related

- [MCP server](https://exporter.dev/docs/mcp): Connect Claude and other agents
- [Messages](https://exporter.dev/docs/messages): Conversations, media, fields and fixes
- [Apple Notes in Claude](https://exporter.dev/guides/notes/apple-notes-in-claude): Claude searches your notes, on your Mac

---

human version: https://exporter.dev/zh-hant/guides/messages/messages-in-claude
every page: https://exporter.dev/llms.txt
