messaging-mcp
Sends 1:1 iMessages and reads recent incoming iMessage messages for allowlisted 1:1 contacts, using the imsg CLI and macOS Messages permissions.
Sends 1:1 Signal messages via signal-cli, with QR-code device linking; Signal messages are not read.
Sends 1:1 WhatsApp messages and reads recent incoming WhatsApp messages for allowlisted 1:1 contacts, using wacli and QR pairing.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
messaging-mcp
A local macOS service and stdio MCP server. An AI agent uses it to send iMessage, WhatsApp and Signal messages as you, under a send policy you control. It can also read recent incoming iMessage and WhatsApp messages. It works with Claude Code, Codex and other MCP clients.
A launchd service alone holds the macOS privacy grants, the policy file and the send log. Agents reach it through messaging-mcp mcp, an unprivileged stdio bridge. DESIGN.md explains why.
Status: pre-release. Tested against fake imsg, wacli, signal-cli, qrencode and osascript binaries and with real Claude Code. Not yet tested with real iMessage, WhatsApp or Signal accounts or with real launchd privacy grants.
Security model
It protects against a confused agent: a mistake, or a prompt injection in an incoming message.
Recipients: an allowlist by default, or your approval per message, or open. Never groups.
Volume: an hourly cap, a same-text window per contact, and at most one send per
(job_id, contact_id).Kill switch:
sending: falserefuses every send at once.No blind retries: a send that may have gone out (
unknown) blocks that contact until you check and runmessaging-mcp resolve.Reads: off by default. Text shows only for allowlisted 1:1 contacts, never for groups or SMS.
It does not protect against an agent with shell access as your user. Such an agent can edit ~/.config/messaging-mcp/allowlist.json, add a client hook that answers approvals, or run wacli or signal-cli itself. Deny agents access to ~/.config/messaging-mcp/, to client settings files, to messaging-mcp setup and messaging-mcp resolve, and to wacli and signal-cli, for example with Claude Code permissions.deny or a sandbox. Never grant Full Disk Access or Automation to a terminal or an agent app.
Related MCP server: Apple Messages MCP
Requirements
macOS 15 or later, kept awake, and Bun on
PATH.iMessage: Messages signed in, and
brew install steipete/tap/imsg.WhatsApp:
brew install openclaw/tap/wacli.Signal:
brew install signal-cliandbrew install qrencode. Withoutqrencodethe link shows as text, which a phone cannot scan.
A service you turn off needs none of its CLIs or permissions. Only iMessage is on by default.
Quick start
Clone the repository:
git clone https://github.com/familiar-ai/messaging-mcp ~/code/messaging-mcp cd ~/code/messaging-mcpWrite the policy file. With no flags,
setupprompts for contacts, which needs a terminal. Pick the line for your services:# iMessage only bun cli.ts setup --contact 'imessage:+14155551212=Mum' # WhatsApp only: --whatsapp shows a QR code; scan it in WhatsApp > Settings > Linked devices > Link a device bun cli.ts setup --service imessage=off --whatsapp --contact 'whatsapp:+14155551212=Mum' # Signal only: --signal shows a QR code; scan it in Signal > Settings > Linked devices > Link new device bun cli.ts setup --service imessage=off --signal --contact 'signal:+14155551212=Mum'Install and start the service:
bun cli.ts install-serviceThis builds
~/.local/share/messaging-mcp/bin/messaging-mcp, links it as~/.local/bin/messaging-mcp, writes and loads~/Library/LaunchAgents/com.familiar.messaging-mcp.plist. It stops and changes nothing if another file holds~/.local/bin/messaging-mcp. If~/.local/binis not on yourPATH, it says so.--no-loadwrites the files without loading them. With iMessage on, it prints the grant steps for the service binary:Full Disk Access: System Settings > Privacy & Security > Full Disk Access >
+>Cmd-Shift-G> paste~/.local/share/messaging-mcp/bin/messaging-mcp.Automation: click Allow when the service first asks to control Messages.
After a change, restart the service:
launchctl kickstart -k gui/$(id -u)/com.familiar.messaging-mcp.
The last line is
Next:with the doctor command to run.Check everything. Run the
Next:line as printed: it is the baremessaging-mcponly when~/.local/binis on yourPATH, else the full path, and the same holds for everyfix:line.messaging-mcp doctor # one line per check; exits 1 on any failure messaging-mcp doctor --json # {"ok", "next", "checks": [{"name", "ok", "detail", "fix"}]}Each failed check prints its
fix:, and the last line isNext:with the first fix to run, orAll checks passed.A send still running shows assend in progress, not a failure. Doctor checks the policy file, each CLI that is on (on the service PATH,/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin), WhatsApp pairing and the Signal link, the service and its socket (0600in a0700directory), the iMessage grants, and unresolvedunknownsends.Add the server to your agent:
claude mcp add messages -- ~/.local/bin/messaging-mcp mcpCodex, in
~/.codex/config.toml:[mcp_servers.messages] command = "/Users/<you>/.local/bin/messaging-mcp" args = ["mcp"]
Later changes with messaging-mcp setup take effect on the next call. No restart is needed, also not after you install a CLI or pair a service. To update, pull and run bun cli.ts install-service again, then give the grants again: a new binary loses them.
If you set MESSAGING_MCP_HOME, set it for setup, the service and the MCP client alike. While the service is down, calls fail with service_unavailable. A client that starts while the service is down fails to connect to the server: run messaging-mcp doctor, then restart the client. A call in flight when the service stops fails with service_disconnected: check the conversation before you retry. The bridge reconnects by itself.
Tools
Tool | Default | What it does |
| always on | Sends one 1:1 message: |
| on | Lists allowlisted contacts ( |
| off | Recent incoming iMessage and WhatsApp messages ( |
A tool that is off is missing from tools/list and answers as an unknown tool.
messages_send returns {effect_id, delivery, duplicate, summary} and, when one applies, condition: {type, message}. The message tells the agent what to do next. delivery is sent, not_sent or unknown. A repeat of the same (job_id, contact_id) returns the first result with duplicate: true and sends nothing. A refusal is an error result {refused, delivery: "not_sent", message}, for example not_allowlisted, rate_limited, same_text, service_off or contact_unresolved.
Configuration
The policy file is ~/.config/messaging-mcp/allowlist.json (mode 0600). Every call reads it again. An invalid file refuses every send. Missing keys take their defaults, and schema is optional.
{
"schema": "messaging-mcp.allowlist.v1",
"sending": true,
"max_sends_per_hour": 10,
"same_text_window_minutes": 10,
"tools": { "contacts": true, "recent_incoming": false },
"services": { "imessage": true, "whatsapp": false, "signal": false },
"send_policy": "allowlist",
"approval_command": ["/Users/<you>/bin/approve-message"],
"contacts": [{ "id": "imessage:+14155551212", "label": "Mum" }]
}Key | Default |
| Meaning |
|
|
| Kill switch for every policy. |
|
|
| Cap for all contacts, 1 to 100. Denied approvals count. |
|
| edit the file | Refuses the same text to the same contact within this many minutes. 0 to 1440, |
|
|
| Offer |
|
|
| Offer |
| iMessage on |
| A service that is off never sends, never shows and never runs. |
|
|
| Who the agent can message. |
| none |
| Your approver program under |
| none |
| Allowlisted 1:1 contacts. |
Contact IDs are printable ASCII and take these forms: imessage:+14155551212 or imessage:sam@icloud.com, whatsapp:14155551212@s.whatsapp.net (also whatsapp:+14155551212), and signal:+14155551212 or signal:<uuid>.
Send policies
allowlist(default): sends only to listed contacts, with no prompt.approve: sends to any valid 1:1 contact after you approve it. An unlisted Signal contact must be a phone number; a Signal UUID must be on the allowlist. The service asks in this order:approval_command, if set. It runs without a shell and gets{"effect_id","contact_id","label","service","text"}on stdin (labelisnullfor an unlisted contact). Exit 0 approves. Any other exit, or no answer in 30 s, denies.MCP elicitation, if the client declared it. The prompt names the service and the recipient first and quotes each line of the text. Only
acceptapproves. Claude Code supports it in interactive sessions (tested on 2.1.332). Inclaude -p, a prompt is cancelled at once.Neither: the send is refused with
approval_unavailable.
A denial, a timeout or a cancelled call is
not_sent(ApprovalDeniedorApprovalTimedOut) and does not block the contact. The samejob_iddoes not ask again. The policy file and the limits are checked again after you approve.open: sends to any valid 1:1 contact with no approval, with the same Signal rule. To turn it on, or to turn reading on under it, you typeOPENat a terminal.
CAUTION: Do not use
openwithrecent_incoming. Untrusted incoming text can make the agent message anyone.
Delivery states and resolve
Each send writes a row to ~/.config/messaging-mcp/sends.sqlite before it runs the CLI. Text is 1 to 2000 characters, with no control characters other than newline and tab, and no bidi controls.
| When |
|
|
| A refusal or denied approval, a CLI that could not start, or a CLI error that proves nothing left the Mac: |
| No answer in 90 s, a crash, any other CLI error, or a send log that could not be written. |
While a contact has an unknown send, new sends to it are refused. Check the conversation, then settle it. resolve refuses a send that may still be running, up to 100 s after it started.
messaging-mcp resolve <effect_id> sent # or not-sentLimits
Per ID, not per person. Dedupe, the same-text window, the
unknownblock and open approvals apply per contact ID. A phone number and an email of one person, a Signal phone number and UUID, or one person on two services are separate contacts.Dedupe: a new
job_idis a new send. The rate limit, the same-text window and theunknownblock still apply.Allowlist visibility: with
messages_contactsoff, refusals still show whether an ID is listed.Approval programs: a timeout or cancel kills only the process the service started. Use
execin wrapper scripts.iMessage: sends with
--service=imessage, never SMS. SMS is never read: its sender can be spoofed. Reads check the 50 newest chats up to 24 h back. Attachments show as[attachment].WhatsApp:
wacliuses the unofficial WhatsApp Web protocol, so the account can be banned. While WhatsApp is on and paired, the service keepswacli sync --followrunning. Media shows as[image]and similar.Signal: send only, through the unofficial GPL-3.0
signal-clirun as a separate program, so the account can be banned. Its data is in~/.config/messaging-mcp/signal/, of which onlydata/accounts.jsonis read. The service never runssignal-cli receive. Not tested: whether Signal unlinks a device that never receives. If sends fail, link again withsetup --signal. Thatsignal-cli linkprints its URI on stdout is assumed from its source, not tested.
Uninstall
claude mcp remove messages
launchctl bootout gui/$(id -u)/com.familiar.messaging-mcp
rm ~/Library/LaunchAgents/com.familiar.messaging-mcp.plist ~/.local/bin/messaging-mcp
rm -r ~/.local/share/messaging-mcpRemove the binary from Full Disk Access and Automation in System Settings. To delete the policy file, the send log and the WhatsApp and Signal links, also delete ~/.config/messaging-mcp/.
Development
bun install, then bun run check runs tsc, the unit tests and test/e2e.ts against the fake CLIs in test/fake-bin/. It never sends a message. Tests point the service at the fakes with MESSAGING_MCP_IMSG, MESSAGING_MCP_WACLI, MESSAGING_MCP_SIGNAL_CLI, MESSAGING_MCP_OSASCRIPT and MESSAGING_MCP_CHAT_DB, and shorten its timeouts with MESSAGING_MCP_SEND_TIMEOUT_MS, MESSAGING_MCP_READ_TIMEOUT_MS, MESSAGING_MCP_APPROVAL_TIMEOUT_MS, MESSAGING_MCP_LINK_TIMEOUT_MS and MESSAGING_MCP_SYNC_INTERVAL_MS.
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
iMessage for AI agents, from your iPhone. No Mac needed, and you choose which chats they read.
Let AI agents securely access the text messages on your phone.
Read and answer Instagram, WhatsApp, LinkedIn, Messenger and Telegram messages from any AI agent.
Enterprise-ready messaging infrastructure for AI agents across iMessage, WhatsApp, Telegram and SMS.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents on macOS to securely read and search the local Messages database, catch up on missed messages via a persistent inbox, and send texts or files to allowlisted chats, with optional voice note transcription and text-to-speech.1019 npmMIT
- AlicenseAqualityDmaintenanceEnables an agent to read the user's local Messages.app database on macOS, listing chats and threads and searching iMessage/SMS history entirely on localhost, with optional AppleScript sending gated behind an explicit flag. Access is read-only and scoped-shut by default, and replies can be optionally sent when send mode is enabled.4MIT
- AlicenseAqualityBmaintenanceEnables AI agents to send and receive iMessages and emails, and manage agent identities, in MCP-compatible clients.622 npmMIT

bluereacher-mcpofficial
AlicenseAqualityCmaintenanceEnables AI agents to send iMessages, check delivery status, read conversations, and verify iMessage capability over a dedicated line.4264 npmMIT