# Apple Messages

This MCP server lets agents search and read Apple Messages chats on macOS, covering iMessage, SMS, and RCS. Sending is off by default.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: mgcrea
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mgcrea/cupertino/tree/HEAD/packages/messages
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/mgcrea-apple-messages

## What it does

Apple Messages gives an agent read access to the message store on a Mac. Its tools cover diagnostics, chat and message listings, text search, single-message retrieval, and counts grouped by date, chat, contact handle, or direction. Message content is recovered from `attributedBody`, while contact names are resolved through `@mgcrea/mcp-apple-contacts`.

The `send_message` tool can write to an existing chat after `APPLE_MESSAGES_ALLOW_WRITES` is enabled. File transfers through `filePath` need the separate `APPLE_MESSAGES_ALLOW_FILE_SEND` setting, and code lookup is gated by `APPLE_MESSAGES_ALLOW_CODES`. Full Disk Access is mandatory, so the server will not operate without that macOS permission.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `APPLE_MESSAGES_ALLOW_WRITES`, `APPLE_MESSAGES_ALLOW_CODES`, `APPLE_MESSAGES_ALLOW_FILE_SEND` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env APPLE_MESSAGES_ALLOW_WRITES=<APPLE_MESSAGES_ALLOW_WRITES> --env APPLE_MESSAGES_ALLOW_CODES=<APPLE_MESSAGES_ALLOW_CODES> --env APPLE_MESSAGES_ALLOW_FILE_SEND=<APPLE_MESSAGES_ALLOW_FILE_SEND> --transport stdio messages -- npx -y @mgcrea/mcp-apple-messages
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add messages --env APPLE_MESSAGES_ALLOW_WRITES=<APPLE_MESSAGES_ALLOW_WRITES> --env APPLE_MESSAGES_ALLOW_CODES=<APPLE_MESSAGES_ALLOW_CODES> --env APPLE_MESSAGES_ALLOW_FILE_SEND=<APPLE_MESSAGES_ALLOW_FILE_SEND> -- npx -y @mgcrea/mcp-apple-messages
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "messages": {
            "command": "npx",
            "args": [
                "-y",
                "@mgcrea/mcp-apple-messages"
            ],
            "env": {
                "APPLE_MESSAGES_ALLOW_WRITES": "<APPLE_MESSAGES_ALLOW_WRITES>",
                "APPLE_MESSAGES_ALLOW_CODES": "<APPLE_MESSAGES_ALLOW_CODES>",
                "APPLE_MESSAGES_ALLOW_FILE_SEND": "<APPLE_MESSAGES_ALLOW_FILE_SEND>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "messages": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mgcrea/mcp-apple-messages"
            ],
            "env": {
                "APPLE_MESSAGES_ALLOW_WRITES": "<APPLE_MESSAGES_ALLOW_WRITES>",
                "APPLE_MESSAGES_ALLOW_CODES": "<APPLE_MESSAGES_ALLOW_CODES>",
                "APPLE_MESSAGES_ALLOW_FILE_SEND": "<APPLE_MESSAGES_ALLOW_FILE_SEND>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e APPLE_MESSAGES_ALLOW_WRITES=<APPLE_MESSAGES_ALLOW_WRITES> -e APPLE_MESSAGES_ALLOW_CODES=<APPLE_MESSAGES_ALLOW_CODES> -e APPLE_MESSAGES_ALLOW_FILE_SEND=<APPLE_MESSAGES_ALLOW_FILE_SEND> messages npx -y @mgcrea/mcp-apple-messages
```
Replace <…> with your own values

## When to use it
- search message history by text
- read messages from a selected chat
- count messages by date or direction
- resolve phone handles to contact names
- send a message to an existing chat

## Example prompts
- Search Apple Messages for messages about the order from last month.
- Show the latest messages in this chat and group the count by direction.
- Send the text from `release-notes.md` to the selected chat.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74569
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899

## Other versions with the same name
- [Apple Messages · jonathanrreed](https://affpapa.org/en/nevibecode/mcp/apple-messages.md) — ★ 31

From the same set: [mgcrea/cupertino](https://affpapa.org/en/nevibecode/by/mgcrea/cupertino.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
