home / mcp / jons-mcp-imessage mcp server
Local MCP server to query and send iMessages on macOS, enabling AI assistants to read history and send messages.
Configuration
View docs{
"mcpServers": {
"jonmmease-jons-mcp-imessage": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/jons-mcp-imessage",
"jons-mcp-imessage"
],
"env": {
"OPENAI_API_KEY": "sk-your-openai-api-key"
}
}
}
}You run a local MCP server that enables AI assistants to read your iMessage history and send messages from macOS. It exposes tools through the Model Context Protocol (MCP), so you can query conversations, read messages, and initiate sends from your AI workflows while keeping control on your machine.
To use this MCP server, start it locally and connect to it with an MCP client or your Claude-like workflow. The server runs on your machine and talks to Messages.app to read iMessages and to send messages via AppleScript. You can search messages, inspect conversations, and perform careful, permission-guarded actions from your AI assistant.
Prerequisites you need to prepare before you install and run the server.
# Clone the repository
git clone <your-repo-url>
cd jons-mcp-imessage
# Install with uv
uv pip install -e .You can start the server locally with a single command. The recommended runtime is the uvx-based workflow shown below. You can also integrate with Claude Code or Claude Desktop using the provided configuration examples.
uv run jons-mcp-imessageTo register the MCP server with Claude Code, run the following command.
# Register the MCP server with Claude Code
claude mcp add jons-mcp-imessage -- uv run --directory /path/to/jons-mcp-imessage jons-mcp-imessageAdd this JSON block to Claude Desktop configuration to connect to the MCP server.
{
"mcpServers": {
"jons-mcp-imessage": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/jons-mcp-imessage",
"jons-mcp-imessage"
],
"env": {
"OPENAI_API_KEY": "sk-your-openai-api-key"
}
}
}
}If you have an OpenAI API key for semantic search, set the OPENAI_API_KEY environment variable in Claude Desktopβs config. If you do not have a key, you can still use keyword search.
Verify database access and diagnose permission issues.
List all conversations with metadata such as participants and last message.
Retrieve messages from a specific conversation by contact or chat_id.
Fetch the most recent messages across all conversations.
Get messages surrounding a specific message within the same thread.
Search messages by text with optional filters like sender or date.
Search for contacts or handles by phone number or email in the iMessage database.
Look up a contact name from the Contacts app using a phone number or email (requires Contacts permission).
Send a message to an existing conversation via Messages.app (requires Automation permission).