Skip to main content
Glama
sameelarif

iMessage MCP Server

by sameelarif

๐Ÿ’ฌ iMessage MCP Server

Access your iMessage conversations through the Model Context Protocol

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


Related MCP server: iMessage MCP

๐Ÿš€ 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

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

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

Tool

Description

get-attachments

Get messages with attachments

get-conversation-attachments

Get all attachments from a conversation

send-files

Send 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: 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.

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Enables interaction with iMessage through a BlueBubbles server, allowing users to read, search, and send messages directly from MCP clients. It supports comprehensive chat management features including reactions, group chat moderation, message scheduling, and contact lookups.
    Last updated
    33
    1
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Read-only MCP server for local macOS Messages database, enabling querying of chats, messages, attachments, and metadata.
    Last updated
    115
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Enables reading and sending iMessages on macOS through MCP, with tools for managing chats, messages, and attachments via AI agents.
    Last updated
    MIT

View all related MCP servers

Related MCP Connectors

  • Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sameelarif/imessage-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server