To connect Claude Code to WhatsApp, add the Instant Reply MCP server and sign in. Claude Code then gets four tools. It can text you when a task is done, ask you Yes or No before it deploys, and read what you type back.
What you get#
Instant Reply calls this feature Agent Line. It is a WhatsApp chat between you and your coding agent. The messages come from Instant Reply's own WhatsApp number and go to your personal number. You do not need the WhatsApp Business API or a number of your own on it.
Claude Code gets four tools through MCP, the Model Context Protocol. Any other agent that speaks MCP gets the same four.
| Tool | What it does | Input |
|---|---|---|
| notify_owner | Sends you an update | Text, 1 to 1,000 characters |
| ask_owner | Asks you Yes or No and waits | A question up to 600 characters, optional details up to 1,000 |
| get_owner_answer | Checks an answer later | The id from ask_owner |
| read_owner_messages | Reads what you typed to the agent | None |
Before you start#
You need three things.
- An Instant Reply workspace on a plan whose API keys can write. Free and Creator keys are read-only, so they cannot send or ask.
- A WhatsApp number you can verify. It can be your personal number.
- Claude Code installed on your computer.
Connect Claude Code in five steps#
- Open Settings in Instant Reply and find WhatsApp Alerts. Enter your number and type the 6-digit code that arrives on WhatsApp.
- Tap Open WhatsApp on the Agent Line card in Settings. Send the message it fills in, "Hi, connect my agent." The words "connect my agent" tell Instant Reply the message is for Agent Line. You get a reply that says you are connected.
- Add the server to Claude Code. Run the first command below in your terminal, then sign in through the browser when Claude Code asks.
- Prefer a key, or using another agent? Create an API key in Settings, under API Keys, and pass it in a header as in the second command.
- Tell Claude Code when to use the tools. Paste the rule below into CLAUDE.md or AGENTS.md.
claude mcp add --transport http instantreply https://api.instantreply.co/mcp
claude mcp add --transport http instantreply https://api.instantreply.co/mcp \
--header "Authorization: Bearer ir_live_YOUR_KEY"This is the rule from the Agent Line card, word for word:
When you finish a task, tell me with notify_owner. Before you post, deploy, send anything to customers or spend money, ask me with ask_owner and wait for my answer. Read my instructions with read_owner_messages.Good to know: a browser sign-in key can send updates and ask questions. It cannot answer a question for you, so an agent cannot approve its own request.
Note: the local npm package, @instantreply.co/mcp version 0.8.0, does not have these four tools yet. Use the remote server above.
If you used a key, Claude Code keeps the server and its header in ~/.claude.json. Treat that file like a password. If the key leaks, delete it in Settings and make a new one.
Check that it works#
Start Claude Code and type /mcp. The instantreply server should show as connected. Then ask Claude Code to send you a test update with notify_owner.
The tool returns a field called delivered. It says how the message went out.
whatsappmeans it went to your WhatsApp chat.queued_templatemeans the chat was closed. Instant Reply sent a short template that says you have an update.emailmeans WhatsApp was not possible. The update went to your email and the bell in your dashboard.
If you get an error instead, check the troubleshooting table at the end.
How Claude Code asks you for approval#
When the rule says to ask, Claude Code calls ask_owner with a question. You get it on WhatsApp with two buttons, Yes and No. Tap one. Instant Reply replies "Got it: Yes. Your agent can go ahead." or "Got it: No."
ask_owner waits up to 55 seconds for you, 50 by default. It checks every 3 seconds. If you answer in time, Claude Code gets answer: "yes" or answer: "no". If you are slower, it gets null and the question id. It can check again later with get_owner_answer.
A question stays open for 24 hours. After that it expires, and a Yes after that gets the reply "That question is more than a day old, so it expired. Your agent can ask again."
You can also type your answer. Yes, ok, approve, go and 1 mean Yes. No, decline, stop and 2 mean No. The Arabic words for yes and no work too. A typed answer only counts when exactly one question is waiting. With two open questions, tap the button on the one you mean.
Important: a Yes or No is a message to the agent. Instant Reply does not block Claude Code on its own. Claude Code asks because your rule tells it to, and it acts on the answer it reads. Keep the rule in CLAUDE.md so it asks every time.
Talk back to the agent#
Anything you type in the chat that is not an answer goes to your agent. Claude Code reads it with read_owner_messages. You could type "Stop after the tests pass" or "Use the staging database."
Reading empties the list. Messages wait for up to 7 days, and the list keeps the latest 100.
Why some updates arrive by email#
This comes from a WhatsApp rule. Meta lets a business send normal messages for 24 hours after a person's last message to it. Meta calls this the customer service window. Once it closes, the business can send only templates that Meta has approved.
Agent Line follows that rule and stops 10 minutes early. Here is what happens to an update.
| When | What happens |
|---|---|
| You messaged Instant Reply in the last 23 hours and 50 minutes | The update arrives in WhatsApp right away |
| The chat has been quiet for longer | The update waits, and Instant Reply sends a template asking you to reply |
| Meta has not approved that template, or the send fails | The update goes to your email and the dashboard bell |
The template is called ir_agent_update. Its text is "Your AI agent has a new update for you. Reply to this message to see it." It has a Show me button. On November 8, 2026, it was still waiting for Meta's review. Until Meta approves it, updates sent after a quiet day go to email.
Tip: reply to any update to keep the chat open for another day. Each message you send restarts the clock.
The limits#
Agent Line is not unlimited. These limits come from the code.
| Limit | Value |
|---|---|
| Updates and questions per workspace | 30 per hour, counted together |
| Messages to one phone number | 60 per day |
| Update text | 1 to 1,000 characters |
| Question | Up to 600 characters, plus details up to 1,000 |
| Time to answer | 24 hours |
| Updates waiting while the chat is closed | The latest 20, for up to 7 days |
Over the limit, the API returns 429. Send one update per finished task, not one per step.
Use it without MCP#
The four tools call a small REST API. A script or a CI job can call it too. Sending and asking need the scope approvals:write. Reading answers and messages needs approvals:read.
curl -X POST https://api.instantreply.co/v1/agent/ask \
-H "Authorization: Bearer $IR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "May I deploy the pricing page fix?", "details": "Tests pass."}'
# 201 Created
# {"id": "...", "status": "pending", "expires_at": "...", "delivered": "whatsapp"}To check the answer, call GET /v1/agent/approvals/ID. The status executed means Yes and declined means No. To send an update, POST {"text": "..."} to /v1/agent/notify. Your typed messages come from GET /v1/agent/inbox. Add ?peek=true to read them without emptying the list.
What we could not confirm#
- When Meta will approve the ir_agent_update template.
- When the npm package will add the four tools.
- Delivery times. Meta delivers the message, and we have no timing data to share.
Want a team room as well as a private line? Read how to create and message WhatsApp groups with the API.
Troubleshooting#
| You see | Likely cause | Fix |
|---|---|---|
| 409 AGENT_LINE_NOT_CONFIGURED | Your WhatsApp alert number is not verified, or alerts are off | Verify the number in Settings, under WhatsApp Alerts |
| 403 Insufficient scope | A key from a Free or Creator plan | Use a key from a plan that can write |
| 429 | Over 30 messages an hour or 60 a day | Wait, then send fewer updates |
| Updates arrive by email | The WhatsApp chat was quiet for about a day | Send any message to the Instant Reply number |
| A typed yes does nothing | More than one question is waiting | Tap the button on the question you mean |
For the full feature, see Agent Line. For other agents and clients, see the Instant Reply MCP server page and the Claude Code setup page. Every endpoint is in the API reference.





