PluginBench
MCP Server
Maintained
MIT

iMessage History MCP Server

io.github.anipotts/imessage-mcp

Search and read your Apple Messages history from Claude, Cursor, and other MCP clients—read-only, local, no cloud.

What is the iMessage History MCP server?

The iMessage History MCP server lets you search and read your Apple Messages history from any MCP client like Claude, Cursor, or VS Code. It runs locally on your Mac with read-only access to iMessage, SMS, MMS, and RCS conversations, including edits, reactions, replies, and attachments. No accounts, cloud service, or compilation required.

Access your complete Messages history through natural language queries. Search conversations by keywords, read full chat threads with metadata like reactions and read receipts, view photos with location data removed, and analyze communication patterns. Runs entirely on your Mac with no external dependencies or cloud uploads.

How to install iMessage History

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • IMESSAGE_PRIVACY

    Most any caller can see: full (default for stdio), redacted, or aggregate.

  • IMESSAGE_CONTACTS

    live (default) names handles from Contacts; none shows handles only.

  • IMESSAGE_DB

    Path to a copy of chat.db instead of this Mac's Messages database.

  • IMESSAGE_CACHE

    Set to 0 to keep the search index in memory only.

  • IMESSAGE_UPDATE_CHECK

    Set to 0 to turn off the npm version check.

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "imessage-mcp": {
      "command": "node",
      "args": [
        "-y",
        "imessage-mcp"
      ],
      "env": {
        "IMESSAGE_PRIVACY": "<YOUR_IMESSAGE_PRIVACY>",
        "IMESSAGE_CONTACTS": "<YOUR_IMESSAGE_CONTACTS>",
        "IMESSAGE_DB": "<YOUR_IMESSAGE_DB>",
        "IMESSAGE_CACHE": "<YOUR_IMESSAGE_CACHE>",
        "IMESSAGE_UPDATE_CHECK": "<YOUR_IMESSAGE_UPDATE_CHECK>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • search_messages — Search by substring, exact text, token, or phrase in message text, conversation names, or attachment names
  • get_conversation — Read a conversation by chat_id or contact/group name, with edits, reactions, receipts, replies, and attachments
  • list_conversations — Find conversations by contact, service, kind, reply state, or date, with latest message and sorting options
  • get_attachment — Show one attachment: images as JPEG with metadata removed, or text files as text
  • sync_messages — Pull every change since a cursor: new, edited, unsent, and deleted messages, reactions, and receipts
  • analyze_communication — Message counts by hour and weekday, response times, streaks, and conversation initiation patterns
  • resolve_contact — Match a name, phone number, or email to a contact and report ambiguity
  • server_status — Version, update availability, access status, index state, and schema support

Use cases

  • Catch up on text messages and see who is waiting for a reply from you
  • Search your message history to find specific conversations or information by keyword or phrase
  • Analyze your communication patterns: response times, busiest hours, and conversation frequency
  • Review photos and attachments people sent you with location metadata removed
  • Get a weekly recap of your messaging activity and conversation volume

iMessage History MCP server FAQ

What is the iMessage History MCP server?

It's a read-only tool that lets you search and read your Apple Messages history through AI clients like Claude and Cursor. It runs locally on your Mac with no cloud uploads or accounts.

Is it free?

Yes, iMessage History is open-source under the MIT license and free to use.

How do I install it in Cursor or Claude?

For Cursor, use the one-click install button in the README or add the standard config to ~/.cursor/mcp.json. For Claude Desktop, download the .mcpb bundle and double-click it, or install from Settings > Extensions. For other clients, add the standard npx config to your MCP settings file.

Do I need to authenticate or create an account?

No. The server runs entirely locally on your Mac and accesses your Messages database directly. No accounts, cloud service, or authentication required.

What permissions does it need?

The app running the server (Claude, Cursor, VS Code, etc.) needs Full Disk Access in System Settings > Privacy & Security to read your Messages database.

Can it send, edit, or delete messages?

No. The server is read-only and has no tools to send, edit, react to, or mark messages as read. It only retrieves and searches your message history.

README (reference)

Source of truth, from the repository.

<img src="assets/icon.svg" width="72" height="72" alt="">

imessage-mcp

npm MCP Registry CI License: MIT

Search and read your Messages history from Claude, Codex, Cursor, VS Code, and any other MCP client.

Claude Code catching up on a real conversation about a hackathon through imessage-mcp

Read-only. Runs on your Mac. No accounts, no cloud service, nothing to compile.

  • Finds messages by words, exact text, or phrase across iMessage, SMS, MMS, and RCS
  • Reads whole conversations with edits, unsent messages, reactions, replies, and read receipts
  • Shows photos people sent you, with location data removed
  • Keeps up with new messages through a change feed, and answers counts and response-time questions

Install

Requirements: macOS 14 or newer. Node.js 24.16 or newer for npx installs (Claude Desktop brings its own).

Standard config, for any client that reads mcpServers JSON:

{
  "mcpServers": {
    "imessage": {
      "command": "npx",
      "args": ["-y", "imessage-mcp@latest"]
    }
  }
}

Then give the app that runs it Full Disk Access: System Settings > Privacy & Security > Full Disk Access, turn on the app (Claude, your terminal, Cursor, VS Code, ...), then quit it fully and reopen it. Not sure which app? Run npx -y imessage-mcp@latest doctor from that app's terminal and it tells you. Until access is granted, every tool answers with these same steps.

<details> <summary>Amp</summary>
amp mcp add imessage -- npx -y imessage-mcp@latest
</details> <details> <summary>Claude Code</summary>
claude mcp add --scope user imessage -- npx -y imessage-mcp@latest

Or install the plugin: /plugin marketplace add anipotts/imessage-mcp, then /plugin install imessage-mcp@anipotts.

</details> <details> <summary>Claude Desktop</summary>

Download imessage-mcp.mcpb and double-click it, or install iMessage History from Settings > Extensions if it is listed there. To update a bundle you installed yourself, download the newest one and double-click it again.

Then turn on Claude in Full Disk Access and quit and reopen Claude.

</details> <details> <summary>Cline</summary>

Add the standard config to cline_mcp_settings.json (docs).

</details> <details> <summary>Codex</summary>
codex mcp add imessage -- npx -y imessage-mcp@latest

Or in ~/.codex/config.toml:

[mcp_servers.imessage]
command = "npx"
args = ["-y", "imessage-mcp@latest"]
</details> <details> <summary>Copilot CLI</summary>

Run /mcp add, or add the standard config to ~/.copilot/mcp-config.json with "type": "local".

</details> <details> <summary>Cursor</summary>

<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">

Or add the standard config to ~/.cursor/mcp.json.

</details> <details> <summary>Gemini CLI</summary>

Add the standard config to ~/.gemini/settings.json.

</details> <details> <summary>Goose</summary>

Install in Goose

</details> <details> <summary>JetBrains (Junie)</summary>

Add the standard config to .junie/mcp/mcp.json, or type /mcp in Junie CLI.

</details> <details> <summary>Kiro</summary>

Add to Kiro

</details> <details> <summary>opencode</summary>

In ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "imessage": { "type": "local", "command": ["npx", "-y", "imessage-mcp@latest"], "enabled": true }
  }
}
</details> <details> <summary>VS Code</summary>

