multimodal-imessage-mcp
Allows reading, searching, and sending iMessages, viewing attachments (including HEIC to JPEG conversion), managing contacts, and reacting to messages on macOS.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@multimodal-imessage-mcpShow me my latest messages"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Multimodal iMessage MCP
The most complete iMessage MCP server for Claude. Read full conversations, search messages, view image attachments, send messages, look up contacts, and react to messages -- all from Claude Desktop or Claude Code.
Why This Exists
Every other iMessage MCP tool queries the text column in Apple's chat.db. The problem? On modern macOS (14+), 93% of messages are stored in attributedBody instead of text. Those tools silently return empty or incomplete conversations.
This server reverse-engineers Apple's NSAttributedString binary format to extract the actual message content, giving you access to your complete message history.
Related MCP server: jons-mcp-imessage
Features
Tool | Description |
| Read your latest messages across all conversations |
| Full-text search across all messages, contacts, and group names |
| Get a complete conversation thread with any contact (by name or number) |
| Get chat IDs, handles, last sender, previews, and group status as JSON |
| Get a reliable structured thread by chat ID |
| Adds best-effort read receipt metadata for outgoing 1:1 iMessage/RCS messages |
| Find SMS outreach threads that need follow-up review |
| View images and files from messages -- Claude can see and analyze photos |
| Send iMessages or SMS/RCS with confirmation safety and optional verified fallback |
| Inspect a thread and recommend iMessage, SMS/RCS, or auto before sending |
| Preview and send reviewed batches with an approval token |
| List red-bubble send failures, pending sends, and SMS/RCS recoveries |
| Delete exact local message rows with backup-first DB cleanup |
| Preview and delete full local threads with one exact-batch approval token |
| Experimentally edit a recent outgoing iMessage through Messages UI automation |
| Experimentally undo send for a recent outgoing iMessage through Messages UI automation |
| See your most active conversations |
| Find phone numbers and emails from your Contacts |
| Add tapback reactions to messages |
Multimodal: Claude Can See Your Photos
When you use get_attachment, images are returned as base64 content blocks that Claude can actually look at. HEIC photos (iPhone default) are automatically converted to JPEG. This means Claude can:
Describe what's in a photo someone sent you
Read text/screenshots from images
Analyze visual content in your conversations
Requirements
macOS (this reads the local iMessage database)
Node.js >= 18
Full Disk Access granted to your terminal app (System Settings > Privacy & Security > Full Disk Access). This covers both the iMessage database and the AddressBook database used for contact name resolution — no need to have the Contacts app running.
Installation
git clone https://github.com/tszaks/imessage-mcp.git
cd imessage-mcp
npm installConfiguration
Claude Desktop
Add to your ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"imessage": {
"command": "/opt/homebrew/bin/node",
"args": ["/path/to/imessage-mcp/index.js"]
}
}
}Important: Use the full path to your Node.js binary (e.g.,
/opt/homebrew/bin/node), not justnode. macOS desktop apps don't inherit your shell's PATH, and using a barenodecommand often resolves to an older system Node that causes native module crashes.
Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"imessage": {
"command": "node",
"args": ["/path/to/imessage-mcp/index.js"]
}
}
}In Claude Code,
nodetypically resolves correctly since it inherits your shell environment.
Usage Examples
"Show me my recent messages" -- reads your latest conversations
"What did Mom text me today?" -- resolves "Mom" to a phone number via your AddressBook, pulls the conversation
"Search my messages for 'flight confirmation'" -- full-text search across all messages
"Find outreach prospects from the last 7 days who replied and need follow-up" -- returns structured outreach candidates with risk labels
"Preview this batch of 10 follow-up texts" -- returns exact recipients, messages, warnings, and an approval token before anything sends
"Show recent delivery failures" -- reports outgoing messages that Messages marked failed or pending, including whether a later SMS/RCS send recovered the thread
"Show me the photo from message 538516" -- returns the actual image for Claude to view and describe
"Send 'Running 10 min late' to +1234567890" -- sends an iMessage (requires confirmation)
Release Flags
Release flags are opt-in through the MCP server environment:
{
"mcpServers": {
"imessage": {
"command": "node",
"args": ["/path/to/imessage-mcp/index.js"],
"env": {
"IMESSAGE_MCP_RELEASES": "auto_sms_fallback,cleanup_failed_imessage_after_sms_fallback,message_mutation_tools,experimental_message_ui_actions,read_receipts"
}
}
}
}Flag | Behavior |
|
|
| After |
| Exposes |
| Exposes |
| Adds read receipt fields to structured conversation results and read status hints to |
Mutation Tools
delete_messages accepts exact message ROWIDs:
{ "message_ids": ["538516", "538517"] }It does not require confirmation. It reports deleted IDs, missing IDs, backup location, and any remaining rows found during verification.
delete_threads is a two-step exact-batch flow:
{ "chat_ids": [101, 102] }The preview returns one approval_token for that ordered list and the thread metadata shown in the preview. To delete, send the same ordered chat_ids, confirm: true, and that token:
{ "chat_ids": [101, 102], "confirm": true, "approval_token": "..." }Changing the order, list, or token fails the request.
edit_message and undo_send_message are experimental because Messages does not expose first-class AppleScript commands for those actions. They open the conversation, find the visible outgoing bubble by text snippet, use the contextual menu, then verify the result. They are intended to affect actual Messages behavior, not fake local-only DB edits.
Optional tuning:
IMESSAGE_MCP_SEND_VERIFY_DELAY_MS=2500This controls how long the MCP waits before checking the local Messages database for the new outgoing row.
How It Works
The attributedBody Fix
Apple's iMessage database (~/Library/Messages/chat.db) has two columns for message content:
text-- the legacy plain text column (used by older macOS versions)attributedBody-- a serializedNSAttributedStringblob (used by macOS 14+)
On modern macOS, Apple gradually migrated message storage to attributedBody to support rich text, mentions, and formatting. The text column is increasingly just a legacy fallback that's often NULL.
This server detects messages with NULL text and extracts the content from attributedBody by parsing the binary NSTypedStream format:
Finds the
NSStringmarker in the binary blobReads past the type header bytes (
01 94 84 01 2b)Decodes the length prefix (single-byte for short messages, multi-byte for longer ones)
Extracts the UTF-8 text payload
Attachment Handling
iMessage attachments are stored in ~/Library/Messages/Attachments/ with paths tracked in the attachment table. The get_attachment tool:
Queries the attachment metadata for a given message ID
Resolves the
~/Library/Messages/...path to an absolute pathFor JPEG/PNG/GIF/WebP: reads the file and returns base64 image content
For HEIC (iPhone default): converts to JPEG using macOS
sipsbefore returningFor other files: returns metadata and the file path
Troubleshooting
"Failed to open iMessage database" Grant Full Disk Access to your terminal app: System Settings > Privacy & Security > Full Disk Access.
Contact lookup returns no results Contact resolution reads the macOS AddressBook SQLite databases directly (no Contacts app needed). Make sure Full Disk Access is granted. If a contact was just added, restart the MCP server to refresh the cache.
Native module crash / "NODE_MODULE_VERSION mismatch"
Rebuild native dependencies: npm rebuild. This happens when your Node.js version changes. Also make sure your Claude Desktop config uses the full path to node (see Configuration above).
Missing messages from a conversation
This is exactly the bug this server fixes. Make sure you're running the latest version which includes the attributedBody extraction.
License
MIT
Quickstart TL;DR
npm install
node index.jsThen add the server to your MCP client config and grant Full Disk Access to your terminal app.
How It Works (TL;DR)
Reads macOS iMessage SQLite database
Decodes modern
attributedBodypayloads for complete message textExposes conversation/search/attachment tools via MCP
Uses AppleScript for message send/reaction actions with explicit confirmations
LLM Quick Copy
Use the copy button on this code block in GitHub.
Repo: imessage-mcp
Goal: Full iMessage MCP including attachments and send/reaction actions.
Setup:
1) npm install
2) Grant Full Disk Access to terminal app
3) Add MCP config entry for index.js
Use:
- read_recent_messages, search_messages, get_conversation
- list_chats_structured, get_conversation_by_chat_id, find_outreach_followups
- get_attachment for image/file analysis
- send_message/send_message_batch/react_to_message with explicit confirm flag
How it works:
- SQLite + attributedBody decoding + AppleScript actions wrapped as MCP toolsThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/tszaks/imessage-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server