# Connect CrewAI agents to a NZ phone number, SMS and email

**Short answer:** Add an MCPServerHTTP to your CrewAI agent's mcps list with url https://agentline.nz/mcp and an Authorization: Bearer header holding your Agentline NZ API key. The agent can then text from a New Zealand 028 number, read and send email and wait for one-time codes as part of its tasks.

## Before you start

- An Agentline NZ API key from Dashboard → API keys, exported as AGENTLINE_KEY. 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.

## Steps

1. **Install the MCP dependency.** In your CrewAI project, add the mcp package.

   ```bash
   uv add mcp
   ```

2. **Add Agentline NZ to an agent.** Use the mcps field, which CrewAI's docs mark as the recommended way.

   ```python
   import os
   from crewai import Agent
   from crewai.mcp import MCPServerHTTP

   concierge = Agent(
       role="Booking concierge",
       goal="Confirm bookings by text and handle replies",
       backstory="You send short, polite transactional texts for a New Zealand business.",
       mcps=[
           MCPServerHTTP(
               url="https://agentline.nz/mcp",
               headers={"Authorization": f"Bearer {os.environ['AGENTLINE_KEY']}"},
               streamable=True,
               cache_tools_list=True,
           )
       ],
   )
   ```

3. **Run your crew.** Give the agent a task such as: Text the customer to confirm their 7pm booking and report any reply.

## Good to know

- CrewAI logs and skips an MCP server that fails to connect instead of raising an error, so check the logs if the tools are missing.
- Don't use the string-URL form with the key in a query string. Keep the key in the header.
- Transactional and assistant messages only: replies, bookings, confirmations, reminders people asked for, and codes.

## FAQ

### 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

- [Connect LangChain and LangGraph agents to a NZ phone number, SMS and email](/integrations/langchain)
- [Connect the OpenAI Agents SDK to a NZ phone number, SMS and email](/integrations/openai-agents-sdk)
- [Who can my agent text and email with Agentline NZ?](/help/who-can-my-agent-text)

[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.
