messages-mcp
Allows reading and responding to Apple Messages (iMessage) on macOS, including listing chats, retrieving conversation context, fetching unread messages, sending messages, and marking chats as read.
Provides tools for interacting with local macOS Messages, enabling AI agents to manage chats and messages on the user's Mac through the Messages app.
Click on "Deploy 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., "@messages-mcp show my recent 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.
messages-mcp
MCP server for reading and responding to local macOS Messages from clients like Claude Desktop and Codex.
The server reads ~/Library/Messages/chat.db, resolves names through local Contacts/AddressBook source databases, and sends through the macOS Messages app using AppleScript.
Requirements
macOS with Messages configured
Python 3.10+
Full Disk Access for the app running the MCP server
Automation permission for controlling Messages when sending
Related MCP server: imessage-mcp
Install
From this repo:
python3 -m venv .venv
. .venv/bin/activate
pip install -e .Run manually:
messages-mcpClaude Desktop
Add this to Claude Desktop's MCP config, adjusting the path:
{
"mcpServers": {
"messages": {
"command": "/Users/YOU/Documents/messages-mcp/.venv/bin/messages-mcp"
}
}
}Restart Claude Desktop after editing the config.
Codex
Use the command path from the virtualenv:
{
"mcpServers": {
"messages": {
"command": "/Users/YOU/Documents/messages-mcp/.venv/bin/messages-mcp"
}
}
}Tools
list_chats(query="", limit=25)List recent chats, optionally filtered by contact name, phone/email, or group name.get_conversation_context(chat, limit=30)Return recent messages and attachment metadata for a chat.chatcan be a contact name, phone/email, or group name.get_unread_messages(chat="", limit=20)Return unread incoming messages for one chat or all recent chats.send_message(chat, text, dry_run=true)Send a message through Messages.dry_rundefaults totrue; passfalseto actually send.mark_read(chat)Best-effort mark a chat as read through Messages.
Safety
Sending is intentionally explicit. The send_message tool defaults to dry_run=true, so clients can inspect the target and text before sending.
Do not run this server for an MCP client you do not trust. Any connected client with tool access can read local Messages context and, if it calls send_message(..., dry_run=false), send messages through your account.
Troubleshooting
If chats do not appear:
Give the MCP host app Full Disk Access.
Use a contact name for one-on-one chats.
Use the exact group chat title for group chats.
Make sure Messages is signed in and synced locally.
If sending fails:
Open Messages once manually.
Approve the Automation permission prompt.
Try
send_message(..., dry_run=true)first to verify the resolved target.
Available Tools
5 toolsget_conversation_contextC
Return recent conversation context for a chat. Prefer contact names for direct chats and group titles for groups.
Inputs: chat (required), limit. Returns: object
get_unread_messagesB
Return unread incoming messages. If chat is empty, checks recent chats.
Inputs: chat, limit. Returns: object
list_chatsB
List recent Messages chats, optionally filtered by contact name, phone/email, or group name.
Inputs: limit, query. Returns: result
mark_readC
Best-effort mark a chat read through macOS Messages.
Inputs: chat (required). Returns: object
send_messageC
Send a message to a chat through macOS Messages. dry_run defaults to true for safety.
Inputs: chat (required), text (required), dry_run. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct operation: retrieving context, unread messages, listing chats, marking read, and sending. No overlap in functionality.
All tools follow a consistent verb_noun pattern in snake_case (e.g., get_conversation_context, list_chats), making the set predictable.
Five tools is well-scoped for a messaging server, providing core functionality without unnecessary bloat or gaps.
The set covers essential operations (reading, listing, sending, marking read) but is missing features like deleting messages or fetching specific conversation details, which are minor gaps.
Maintenance
Related MCP Connectors
MCP connector for iMessage & Contacts via a local Mac agent + Vercel relay
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA macOS app that provides an MCP server to your Messages, Contacts, and more1,967MIT
- AlicenseAqualityCmaintenanceA 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
- FlicenseAqualityDmaintenanceA read-only MCP server that exposes your iMessage data to Claude Code and Claude Desktop, with automatic contact name resolution.3-
- AlicenseNot gradedqualityDmaintenanceMCP server for reading and sending iMessages on macOS. Exposes iMessage history and send capabilities through tools like list_conversations and send_imessage.11 npmMIT