# How to give Claude Code a phone number, text and email in New Zealand

**Short answer:** Run claude mcp add --transport http agentline https://agentline.nz/mcp, then type /mcp inside Claude Code and follow the browser sign-in to connect your Agentline NZ account. Claude Code can then send and read SMS from a New Zealand 028 number and use an @agentline.nz inbox, for example to text you when a long job finishes or to test the emails and texts your own app sends.

## Before you start

- An Agentline NZ account. Start free with an email inbox (no card), or take a 7-day trial of Starter or Pro to get a number.
- Your 028 number is set up within a few days of signup. Your email inbox works straight away.
- Claude Code installed and signed in.

## Steps

1. **Add the Agentline NZ server.** In your terminal, run the command below. It uses the default local scope, which means just you, in the current project.

   ```bash
   claude mcp add --transport http agentline https://agentline.nz/mcp
   ```

2. **Pick a different scope if you need one.** Add --scope user to use Agentline NZ in all your projects, or --scope project to share it with your team through a .mcp.json file in the project root.

   ```bash
   claude mcp add --transport http agentline --scope user https://agentline.nz/mcp
   ```

3. **Sign in.** Start Claude Code, run /mcp, choose agentline and follow the steps in your browser to sign in with your Agentline NZ email link. From a shell you can run claude mcp login agentline instead.

4. **Check it works.** Ask Claude Code: What's my Agentline NZ number? It should call the get_my_number tool.

## Using an API key instead of OAuth

For CI or headless runs, create a key under **Dashboard → API keys** and pass it as a header. Anthropic notes that `claude -p` and Agent SDK runs can't complete an OAuth sign-in, so either sign in interactively first or use a header:

```bash
claude mcp add --transport http agentline https://agentline.nz/mcp \
  --header "Authorization: Bearer $AGENTLINE_KEY"
```

Anthropic says a rejected `Authorization` header doesn't fall back to OAuth, so a wrong key shows up as an error rather than a sign-in prompt.

## Try it

Once it's connected, ask your assistant:

- "Text my mobile when the test suite finishes, with a one-line summary."
- "Trigger the booking-confirmation email in staging to my Agentline NZ address and check the wording."

## Good to know

- Adding the same server name twice in the same scope fails. Remove it first with claude mcp remove agentline.
- Project-scoped servers ask each teammate for approval the first time.
- Standard NZ mobile numbers only (020–029). No landlines, short codes, premium or international numbers.

## FAQ

### Where does Claude Code store the Agentline NZ config?

Local and user scopes are stored in ~/.claude.json. Project scope is stored in .mcp.json in the project root, so don't put an API key in it if you commit that file.

### How do I sign out of Agentline NZ in Claude Code?

Run claude mcp logout agentline, or use Clear authentication in the /mcp menu.

### What does Agentline NZ cost?

Starter is NZ$29/month and Pro is NZ$79/month, billed in NZ dollars. Start free with an email inbox (no card), or take a 7-day trial of Starter or Pro to get a number. Agentline NZ is not GST-registered, so no GST is charged.

### How long does it take to get the 028 number?

Your 028 number is set up within a few days of signup. Your email inbox works straight away. Full refund if your number hasn't arrived within 30 days of paying.

### Can my assistant send marketing or bulk texts?

No. Transactional and assistant messages only: replies, bookings, confirmations, reminders people asked for, and codes. Marketing, promotions, cold texts and bulk texts are blocked. See [What we don't allow](/what-we-dont-allow).

## Related

- [How to give Claude a phone number, text and email in New Zealand](/guides/claude)
- [How to give Cursor a phone number, text and email in New Zealand](/guides/cursor)
- [How do I create an Agentline NZ API key?](/help/how-to-create-an-api-key)

[Start free](https://agentline.nz/signup) · Start free with an email inbox (no card), or take a 7-day trial of Starter or Pro to get a number.
