lane-mac-mcp
Provides read-only access to iMessage conversations on macOS, enabling listing chats, reading messages, and searching message history via Apple's Messages database.
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., "@lane-mac-mcpfind messages containing 'meeting' from John"
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.
lane-mac-mcp
A read-only iMessage MCP server + CLI for macOS. One auditable file, no send capability.
Claude (via MCP) or you (via the CLI) can list conversations, read a chat, and search message history — and nothing else. Read-only by construction: v1 contains no send code at all. All data access shells out to Apple's own /usr/bin/sqlite3 with -json -readonly against ~/Library/Messages/chat.db; contact names come from read-only queries against the local AddressBook databases.
Design constraints
The entire server is server.ts (~600 lines, comments included) so it can be audited end-to-end — the audited file is the running file, since Node ≥ 22.18 executes TypeScript directly with native type-stripping (no build step, no compiled artifacts). There are exactly two dependencies, pinned via package-lock.json: @modelcontextprotocol/sdk and zod. No network imports, no open ports — stdio JSON-RPC only, spawned as a child process by Claude Desktop; CLI runs are one-shot processes. There is no daemon: Claude Desktop starts and stops the server with the app (restart the app to reload code).
Related MCP server: imessage-rich-search
Requirements
macOS with Messages set up, Node.js ≥ 22.18, and Full Disk Access for whichever process runs the server: Terminal (or your terminal app) for CLI use, and Claude Desktop for MCP use. Grant it in System Settings → Privacy & Security → Full Disk Access, then restart the app. node server.ts doctor checks all of this and tells you what's missing.
Setup
git clone <this repo> && cd MacMCPServer
npm install # installs the two pinned dependencies
node server.ts doctorThen add the server to Claude Desktop's claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"lane-mac": {
"command": "node",
"args": ["/Users/you/Desktop/MacMCPServer/server.ts"]
}
}
}Restart Claude Desktop. Three tools appear: list_chats, read_chat, search_messages.
CLI usage
node server.ts chats # recent chats, names resolved
node server.ts chats --search "mom" --limit 5
node server.ts chats --awaiting-reply-only # threads where the last word wasn't yours
node server.ts read "Martha" --limit 100 # fuzzy name; ambiguous → candidates
node server.ts read 42 --start-date 2024-01-01 --end-date 2024-06-30 --include-reactions
node server.ts search "dinner" --from "martha" # last 30 days by default
node server.ts search "dinner" --start-date 2015-01-01 --deep # older history + rich-text decode
node server.ts doctorOutput is JSON. search covers message.text with SQL LIKE; --deep additionally decodes messages whose text lives only in the attributedBody blob (bounded scan, slower). Tapback reactions are excluded everywhere unless --include-reactions.
Apple quirks handled
Timestamps are nanoseconds since 2001-01-01 (seconds on very old rows) — both are converted. Message text often lives in the attributedBody typedstream blob rather than message.text; it's decoded in JS with the known NSString heuristic. Contact names are matched by normalized last-10-digit phone or lowercased email across all AddressBook sources, degrading gracefully to raw numbers when contacts are unreadable.
Privacy & safety posture
The server can only ever read. It opens the databases with sqlite3's -readonly flag, contains no code path that writes to any database or sends any message, makes no network connections, and listens on no ports. User input is escaped into SQL string literals ('' doubling) and numerics are validated. doctor prints row counts only, never message content. Env overrides (CHAT_DB_PATH, SQLITE_BIN, ADDRESSBOOK_DIR) exist so tests never touch real data.
Testing
npm testBlack-box tests generate a synthetic chat.db and AddressBook fixture (including an attributedBody-only message, a tapback, and an unreplied incoming thread) and drive the real CLI and the real MCP stdio interface as child processes. Development never touches real data.
Roadmap (later, not v1)
Contact enrichment polish → Notes read via osascript → sends gated behind a SEND_ENABLED env var plus per-call approval.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA local MCP server that enables reading iMessage conversations and sending new messages through Claude Desktop. It provides secure, read-only access to your Mac's iMessage database and AppleScript-based message sending capabilities.6MIT
- AlicenseAqualityCmaintenanceEnables full-text search of macOS iMessages including link preview metadata. Works as an MCP server for Claude Desktop to search your messages locally.1MIT
- FlicenseAqualityCmaintenanceA read-only MCP server that exposes your iMessage data to Claude Code and Claude Desktop, with automatic contact name resolution.3
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for local macOS Messages database, enabling querying of chats, messages, attachments, and metadata.104MIT
Related MCP Connectors
MCP connector for iMessage & Contacts via a local Mac agent + Vercel relay
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/lanemiles/lane-mac-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server