carterlasalle/mac_messages_mcp
An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages.
What it solves
Mac Messages MCP allows AI agents (via the Model Context Protocol) to interact with the macOS Messages app. It enables LLMs to read, search, and send iMessages, SMS, and RCS messages, as well as manage contacts, all while running locally on the user's Mac.
How it works
The server connects to the local macOS chat.db and AddressBook databases in read-only mode to retrieve message history and contact details. To send messages, it uses AppleScript to automate the Messages.app. It implements a structural boundary that labels message-derived text as "untrusted" to prevent the AI model from misinterpreting external message content as system instructions.
Who it’s for
Users of MCP-compatible clients (such as Claude Desktop, Cursor, VS Code, or Codex) who want their AI assistants to have the ability to manage their macOS communications.
Highlights
- Comprehensive Messaging: Supports reading recent messages, fuzzy searching message bodies, and listing conversations across 1:1 and group chats.
- Attachment Handling: Can search attachment metadata and contents (text/PDF) and return images (converting HEIC to PNG) or local paths for larger files.
- Send Capabilities: Sends messages with SMS/RCS fallback and supports scheduling messages for later delivery (while the server process remains active).
- Contact Management: Includes fuzzy contact lookup and the ability to create new contact entries.
- Security-First Design: Uses read-only database access and structural neutralization of output to mitigate prompt injection risks from external messages.
Related
- Project
- Project
- Project
- Project
- Project