# mcp-twilio

Wires Twilio into your agent: SMS and WhatsApp sending, outbound calls, Verify codes for 2FA, and phone validation through Lookups.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/communication/twilio
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-twilio

## What it does

Twenty-two Twilio tools land in the agent's toolkit. `send_message` fires off an SMS or a WhatsApp note, `make_call` dials a number, `start_verification` and `check_verification` run a 2FA challenge, and `lookup_phone` checks a number against Lookups v2 and normalizes it. A second batch covers Conversations, Messaging Services, Studio Flows and TaskRouter, from opening a chat thread to creating a queue task for a worker.

Set `TWILIO_ACCOUNT_SID` and `TWILIO_AUTH_TOKEN` before anything else. There is no working server without them. The Basic auth header gets built internally from that pair, so you never write it yourself. For WhatsApp, put `whatsapp:` in front of both numbers, e.g. `whatsapp:+5511999999999`, and the sender has to be WhatsApp-enabled. `TWILIO_MESSAGING_SERVICE_SID` picks the default sender for `send_message`; Verify calls need a Service SID each time.

Stdio is the default transport and covers Cursor and Claude Desktop. An HTTP mode exists for server-to-server testing: `MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-twilio`. Real messages and number purchases bill your Twilio account, so lock down `buy_phone_number` and `delete_message` if the agent runs unattended.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO_MESSAGING_SERVICE_SID` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env TWILIO_ACCOUNT_SID=<TWILIO_ACCOUNT_SID> --env TWILIO_AUTH_TOKEN=<TWILIO_AUTH_TOKEN> --env TWILIO_MESSAGING_SERVICE_SID=<TWILIO_MESSAGING_SERVICE_SID> --transport stdio twilio -- npx -y @codespar/mcp-twilio
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add twilio --env TWILIO_ACCOUNT_SID=<TWILIO_ACCOUNT_SID> --env TWILIO_AUTH_TOKEN=<TWILIO_AUTH_TOKEN> --env TWILIO_MESSAGING_SERVICE_SID=<TWILIO_MESSAGING_SERVICE_SID> -- npx -y @codespar/mcp-twilio
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "twilio": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-twilio"
            ],
            "env": {
                "TWILIO_ACCOUNT_SID": "<TWILIO_ACCOUNT_SID>",
                "TWILIO_AUTH_TOKEN": "<TWILIO_AUTH_TOKEN>",
                "TWILIO_MESSAGING_SERVICE_SID": "<TWILIO_MESSAGING_SERVICE_SID>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "twilio": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-twilio"
            ],
            "env": {
                "TWILIO_ACCOUNT_SID": "<TWILIO_ACCOUNT_SID>",
                "TWILIO_AUTH_TOKEN": "<TWILIO_AUTH_TOKEN>",
                "TWILIO_MESSAGING_SERVICE_SID": "<TWILIO_MESSAGING_SERVICE_SID>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e TWILIO_ACCOUNT_SID=<TWILIO_ACCOUNT_SID> -e TWILIO_AUTH_TOKEN=<TWILIO_AUTH_TOKEN> -e TWILIO_MESSAGING_SERVICE_SID=<TWILIO_MESSAGING_SERVICE_SID> twilio npx -y @codespar/mcp-twilio
```
Replace <…> with your own values

## When to use it
- send an SMS or WhatsApp message from inside an agent task
- verify a customer's phone with a Verify code
- check and normalize a phone number before storing it
- place a call and pull the recording list
- provision a number and add a participant to a Conversation

## Example prompts
- Send an SMS to +5511999999999 saying the order is ready, use `send_message`
- Run `lookup_phone` on +14155552671 and tell me whether it's a mobile line
- Check the Verify code against this Service SID with `check_verification`

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
