imessage-mcp
imessage-mcp
一个只读的 MCP 服务器,将您的 iMessage 数据暴露给 Claude Code 和 Claude Desktop,并支持自动联系人姓名解析。
设置
1. 安装
cd ~/workspace/imessage-mcp
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e .2. 授予完全磁盘访问权限
该服务器需要读取 ~/Library/Messages/chat.db 和联系人数据库。请为运行该服务器的应用程序授予完全磁盘访问权限:
打开 系统设置 → 隐私与安全性 → 完全磁盘访问权限
对于 Claude Code:添加您的终端应用程序(例如 Terminal, iTerm2, Ghostty)
对于 Claude Desktop:添加 Claude 应用程序
3. 配置 Claude Code
添加到 ~/.claude/settings.json:
{
"mcpServers": {
"imessage": {
"command": "/Users/jaredmoskowitz/workspace/imessage-mcp/.venv/bin/python",
"args": ["-m", "imessage_mcp"]
}
}
}4. 配置 Claude Desktop
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"imessage": {
"command": "/Users/jaredmoskowitz/workspace/imessage-mcp/.venv/bin/python",
"args": ["-m", "imessage_mcp"]
}
}
}Related MCP server: imessage-rich-search
工具
list_chats
列出按最近活动排序的 iMessage 聊天记录。
limit(可选,默认 50):返回的最大聊天数
get_messages
获取特定聊天中的消息。
chat_id(必填):来自list_chats的聊天标识符limit(可选,默认 50):最大消息数since(可选):ISO 日期字符串 — 仅获取此日期之后的消息
search_messages
在所有聊天中搜索包含关键字的消息。
query(必填):搜索文本limit(可选,默认 50):最大结果数
使用示例
"列出我的群聊" "获取我的 Business Ideas 聊天中的最后 20 条消息" "在我的消息中搜索 'startup idea'"
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA local MCP server that enables reading iMessage conversations and sending new messages through Claude Desktop. It provides secure, read-only access to your Mac's iMessage database and AppleScript-based message sending capabilities.6MIT
- AlicenseAqualityCmaintenanceEnables full-text search of macOS iMessages including link preview metadata. Works as an MCP server for Claude Desktop to search your messages locally.1MIT
- AlicenseNot gradedqualityDmaintenanceRead-only MCP server for your iMessage DB. No hosted service.MIT
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for local macOS Messages database, enabling querying of chats, messages, attachments, and metadata.207MIT
Related MCP Connectors
MCP connector for iMessage & Contacts via a local Mac agent + Vercel relay
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaredmoskowitz/imessage-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server