Roman Peschke @roman.peschke
Free Guide

How to Set Up iMessage for Claude Code

Text yourself to talk to Claude Code. No bots, no tokens, no external services. Just your Apple ID.

What you need

Claude Code channels let you message a running session from Telegram, Discord, or iMessage. Telegram and Discord need bot tokens and external setup. iMessage is different. It reads your Mac's Messages database directly and sends replies via AppleScript. No accounts to create, no servers to run, no tokens to manage. You text yourself and Claude responds.

Setup
1

Grant Full Disk Access to your terminal

The iMessage plugin reads ~/Library/Messages/chat.db, which is protected by macOS. The first time the server reads it, macOS pops a prompt asking if your terminal can access Messages.

  • Click Allow when the prompt appears
  • If you click Don't Allow or the prompt never shows, grant it manually: System Settings > Privacy & Security > Full Disk Access and add your terminal app (Terminal, iTerm, Ghostty, etc.)

Without this, the server exits immediately with authorization denied.

2

Install the iMessage plugin

Open Claude Code and run:

/plugin install imessage@claude-plugins-official

If it says plugin not found, run /plugin marketplace update claude-plugins-official first, then retry.

3

Relaunch with the channel flag

Exit Claude Code and restart with:

claude --channels plugin:imessage@claude-plugins-official

The server won't connect without this flag. Check that /imessage:configure tab-completes to confirm it's running.

4

Text yourself

Open Messages on any device signed into your Apple ID and send a message to yourself. It reaches Claude immediately. Self-chat bypasses access control with no setup.

The first reply Claude sends triggers a macOS Automation prompt asking if your terminal can control Messages. Click OK.

5

Allow other senders

By default, only your own messages get through. Everyone else is dropped silently. To let another contact reach Claude:

/imessage:access allow +15551234567

Handles are phone numbers in +country format or Apple ID emails like them@icloud.com.

After setup
6

Disable the "Sent by Claude" signature

Every outbound message appends "Sent by Claude" by default. To turn it off, set this in your shell environment before launching Claude Code:

export IMESSAGE_APPEND_SIGNATURE=false

7

Approve permission prompts from your phone

When Claude hits a permission prompt while you're away from the terminal, it forwards the prompt to your iMessage. Reply yes or no to approve or deny remotely. Only allowlisted senders can approve permissions.

Before you start

!
macOS only. The plugin reads the native Apple Messages database at ~/Library/Messages/chat.db. There's no Windows or Linux equivalent.
!
Bun is required. The plugin is a Bun script. Check with bun --version. If missing, install Bun first.
!
Claude Code v2.1.80+ required. Channels are a research preview feature. Check with claude --version.
!
If you click "Don't Allow" on the Full Disk Access prompt, the server dies. You have to grant it manually in System Settings. There's no second prompt.
Start here

Run /plugin install imessage@claude-plugins-official in Claude Code, exit, relaunch with claude --channels plugin:imessage@claude-plugins-official, then text yourself. Working in under 2 minutes.

Sources

iMessage channel docs
Official setup guide. Full Disk Access, plugin install, pairing, allowlists, and security model.
code.claude.com/docs/en/channels#imessage
iMessage plugin source
Full source code. server.ts reads chat.db directly, sends via AppleScript. Access control, environment variables, and tool reference.
github.com/anthropics/claude-plugins-official

FAQ

Do I need a bot or API token?
No. The iMessage channel reads your Mac's Messages database directly and sends replies via AppleScript. No external server, no bot token, no third-party service.
Does this work on Windows?
No. iMessage is macOS only. It reads the native Apple Messages database. For Windows or Linux, use the Telegram or Discord channel plugins instead.
Can other people text my Claude Code?
Only if you explicitly allowlist them with /imessage:access allow. By default, only your own messages (self-chat) get through. Everyone else is dropped silently with no auto-reply.
Can Claude send images through iMessage?
Yes. Files are sent as separate messages after the text. Inbound images are also surfaced to Claude as local file paths it can read.