<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code"> <img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">

code --add-mcp '{"name":"imessage","command":"npx","args":["-y","imessage-mcp@latest"]}'
</details> <details> <summary>Warp, Windsurf, Zed, and others</summary>

Add the standard config in the client's MCP settings. Zed uses context_servers with "source": "custom".

</details>

If a GUI app reports that npx was not found, it cannot see your Node installation: use the full path from which npx as the command.

Use it

Ask in plain words: "catch me up on my texts", "find the message about the dinner reservation", "how fast does Sam usually reply?". Three prompts are also in your client's prompt menu:

promptwhat it does
catch_upWho is waiting on a reply from you, and what they need
draft_replyA reply in your own texting style. You send it; this server cannot.
recapYour week in messages: volume, busiest conversations, anyone still waiting

Clients that attach resources can use imessage://conversations and imessage://conversations/{chat_id}.

Tools

toolwhat it does
search_messagesSearch by substring, exact text, token, or phrase, in message text, conversation names, or attachment names
get_conversationRead a conversation by chat_id or by a contact or group name, with edits, reactions, receipts, replies, and attachments
list_conversationsFind conversations by contact, service, kind, reply state, or date, each with its latest message, newest first or by who you text most
get_attachmentShow one attachment: images as a JPEG with metadata removed, text files as text
sync_messagesPull every change since a cursor: new, edited, unsent, and deleted messages, reactions, and receipts
analyze_communicationMessage counts by hour and weekday, response times, streaks, and who starts conversations
resolve_contactMatch a name, phone number, or email to a contact, and report ambiguity rather than guess
server_statusVersion, update availability, access, index state, and schema support

