Back to build guides
Integration5 min read· Nov 18, 2026

Give your n8n AI agent a phone number

Point n8n's MCP Client Tool at the AgentPhone server and the AI Agent node can send texts, place calls and read replies inside a workflow. Or hit the REST API from an HTTP Request node. Both shown.

AgentPhone TeamFounders
Give your n8n AI agent a phone number

n8n's AI Agent node turns a workflow into something that reasons about its inputs and picks tools. Hand it the AgentPhone MCP server as a tool and the agent can decide to text a customer, wait for the reply, or call them, all inside the flow. If you would rather keep it deterministic, the REST API works from an HTTP Request node and inbound messages arrive on a Webhook trigger. This page shows both.

The agent route: MCP Client Tool

  1. 1Add an AI Agent node and connect a chat model.
  2. 2Under Tools, add MCP Client Tool.
  3. 3Set MCP Endpoint URL to https://mcp.agentphone.ai/mcp and Server Transport to HTTP Streamable.
  4. 4Under Authentication choose Bearer and create a credential holding your AgentPhone API key. n8n stores it in its encrypted credential store, not in the workflow JSON.
  5. 5Under Tools to Include, pick Selected and choose what the agent may use. A safe default for a support flow is send_message, get_messages, get_conversation and list_numbers, leaving buy_number and make_call out until you want them.

Now a prompt like "Reply to the customer's last message about their order and ask whether they want a replacement or a refund" lets the agent read the thread and send the reply itself.

The deterministic route: HTTP Request

For a workflow that always sends the same kind of message, skip the model and call the API directly. Set the node's Authentication to a Header Auth credential with name Authorization and value Bearer <your API key>; the key then lives in n8n's credential store, not in the node.

json
{
"method": "POST",
"url": "https://api.agentphone.ai/v1/messages",
"headers": { "Content-Type": "application/json" },
"body": {
"number_id": "num_xyz789",
"to_number": "={{ $json.phone }}",
"body": "={{ 'Hi ' + $json.firstName + ', your order ' + $json.orderId + ' shipped. Reply here with any questions.' }}"
}
}

A Shopify trigger, a Google Sheets row or a CRM webhook upstream, this node downstream and you have order updates by text in four nodes.

Receiving replies

Add a Webhook trigger node, copy its production URL, and set it as your AgentPhone project webhook from the dashboard or with POST /v1/webhooks. Every inbound SMS, iMessage, WhatsApp message or call transcript then arrives as an agent.message event with the conversation ID and recentHistory, so a Switch node can route by channel or by content, and an AI Agent node downstream has the context without a lookup.

Verify the signature in a Code node if you care about spoofing: the X-Webhook-Signature header is an HMAC over {X-Webhook-Timestamp}.{raw body} with your webhook secret.

Things to know

  • A number is $3 a month and SMS is $0.02 a segment; the $5 signup credit covers the number and about 100 segments of testing.
  • Inbound works immediately. Outbound SMS on a US number needs 10DLC registration, which we submit for you.
  • The MCP Client Tool connects over HTTPS, so it works on n8n Cloud and self-hosted alike; nothing needs to run beside n8n.
  • Keep make_call out of the agent's tool list until you have tested the prompt. Hosted calls are $0.22 a minute and real people answer them.

FAQ

Which n8n node connects to AgentPhone? The MCP Client Tool sub-node on the AI Agent node, pointed at https://mcp.agentphone.ai/mcp with Bearer authentication. For fixed messages, an HTTP Request node against the REST API is simpler.

Does it work on n8n Cloud? Yes. The MCP server is hosted and reached over HTTPS, so there is no local process to run. Self-hosted n8n works the same way.

How do inbound texts reach n8n? Through a Webhook trigger node whose URL you set as the AgentPhone project webhook. Messages from every channel arrive as one agent.message event with the recent history attached.

Can I stop the agent from buying numbers or calling? Yes. Use Tools to Include on the MCP Client Tool and select only the tools you want, such as send and read, leaving buy_number and make_call out.

What does it cost to run? $3 a month per number, $0.02 per SMS segment, $0.22 a minute for hosted calls. Signup gives $5 of credit without a card.

Ready to give your AI Agent a phone number?