An MCP server that provides safe, read-only access to the macOS iMessage database via the Model Context Protocol (MCP). Built with FastMCP and imessagedb, it lets LLMs query message transcripts with phone-number validation and automatic macOS permission handling.
https://github.com/hannesrudolph/imessage-query-fastmcp-mcp-serverStop manually searching through thousands of messages when you need context from past conversations. This MCP server bridges your iMessage database with AI assistants like Claude, giving you instant access to conversation history through natural language queries.
You're deep in a project discussion with a client, and you need to find that specific detail they mentioned three weeks ago about the API requirements. Or you're trying to remember what your teammate said about the deployment schedule last month. You end up scrolling through endless message threads, using inadequate search, or just giving up and asking again.
Your AI assistant could handle these lookups instantly - if it could access your message history. That's exactly what this MCP server enables.
This server creates a secure, read-only connection between your macOS Messages database and any MCP-compatible AI assistant. You can ask questions like:
The AI gets the context it needs, you get instant answers instead of manual searching.
Project Context Retrieval: Instead of hunting through group chats for that crucial decision made weeks ago, ask your AI assistant to find it in seconds. Perfect for project handoffs or when you need to reference previous discussions.
Client Communication History: Quickly pull up what a client specifically requested or approved without scrolling through months of messages. Essential for scope changes or billing discussions.
Team Coordination: Find when someone mentioned they'd handle a specific task, or locate shared resources and links from past conversations.
Research and Reference: Your message history becomes searchable context for your AI assistant, making it more useful for ongoing projects where details are scattered across conversations.
This isn't some sketchy database hack. The server includes:
The installation is straightforward - it uses uv for dependency management and includes automatic permission detection for your MCP client.
For Claude Desktop, add this to your config:
{
"mcpServers": {
"imessage-query": {
"command": "/path/to/imessage-query-server.py"
}
}
}
For VS Code with Cline, add the same path to your MCP settings.
The server handles macOS permissions automatically - it detects your client app and opens the right System Preferences panel with specific instructions.
Development Teams: Track feature discussions, decisions, and resource sharing across multiple project channels.
Client Services: Maintain context across long-running client relationships where details matter.
Research Projects: Access conversation history as context for your AI assistant when working on complex topics discussed over time.
Documentation: Let your AI help compile information from team discussions into proper documentation.
This server transforms your message history from a searchable archive into active context for your AI assistant. If you use Claude Desktop or other MCP clients for project work, this becomes an essential productivity multiplier.
The implementation uses FastMCP and imessagedb libraries, ensuring reliable database access without the complexity of rolling your own SQLite queries against the Messages schema. 57 stars and active development show this is already proving valuable to other developers facing the same message search problem.