Back to MCP Catalog

iMessage Query MCP Server

CommunicationPython
Access and analyze your iMessage conversations through a secure MCP server
Available Tools

get_chat_transcript

Retrieve message history for a specific phone number with optional date filtering. Includes message text, timestamps, attachment information, and supports proper phone number validation and date range filtering.

phone_numberstart_dateend_date

The iMessage Query server provides a secure interface for LLMs to access and analyze your macOS Messages database. Built with the FastMCP framework and imessagedb library, it enables AI assistants to retrieve and process your message history with proper phone number validation and attachment handling. This tool maintains privacy and security by implementing read-only access to your messages database, along with robust phone number validation and safe attachment handling. It's designed specifically for macOS users who want to leverage their message history with AI assistants while maintaining control over their personal data.

Overview

The iMessage Query server allows AI assistants to safely access and analyze your iMessage conversations on macOS. It provides a structured way to retrieve message history for specific contacts with optional date filtering.

System Requirements

  • macOS (required for iMessage database access)
  • Python 3.6 or higher

Installation

Step 1: Clone the Repository

git clone https://github.com/hannesrudolph/imessage-query-fastmcp-mcp-server.git
cd imessage-query-fastmcp-mcp-server

Step 2: Install Dependencies

Install all required packages using pip:

pip install -r requirements.txt

The main dependencies include:

  • fastmcp: Framework for building Model Context Protocol servers
  • imessagedb: Python library for accessing the macOS Messages database
  • phonenumbers: Google's library for phone number validation and formatting

Step 3: Configure Your AI Assistant

You have two options for using this MCP server:

Option 1: Claude Desktop

If you're using Claude Desktop, install the server using FastMCP:

fastmcp install imessage-query-server.py --name "iMessage Query"

Option 2: Cline VSCode Plugin

To use with the Cline VSCode plugin:

  1. In VSCode, click the server icon (☰) in the Cline plugin sidebar
  2. Click "Edit MCP Settings" (✎)
  3. Add the configuration to your settings file (see Installation section below)

Usage

Once installed, your AI assistant can access your iMessage history using the get_chat_transcript tool. You can ask questions like:

  • "Show me my recent messages with John"
  • "Find conversations with Sarah from last week"
  • "Summarize my chat history with +1 (555) 123-4567"

The tool handles phone number validation automatically and can filter messages by date range when specified.

Safety Features

The iMessage Query server implements several safety measures:

  • Read-only access to your Messages database
  • Phone number validation using the phonenumbers library
  • Safe attachment handling with missing file detection
  • Date range validation
  • Clean JSON responses with progress output suppression

No environment variables are required as the server automatically locates the iMessage database in the default macOS location.

Related MCPs

YouTube Transcript
CommunicationTypeScript

Retrieve transcripts from YouTube videos

Slack Integration
CommunicationTypeScript

Enables AI assistants to interact with Slack workspaces

Bluesky Context Server
CommunicationTypeScript

Query and interact with Bluesky social network from AI assistants

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.