Every tool is read-only and marked readOnlyHint. Results use plain ids (message_id, chat_id, attachment_id) you can pass between tools.

Configuration

Add options to args, for example ["-y", "imessage-mcp@latest", "--privacy", "redacted"].

optiondescription
--privacy <mode>The most any caller can see. full (default), redacted (names and masked handles, calendar days, no message text or filenames), or aggregate (counts only). A call can ask for a stricter mode, never a looser one. env IMESSAGE_PRIVACY
--contacts <mode>live (default) names handles from your Contacts; none shows handles only. env IMESSAGE_CONTACTS
--database <path>Read a copy of chat.db instead of this Mac's Messages. env IMESSAGE_DB
--transport http --port <n>Serve MCP over HTTP on 127.0.0.1 instead of stdio. Requires IMESSAGE_API_TOKEN or IMESSAGE_API_TOKEN_FILE. IMESSAGE_ALLOWED_HOSTS and IMESSAGE_ALLOWED_ORIGINS take comma-separated lists; both default to localhost.
IMESSAGE_CACHE=0Keep the search index in memory only
IMESSAGE_WARM_SEARCH=0Build the search index on the first search instead of at startup
IMESSAGE_UPDATE_CHECK=0Turn off the version check

Privacy and security

  • Read-only. The server opens the Messages database read-only and has no tool that sends, edits, reacts, or marks anything read.
  • Local. No accounts, telemetry, or analytics. The only network request is an optional version check to the npm registry.
  • Your client sees what you ask for. Results go to the MCP client you use and its model provider, under their policies. --privacy redacted or aggregate limits what leaves the server.
  • Search index. Built on your Mac and cached encrypted in ~/Library/Caches/imessage-mcp, with a key derived from your Messages database, so it opens only for an app that can already read your messages. Deleting it is always safe.
  • Untrusted content. Messages can contain text written to manipulate an AI. The server tells clients to treat all message content as data, never as instructions.

Details: SECURITY.md and PRIVACY.md.

Development

npm ci
npm test      # unit tests on synthetic Messages databases
npm run e2e   # launches the built server over stdio and HTTP
npm run perf  # one-million-message performance gates

Tests use synthetic data only. See CONTRIBUTING.md.

License

MIT

Related MCP servers

Persistent MMORPG where AI agents play alongside humans. 12 tools, 4 resources; free, no pay-to-win.

View repository →

Dead-man switch monitors for cron & AI agents with dependency-cascade alerts. No account needed.

View repository →

Keep AI answers fresh with free source previews, scheduled monitoring, evidence history, and alerts.

Convert a document once, then get back only the passages that answer a question.

5
Python
MIT
View repository →

Local code graph for TypeScript, Python and Swift: who calls this, what breaks if I change it.

4
TypeScript
Apache-2.0
View repository →

Deploy a site to its SFTP/FTP host from a coding agent. Changed files only, undo, live checks.

0
TypeScript
MIT
View repository →