PluginBench
MCP Server
Active
MIT

io.github.cardmagic/messages MCP Server

io.github.cardmagic/messages

Fuzzy search and browse your Apple Messages/iMessage from CLI, Claude Code, or MCP server

What is the io.github.cardmagic/messages MCP server?

The messages MCP server is a tool that lets you fuzzy-search and browse your Apple Messages (iMessage/SMS) database from the command line, Claude Code plugin, or as an MCP server. It automatically indexes your messages, resolves contact names, and provides context around matches with typo tolerance.

Search and browse your entire Apple Messages history with fuzzy matching and typo tolerance. Access your messages through multiple interfaces: CLI commands, Claude Code plugin with auto-invoked skills, or MCP server tools. The tool automatically indexes your messages database and resolves contact names from your Address Book, making it easy to find old conversations and answer questions about what people texted you.

How to install io.github.cardmagic/messages

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "messages": {
      "command": "npx",
      "args": [
        "-y",
        "@cardmagic/messages"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • search_messages — Search messages with fuzzy matching, optional sender filter, and date range filtering
  • recent_messages — Get most recent messages
  • list_contacts — List contacts by activity
  • list_conversations — List conversations with message counts
  • get_thread — Get full conversation thread with a specific contact
  • get_message_stats — Get index statistics

Use cases

  • Find old text messages by searching for keywords with typo tolerance
  • Quickly see who texted you recently and what they said
  • Browse your conversation history with a specific contact
  • Filter messages by sender or date range to narrow down results
  • Get statistics about your message index and search performance

io.github.cardmagic/messages MCP server FAQ

What is the messages MCP server?

It's a tool that lets you search and browse your Apple Messages/iMessage database using fuzzy search with typo tolerance. You can use it via CLI, as a Claude Code plugin, or as an MCP server for Claude Code.

Is it free?

Yes, the messages server is open-source and free. It's available via Homebrew, npm, or from source.

How do I install it in Claude Code?

Install it as a Claude Code plugin by running: `claude plugin marketplace add cardmagic/ai-marketplace` then `claude plugin install messages@cardmagic`. This gives you auto-invoked skills and slash commands.

How do I use it as an MCP server?

Run `claude mcp add --transport stdio messages -- npx -y @cardmagic/messages --mcp` to add it to Claude Code, or manually configure it in your MCP settings JSON.

What permissions does it need?

The tool needs Full Disk Access permission to read your Messages database at ~/Library/Messages/chat.db. Grant this in System Settings > Privacy & Security > Full Disk Access.

What are the system requirements?

You need macOS (to access the Apple Messages database), Node.js 22 or later, and Full Disk Access permission for your terminal application.

README (reference)

Source of truth, from the repository.

messages

Fuzzy search and browse Apple Messages (iMessage/SMS) from the command line, as a Claude Code plugin, or as an MCP server.

Features

  • Fuzzy search with typo tolerance across all your messages
  • Browse recent messages, contacts, and conversations
  • Contact resolution - shows names instead of phone numbers
  • Context display - see messages before/after each match
  • Filter by sender or date range
  • Auto-indexing - index automatically rebuilds when new messages are detected
  • Multiple interfaces - CLI, MCP server, or Claude Code plugin

Requirements

  • macOS (reads from Apple Messages database)
  • Node.js 22+
  • Full Disk Access permission for your terminal (to read ~/Library/Messages/chat.db)

Installation

Homebrew

brew install cardmagic/tap/messages

npm

npm install -g @cardmagic/messages

Claude Code Plugin (recommended)

Install as a plugin to get skills (auto-invoked) and slash commands:

# Add the marketplace
claude plugin marketplace add cardmagic/ai-marketplace

# Install the plugin
claude plugin install messages@cardmagic

This gives you:

  • Skill: Claude automatically searches messages when you ask about texts/iMessages
  • Slash commands: /messages:search, /messages:recent, /messages:from, and more

MCP Server

For direct MCP tool access without the plugin:

claude mcp add --transport stdio messages -- npx -y @cardmagic/messages --mcp

Or install globally first:

npm install -g @cardmagic/messages
claude mcp add --transport stdio messages -- messages --mcp

From source

git clone https://github.com/cardmagic/messages.git
cd messages
make install

# Then add as plugin OR MCP server:
claude plugin marketplace add cardmagic/ai-marketplace
claude plugin install messages@cardmagic
# OR
claude mcp add --transport stdio messages -- messages --mcp

Granting Full Disk Access

The tool needs to read your Messages database at ~/Library/Messages/chat.db:

  1. Open System Settings > Privacy & Security > Full Disk Access
  2. Click + and add your terminal app (Terminal.app, iTerm, Warp, etc.)
  3. Restart your terminal

Usage

CLI

Browse Commands

# Show most recent messages (who texted me?)
messages recent

# List contacts by recent activity
messages contacts --limit 10

# List conversations with message counts
messages conversations

# Show recent messages from someone
messages from "Mom"

# Show full conversation thread
messages thread "John" --after 2024-12-01

Search Commands

# Search for messages (index auto-builds on first search)
messages search "coffee tomorrow"

# Filter by sender
messages search "dinner" --from "Mom"

# Filter by date
messages search "meeting" --after 2024-01-01

# Adjust result count and context
messages search "project" --limit 20 --context 5

# Show index statistics
messages stats

# Force rebuild the index
messages index

Search Options

OptionDescription
-f, --from <sender>Filter by sender name or phone
-a, --after <date>Only messages after date (YYYY-MM-DD)
-l, --limit <n>Max results (default: 10)
-c, --context <n>Messages before/after (default: 2)

Claude Code Plugin

When installed as a plugin, you get:

Skill (auto-invoked): Claude automatically searches messages when you ask things like:

  • "What did Mom say about dinner?"
  • "Who texted me recently?"
  • "Find messages about the trip"

Slash Commands:

CommandDescription
/messages:search <query>Fuzzy search with optional filters
/messages:recentShow most recent messages
/messages:contactsList contacts by activity
/messages:conversationsList conversations with message counts
/messages:from "Name"Messages from a specific person
/messages:thread "Name"Full conversation thread
/messages:browse <cmd>Alias for browse commands

MCP Server

When installed as an MCP server, Claude Code can use these tools:

ToolDescription
search_messagesSearch messages with fuzzy matching
recent_messagesGet most recent messages
list_contactsList contacts by activity
list_conversationsList conversations with counts
get_threadGet conversation thread with a contact
get_message_statsGet index statistics

Manual MCP Configuration

For Claude Desktop or VS Code, add to your MCP configuration:

{
  "mcpServers": {
    "messages": {
      "command": "npx",
      "args": ["-y", "@cardmagic/messages", "--mcp"]
    }
  }
}

How It Works

  1. Auto-Indexing: On first search (or when new messages are detected), the tool automatically:

    • Reads your Apple Messages SQLite database
    • Builds a SQLite FTS5 full-text search index
    • Creates a MiniSearch fuzzy search index
    • Resolves contact names from your Address Book
  2. Searching: Queries both indexes for best results with typo tolerance

  3. Storage: Index files are stored in ~/.messages/:

    • index.db - SQLite FTS5 database
    • fuzzy.json - MiniSearch index
    • stats.json - Index statistics

License

MIT

Related MCP servers

OIOi logo

Oi

Active

Access Oi Contexts, Workflows, Skills, Guardrails, Connections, and reporting tools.

1
View repository →

Real BTC full node: fees, mempool, txs, portfolio, trace, whales, SEC, scraping, Reddit via x402.

0
JavaScript
MIT
View repository →

Let your coding agent see the squiggles — LSP diagnostics, navigation, refactoring, and extras

5
TypeScript
MIT
View repository →

An MCP server that validates content against MCP specification using semantic search and AI

3
Go
MIT
View repository →

EnergyPlus weather files (EPW, DDY, STAT) for any site: actual, typical, forecast, future climate.

GOGovRider logo

GovRider

Maintained

Match tech products and consulting services to live government tenders, grants, and RFPs

4
TypeScript
MIT
View repository →