
Messages
io.github.cardmagic由 GitHub 帳號 cardmagic 發布v1.2.0更新於 Oct 24, 2026
Fuzzy search and browse Apple Messages/iMessage from CLI or MCP server
概覽
一個本機 MCP 伺服器,讓助手在 Mac 上以模糊搜尋瀏覽 Apple 訊息/iMessage 的歷史紀錄、聯絡人與對話。
- 可以做什麼
- 以模糊、容錯方式搜尋訊息,可依寄件者或日期範圍篩選,並顯示前後文。瀏覽最近訊息、依活躍度排序的聯絡人,以及附訊息數量的對話。開啟與某位聯絡人的完整對話串。查看搜尋索引統計。
- 適用情境
- 適合讓助手回答關於你自己簡訊的問題,例如某人對某個計畫說了什麼、最近誰傳訊息來、某個對話串裡聊了什麼,而不必手動複製訊息。
- 執行需求
- 僅限 macOS,因為它會讀取 Apple 訊息資料庫。需要 Node.js 22+ 與該 npm 套件,透過 stdio 在本機執行。必須為終端機應用程式授予完整磁碟存取權限,才能讀取訊息資料庫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Messages,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
messages
Fuzzy search and browse Apple Messages (iMessage/SMS) from the command line, as a Claude Code plugin, or as an MCP server.
Features
- Fuzzy search with typo tolerance across all your messages
- Browse recent messages, contacts, and conversations
- Contact resolution - shows names instead of phone numbers
- Context display - see messages before/after each match
- Filter by sender or date range
- Auto-indexing - index automatically rebuilds when new messages are detected
- Multiple interfaces - CLI, MCP server, or Claude Code plugin
Requirements
- macOS (reads from Apple Messages database)
- Node.js 22+
- Full Disk Access permission for your terminal (to read
~/Library/Messages/chat.db)
Installation
Homebrew
npm
Claude Code Plugin (recommended)
Install as a plugin to get skills (auto-invoked) and slash commands:
This gives you:
- Skill: Claude automatically searches messages when you ask about texts/iMessages
- Slash commands:
/messages:search,/messages:recent,/messages:from, and more
MCP Server
For direct MCP tool access without the plugin:
Or install globally first:
From source
Granting Full Disk Access
The tool needs to read your Messages database at ~/Library/Messages/chat.db:
- Open System Settings > Privacy & Security > Full Disk Access
- Click + and add your terminal app (Terminal.app, iTerm, Warp, etc.)
- Restart your terminal
Usage
CLI
Browse Commands
Search Commands
Search Options
Claude Code Plugin
When installed as a plugin, you get:
Skill (auto-invoked): Claude automatically searches messages when you ask things like:
- "What did Mom say about dinner?"
- "Who texted me recently?"
- "Find messages about the trip"
Slash Commands:
MCP Server
When installed as an MCP server, Claude Code can use these tools:
Manual MCP Configuration
For Claude Desktop or VS Code, add to your MCP configuration:
How It Works
-
Auto-Indexing: On first search (or when new messages are detected), the tool automatically:
- Reads your Apple Messages SQLite database
- Builds a SQLite FTS5 full-text search index
- Creates a MiniSearch fuzzy search index
- Resolves contact names from your Address Book
-
Searching: Queries both indexes for best results with typo tolerance
-
Storage: Index files are stored in
~/.messages/:index.db- SQLite FTS5 databasefuzzy.json- MiniSearch indexstats.json- Index statistics
License
MIT
來源:README.md,提交 e3fa952
工具
0版本歷史
1- v1.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分