Skip to main content
Glama
jaredmoskowitz

imessage-mcp

imessage-mcp

A read-only MCP server for macOS that exposes your iMessage data over the Model Context Protocol (MCP), with automatic contact name resolution.

Use it with Cursor, OpenAI Codex, Claude Desktop, Claude Code, or any other MCP-capable client your terminal editor supports.

Setup

1. Install

cd ~/workspace/imessage-mcp
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e .

2. Grant Full Disk Access

The server needs to read ~/Library/Messages/chat.db and the Contacts database. Grant Full Disk Access to the app that runs the server:

  1. Open System Settings → Privacy & Security → Full Disk Access

  2. For terminal-based MCP (Cursor agent, Claude Code, Codex in the terminal, etc.): add your terminal app (e.g., Terminal, iTerm2, Ghostty, Warp).

  3. For Claude Desktop: add the Claude app itself.

3. Configure Cursor

In Cursor Settings → MCP (or your user MCP config, depending on Cursor version), register a server with the same command and args as in the Claude Code snippet below — only the host config file/path differs.

Example shape:

{
  "mcpServers": {
    "imessage": {
      "command": "<path-to-this-repo>/.venv/bin/python",
      "args": ["-m", "imessage_mcp"]
    }
  }
}

4. Configure Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "imessage": {
      "command": "/Users/jaredmoskowitz/workspace/imessage-mcp/.venv/bin/python",
      "args": ["-m", "imessage_mcp"]
    }
  }
}

5. Configure Claude Desktop

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

{
  "mcpServers": {
    "imessage": {
      "command": "/Users/jaredmoskowitz/workspace/imessage-mcp/.venv/bin/python",
      "args": ["-m", "imessage_mcp"]
    }
  }
}

Related MCP server: imessage-rich-search

Tools

list_chats

List your iMessage chats sorted by recent activity.

  • limit (optional, default 50): max chats to return

get_messages

Get messages from a specific chat.

  • chat_id (required): chat identifier from list_chats

  • limit (optional, default 50): max messages

  • since (optional): ISO date string — only messages after this date

search_messages

Search all chats for messages containing a keyword.

  • query (required): search text

  • limit (optional, default 50): max results

Example Usage

"List my group chats" "Get the last 20 messages from my Business Ideas chat" "Search my messages for 'startup idea'"

Available Tools

3 tools
get_messagesA

Get messages from a specific iMessage chat.

Args: chat_id: The chat identifier (from list_chats) limit: Maximum number of messages to return (default 50) since: Only return messages after this ISO date (e.g. '2024-01-15' or '2024-01-15T10:30:00')

ParametersJSON Schema
NameRequiredDescriptionDefault
chat_idYes
limitNo
sinceNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavior. It describes a read operation with filtering, but omits details like rate limits, permissions, or whether messages are sorted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two short paragraphs: one for purpose, one for parameters. No unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with output schema, the description covers the key aspects: what it does and what each parameter does. Could mention sorting or pagination, but not essential.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage; the description adds crucial meaning by explaining chat_id as from list_chats, limit with its default, and since with ISO date examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets messages from a specific iMessage chat, distinguishing it from sibling search_messages by specifying the chat_id is obtained from list_chats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by stating chat_id comes from list_chats and provides limit/since filters, but does not explicitly compare to search_messages or advise when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_chatsA

List iMessage chats sorted by most recent activity.

Args: limit: Maximum number of chats to return (default 50)

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions sorting by activity but does not disclose if it requires authentication, rate limits, pagination, or that it is read-only. It adds minimal behavioral context beyond the action itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely terse: one sentence for purpose and one for the parameter. Every sentence earns its place with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, output schema available), the description covers the essential purpose and parameter semantics. It lacks mention of sorting direction but 'most recent activity' implies descending. Mostly complete for a simple list tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explains the 'limit' parameter as 'Maximum number of chats to return (default 50)', adding meaning beyond the schema's type and default. With 0% schema coverage, this compensates adequately, though other implicit constraints are not mentioned.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List iMessage chats sorted by most recent activity', using a specific verb and resource, and is differentiated from sibling tools (get_messages, search_messages) which focus on individual messages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like get_messages or search_messages, nor any context for selection or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_messagesB

Search all iMessage chats for messages containing the query text.

Args: query: The text to search for limit: Maximum number of results to return (default 50)

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavior. It only states that it searches all chats, without detailing performance, pagination, error handling, or what happens with empty queries or limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise, with two sentences and a bullet list. It front-loads the core purpose. However, it could be more structured (e.g., separate sections) to improve readability for complex use cases.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 parameters, no nested objects) and the presence of an output schema, the description is mostly adequate. However, it lacks usage context and any mention of return structure, leaving some gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description adds only minimal clarification: 'The text to search for' for query and 'Maximum number of results to return (default 50)' for limit. This adds little beyond the schema's title fields, failing to compensate for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches all iMessage chats for messages containing the query text, specifying the verb 'search', resource 'iMessage chats', and scope 'all'. It distinguishes from siblings 'get_messages' (which likely retrieves specific messages) and 'list_chats'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool vs. its siblings ('get_messages', 'list_chats'), nor are there any prerequisites or exclusions mentioned. The agent is left to infer usage context without explicit direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedget_messages
    • First observedlist_chats
    • First observedsearch_messages

TDQS

A3.9/5.0
Disambiguation5/5

Each tool targets a distinct operation: listing chats, retrieving messages from a specific chat, and searching across all chats. There is no functional overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case (list_chats, get_messages, search_messages), making the set predictable.

Tool Count5/5

Three tools is appropriate for the server's scope, covering essential read operations without being too few or excessive.

Completeness4/5

The tool set provides solid coverage for reading iMessage data. A potential minor gap is the lack of a send message tool, but that may be intentional for a read-only server.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A local MCP server that enables reading iMessage conversations and sending new messages through Claude Desktop. It provides secure, read-only access to your Mac's iMessage database and AppleScript-based message sending capabilities.
    6
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables full-text search of macOS iMessages including link preview metadata. Works as an MCP server for Claude Desktop to search your messages locally.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Read-only MCP server for local macOS Messages database, enabling querying of chats, messages, attachments, and metadata.
    975
    MIT

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/jaredmoskowitz/imessage-mcp'

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