iMessage MCP
Provides read-only access to Apple's iMessage chat database on macOS, allowing listing chats, reading messages, searching text and subjects, and extracting attachment content.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@iMessage MCPlist my recent chats"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 startIf your MCP client cannot find sqlite3, set:
export SQLITE3_PATH=/Users/lilty/miniconda3/bin/sqlite3If 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.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/4ndylg/iMessage-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server