Skip to main content
Glama
jaredmoskowitz

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 和联系人数据库。请为运行该服务器的应用程序授予完全磁盘访问权限

  1. 打开 系统设置 → 隐私与安全性 → 完全磁盘访问权限

  2. 对于 Claude Code:添加您的终端应用程序(例如 Terminal, iTerm2, Ghostty)

  3. 对于 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'"

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    D
    maintenance
    A 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.
    6
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables full-text search of macOS iMessages including link preview metadata. Works as an MCP server for Claude Desktop to search your messages locally.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for local macOS Messages database, enabling querying of chats, messages, attachments, and metadata.
    207
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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