Twilio
The Twilio connector lets AI agents send SMS and MMS messages, initiate phone calls, browse message and call history, and manage phone numbers — all through the Twilio REST API. Twilio authenticates with an Account SID and Auth Token (API key pair) rather than OAuth. Both values are stored encrypted in MCPGate's vault and are never exposed to the AI client.
Protect number management tools
twilio_buy_number charges your Twilio account and twilio_release_number permanently releases a phone number. Deny both tools in any app that only needs to send messages or make calls.Authentication#
Twilio uses API key authentication. When connecting, provide your Twilio Account SID as the API Key and your Auth Tokenas the API Secret. Both are available in the Twilio Console under Account › API keys & tokens.
Tool reference#
The Twilio connector exposes 9 tools: 5 read, 3 write, and 1 delete. Use the MCP Apps page to enable or disable individual tools per app, and the Guardrails page to add fine-grained rules on top.
| Tool | Category | Description |
|---|---|---|
| twilio_list_messages | read | List SMS/MMS messages for the Twilio account |
| twilio_get_message | read | Get a specific Twilio message by SID |
| twilio_list_numbers | read | List phone numbers owned by the Twilio account |
| twilio_list_calls | read | List calls made or received by the Twilio account |
| twilio_get_call | read | Get a specific Twilio call by SID |
| twilio_send_sms | write | Send an SMS or MMS message via Twilio |
| twilio_create_call | write | Initiate an outbound phone call via Twilio |
| twilio_buy_number | write | Purchase a new phone number for the Twilio account |
| twilio_release_number | delete | Release (delete) a phone number from the Twilio account |
Common guardrail recipes#
Send-only access#
Enable read tools plus twilio_send_sms and twilio_create_call. Deny twilio_buy_number and twilio_release_number. This lets the agent communicate with customers without touching account-level phone number management.
Restrict the sender number#
Apply the allow_values template to twilio_send_sms and twilio_create_call, targeting the from field. Provide the specific Twilio phone number(s) the agent is permitted to use. This prevents the agent from sending from unintended numbers.
Restrict recipients#
Apply the allow_values template to twilio_send_sms and twilio_create_call, targeting the to field. Provide a list of allowed phone numbers in E.164 format. This is critical for test environments where you want to prevent the agent from messaging real customers.
Troubleshooting#
- Authentication error 20003 — The Account SID or Auth Token is incorrect. Verify both values in the Twilio Console and reconnect the Twilio connector.
- SMS fails with error 21211 — The
tophone number is not a valid E.164 number. Ensure numbers include the country code prefix (e.g.+14155551234). - Trial account restrictions — Twilio trial accounts can only send to verified phone numbers. Upgrade to a paid account or verify the recipient number in the Twilio Console.