iMessage MCP
Read-only MCP server for local macOS Messages database, enabling querying of chats, messages, attachments, and metadata.
README
iMessage MCP
This project exposes a read-only MCP server for the local macOS Messages database.
What it can do
- List recent chats
- Read messages from a chat
- Read messages by local date across all chats
- Search message text and subjects
- List attachments and local attachment paths
- Read text-like attachment contents
- Return attachments alongside messages
- Return server/database metadata
What it cannot do
- Send messages
- Edit messages
- Delete messages
- Mark chats or messages as read/unread
- Modify attachment files
The SQLite connection is opened in readonly mode, and the server only exposes query tools.
Attachment support
Use list_attachments to find attachments by chat or message. Use read_attachment with an attachment_id to read text-like files such as .txt, .md, .csv, .json, .html, .rtf, .doc, and .docx.
For PDFs and images, read_attachment also tries macOS Spotlight text metadata. If no text is available, binary files return metadata plus resolved_path. Import that path into AnythingLLM or use AnythingLLM's OCR/PDF pipeline to extract content.
get_messages returns attachment metadata under each message by default. Pass include_attachment_content: true to also extract readable attachment text inline with the message result.
Use get_messages_by_date for prompts such as "what messages did I send today?" Set direction to sent, received, or all. It returns message text and, when available, extracted attachment text inline.
Attachment text cache
Successful attachment text extraction is cached under cache/attachments. The cache key includes the attachment ID, local file path, file size, modified time, and max_bytes, so changed files are reprocessed automatically.
read_attachment uses the cache by default. Set use_cache: false only when you intentionally want to force OCR/PDF extraction again.
Run it
npm start
If your MCP client cannot find sqlite3, set:
export SQLITE3_PATH=/Users/lilty/miniconda3/bin/sqlite3
If your Messages database is in a different location, set:
export IMESSAGE_DB_PATH="$HOME/Library/Messages/chat.db"
MCP client config
Use this in your MCP client configuration:
{
"mcpServers": {
"imessage": {
"command": "node",
"args": ["/Users/lilty/Documents/Codex/2026-05-29/imessage-mcp/src/server.js"],
"env": {
"SQLITE3_PATH": "/Users/lilty/miniconda3/bin/sqlite3"
}
}
}
}
Notes
- On macOS, you may need to grant Full Disk Access to the app that launches the MCP server.
- The Messages database is read directly from
~/Library/Messages/chat.db.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.