iMessage MCP Server

iMessage MCP Server

Enables reading, searching, and sending iMessages directly from MCP-compatible clients by accessing the local macOS iMessage database, supporting conversations, attachments, and both individual and group chats.

Category
Visit Server

README

๐Ÿ’ฌ iMessage MCP Server

Access your iMessage conversations through the Model Context Protocol

<p align="center"> <strong>Read, search, and send iMessages</strong> directly from Claude, Cursor, or any MCP-compatible client.<br> No external servers required โ€” works locally with your iMessage database. </p>

โš ๏ธ 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

<table> <tr> <td width="50%">

๐Ÿ“ฅ 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

</td> <td width="50%">

๐Ÿ’ฌ Conversations

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

</td> </tr> <tr> <td width="50%">

๐Ÿ“ค Send Messages

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

</td> <td width="50%">

๐Ÿ“Ž Attachments

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

</td> </tr> </table>


๐Ÿš€ 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 Settings โ†’ Privacy & Security โ†’ Full 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

Variable Description Default
LOG_LEVEL Logging verbosity (debug, info, warn, error) info
DEBUG Enable SDK debug mode false

๐Ÿ› ๏ธ Available Tools

<details> <summary><strong>๐Ÿ“ฅ Message Tools</strong></summary>

Tool Description
get-messages Get messages with filters (sender, date, service, attachments)
get-unread-messages Get unread messages grouped by sender
search-messages Search messages by text content
send-message Send a text message
send-image Send an image
send-file Send a file attachment

</details>

<details> <summary><strong>๐Ÿ’ฌ Conversation Tools</strong></summary>

Tool Description
get-conversation Get full chat history with a contact
get-recent-conversations Overview of recent chats
get-chat-messages Get messages from a specific chat/group

</details>

<details> <summary><strong>๐Ÿ“Ž Attachment Tools</strong></summary>

Tool Description
get-attachments Get messages with attachments
get-conversation-attachments Get all attachments from a conversation
send-files Send multiple files at once

</details>


๐Ÿงช Test Client

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

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

Commands: exit โ€ข clear โ€ข tools


๐Ÿ“ 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

Script Description
pnpm build Compile TypeScript
pnpm dev Watch mode
pnpm start Run the MCP server
pnpm test-client Interactive test client
pnpm clean Remove build artifacts

๐Ÿ™ Acknowledgements


๐Ÿ“„ License

Licensed under the MIT License.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured