MCPSERV.CLUB
hannesrudolph

iMessage Query MCP Server

MCP Server

Securely query iMessage conversations via Model Context Protocol on macOS

Stale(55)
70stars
1views
Updated 15 days ago

About

This MCP server exposes a tool for LLMs to retrieve iMessage chat transcripts, with phone number validation, date filtering, and attachment handling. Built on FastMCP and imessagedb, it runs on macOS with full disk access permissions.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

MseeP.ai Security Assessment Badge

The iMessage Query MCP Server bridges the gap between local macOS messaging data and AI assistants by exposing a secure, typed interface for querying iMessage conversations. Built on the FastMCP framework and powered by the library, it allows developers to integrate personal or enterprise chat histories directly into LLM-powered workflows without compromising privacy or requiring manual data export. This server solves the common pain point of accessing encrypted, proprietary message stores—such as Apple’s Messages database—from third‑party tools in a way that respects macOS security constraints and phone number semantics.

At its core, the server offers a single, well‑documented tool: . When invoked, the tool retrieves all messages exchanged with a specified phone number within an optional date range. The implementation automatically normalizes and validates the input number using Google’s library, ensuring that queries are consistent regardless of formatting. It returns rich metadata for each message—including text, timestamps, attachment details, and a flag indicating whether the message was sent from the local device—so that downstream applications can render or analyze conversations accurately. If no dates are supplied, the server defaults to the last seven days, striking a balance between relevance and performance.

Developers can incorporate this MCP into existing AI pipelines in several impactful ways. For customer support bots, the server enables retrieval of past interactions to provide context‑aware responses without exposing raw data. In productivity tools, users can ask an assistant to summarize recent chats or locate specific information within a conversation thread. Security‑aware teams can audit message histories for compliance, leveraging the server’s built‑in phone number validation to avoid accidental leaks. Because the MCP runs locally and respects macOS Full Disk Access permissions, it eliminates the need to ship sensitive data to external services, addressing both regulatory and user‑trust concerns.

The server’s design emphasizes safety and usability. It requires only the standard macOS permission for full disk access, which is granted once per machine and scoped to the Messages database. The FastMCP framework automatically handles authentication, rate‑limiting, and serialization, freeing developers from boilerplate code. Additionally, the server’s single tool interface keeps the API surface minimal, reducing attack vectors and simplifying client integration. Whether you’re building a chatbot in Claude Desktop, extending VS Code with the Cline plugin, or wiring a custom LLM workflow, this MCP server provides a reliable, secure bridge to your iMessage data—making conversational AI truly personal and context‑rich.