MCP Hub
Back to servers

iMessage MCP Server

A local MCP server that enables reading, searching, and sending iMessages and attachments by directly accessing the macOS iMessage and AddressBook databases.

Stars
10
Forks
2
Tools
12
Updated
Dec 12, 2025
Validated
Jan 24, 2026

💬 iMessage MCP Server

Access your iMessage conversations through the Model Context Protocol

Read, search, and send iMessages directly from Claude, Cursor, or any MCP-compatible client.
No external servers required — works locally with your iMessage database.

⚠️ Local-only server — This MCP server reads directly from local macOS database files (~/Library/Messages/chat.db and ~/Library/Application Support/AddressBook/). It must run on the same Mac where your iMessages are loaded and Apple ID is configured. Remote or cloud deployment is not supported.


✨ Features

📥 Read Messages

  • Get recent messages with smart filtering
  • View unread messages grouped by sender
  • Search across all conversations
  • Filter by date, service (iMessage/SMS), attachments

💬 Conversations

  • View full chat history with any contact
  • See recent conversations at a glance
  • Support for group chats
  • Track read/unread status

📤 Send Messages

  • Send text messages to any contact
  • Share images and files
  • Send multiple attachments at once
  • Works with phone numbers and emails

📎 Attachments

  • Browse messages with attachments
  • Get attachment metadata (size, type, path)
  • Filter for images only
  • View all attachments in a conversation

🚀 Quick Start

Prerequisites

  • macOS with iMessage configured
  • Node.js 18 or later
  • Full Disk Access permission (see below)

Installation

git clone https://github.com/sameelarif/imessage-mcp.git
cd imessage-mcp
pnpm install
pnpm build

Granting Full Disk Access

The MCP server needs permission to read your iMessage database.

  1. Open System SettingsPrivacy & SecurityFull Disk Access
  2. Click the + button
  3. Add your terminal app (Terminal, Claude Desktop, Cursor, Warp, VS Code, Ghostyy, etc.)
  4. Restart the application

🔧 Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "imessage": {
      "command": "node",
      "args": ["/absolute/path/to/imessage-mcp/dist/index.js"]
    }
  }
}

Environment Variables

VariableDescriptionDefault
LOG_LEVELLogging verbosity (debug, info, warn, error)info
DEBUGEnable SDK debug modefalse

🛠️ Available Tools

📥 Message Tools
ToolDescription
get-messagesGet messages with filters (sender, date, service, attachments)
get-unread-messagesGet unread messages grouped by sender
search-messagesSearch messages by text content
send-messageSend a text message
send-imageSend an image
send-fileSend a file attachment
💬 Conversation Tools
ToolDescription
get-conversationGet full chat history with a contact
get-recent-conversationsOverview of recent chats
get-chat-messagesGet messages from a specific chat/group
📎 Attachment Tools
ToolDescription
get-attachmentsGet messages with attachments
get-conversation-attachmentsGet all attachments from a conversation
send-filesSend multiple files at once

🧪 Test Client

An interactive CLI is included for testing with the Vercel AI SDK:

export OPENAI_API_KEY=sk-...
pnpm test-client

Commands: exitcleartools


📁 Project Structure

src/
├── index.ts              # MCP server entry point
├── test-client.ts        # Interactive test client
├── tools/
│   ├── messages.ts       # Message tools
│   ├── conversations.ts  # Conversation tools
│   └── attachments.ts    # Attachment tools
└── utils/
    ├── logger.ts         # Pretty CLI logging
    └── sdk.ts            # SDK initialization

📜 Scripts

ScriptDescription
pnpm buildCompile TypeScript
pnpm devWatch mode
pnpm startRun the MCP server
pnpm test-clientInteractive test client
pnpm cleanRemove build artifacts

🙏 Acknowledgements


📄 License

Licensed under the MIT License.

Reviews

No reviews yet

Sign in to write a review