Twilio MCP server

Messaging and email

MCP server for Twilio, global SMS, WhatsApp, Voice, Verify, and Lookup across 180+ countries.

Your AI app calls the Twilio MCP server, which does the messaging and email work and sends the result back to the chat.

About Twilio

Twilio is a community MCP server from codespar, filed in our directory under messaging and email. MCP server for Twilio, global SMS, WhatsApp, Voice, Verify, and Lookup across 180+ countries.

Twilio runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-twilio@0.2.2 and talks to it over standard input and output. It needs TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN set before Twilio starts.

Twilio is listed in the official MCP registry as io.github.codespar/mcp-twilio, version 0.2.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-twilio
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-twilio

How to set up Twilio

  1. Install Node.js on the machine that runs your AI app, because Twilio starts with npx and downloads its package on first run.
  2. Create TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN for Twilio in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Twilio to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Twilio tools to confirm the connection.
  5. Run one read-only task with Twilio first, and keep your app asking before each tool call until the results look right.

Twilio compared with similar servers

  • Whatsapp Cloud by codespar has fewer GitHub stars than Twilio (278 against 278); both are community servers, and both run locally.
  • Sendgrid by codespar has fewer GitHub stars than Twilio (278 against 278); both are community servers, and both run locally.
  • Z API by codespar has fewer GitHub stars than Twilio (278 against 278); both are community servers, and both run locally.

Before you connect Twilio

  • Give Twilio its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Twilio tool call until you trust what it does with them.
  • Treat text that Twilio fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Twilio on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Twilio

How marketing and sales teams put Twilio to work, by company size. Pick the size closest to yours and start Twilio on one use case.

Small business

  • A small team can have Twilio summarize the inbox or channel each morning, so nothing from a customer waits until the afternoon.
  • Owners can draft replies and follow-ups with Twilio and send them only after a read, keeping the personal tone customers expect.
  • Twilio runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing teams can use Twilio to turn long launch threads into decisions, owners and dates that land in the project tracker.
  • Sales and success teams can connect Twilio so an agent drafts follow-ups after every customer call, ready to edit and send.
  • Start Twilio on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can deploy Twilio with retention and data loss rules intact, so agents summarize conversations without moving data outside policy.
  • Internal comms teams can use Twilio to find what employees ask most across channels and answer it once, in the right place.
  • Twilio is a community server, so have security review the code and pin a version before Twilio touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Twilio README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@codespar/mcp-twilio

MCP server for Twilio, the global standard for programmable messaging and voice.

SMS, WhatsApp, and Voice across 180+ countries. Verify (2FA) and Lookup (phone validation) included. Fills the global messaging gap in a catalog otherwise tilted to Brazil-specific providers (Z-API, Take Blip, Zenvia, Evolution API).

Tools (22)

Tool Purpose
send_message Send an SMS or WhatsApp message.
get_message Retrieve a message resource by SID (SM...
list_messages List messages with optional filters.
delete_message Delete a message from history.
make_call Place an outbound voice call.
get_call Retrieve a call resource by SID (CA...).
update_call Modify an in-progress call.
start_verification Start a Verify (2FA) challenge.
check_verification Check a Verify (2FA) code against a Service SID.
lookup_phone Validate and normalize a phone number via Lookups v2.
list_incoming_numbers List Twilio-provisioned phone numbers on this account.
buy_phone_number Provision a new phone number.
list_recordings List call recordings on this account.
create_verify_service Create a Verify Service (VA...).
create_conversation Create a Twilio Conversation.
list_conversations List Conversations.
add_conversation_participant Add a participant to a Conversation.
send_conversation_message Post a message into a Conversation.
list_messaging_services List Messaging Services (MG...).
execute_studio_flow Trigger a Studio Flow Execution for a contact.
create_taskrouter_task Create a TaskRouter Task on a Workspace.
list_taskrouter_workers List Workers on a TaskRouter Workspace.

Install

npm install @codespar/mcp-twilio

Environment

TWILIO_ACCOUNT_SID="AC..."             # required
TWILIO_AUTH_TOKEN="..."                # required (secret)
TWILIO_MESSAGING_SERVICE_SID="MG..."   # optional; default sender for send_message

Authentication

HTTP Basic auth with AccountSid:AuthToken. The server handles this automatically, you only configure the env vars.

Authorization: Basic <base64(AccountSid:AuthToken)>

API surface

  • Main Accounts API: https://api.twilio.com/2010-04-01/Accounts/{AccountSid}, Messages, Calls, IncomingPhoneNumbers
  • Verify API: https://verify.twilio.com/v2, 2FA flows (requires a Verify Service SID passed per call)
  • Lookups API: https://lookups.twilio.com/v2, phone number validation / carrier / line type

Request bodies are application/x-www-form-urlencoded; responses are JSON (endpoints use the .json suffix on the Accounts API).

WhatsApp

Use the same send_message tool, but prefix numbers with whatsapp::

{ "To": "whatsapp:+5511999999999", "From": "whatsapp:+14155238886", "Body": "Olá" }

Sandbox numbers or approved WhatsApp-enabled senders work the same way.

Run

# stdio (default, for Claude Desktop, Cursor, etc)
npx @codespar/mcp-twilio

# HTTP (for server-to-server testing)
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-twilio

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Questions about Twilio

What is the Twilio MCP server?

MCP server for Twilio, global SMS, WhatsApp, Voice, Verify, and Lookup across 180+ countries. Twilio is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Twilio MCP server?

Add Twilio to your AI app's MCP config with the command npx -y @codespar/mcp-twilio@0.2.2. In Claude Code, run claude mcp add --transport stdio codespar-twilio -- npx -y @codespar/mcp-twilio@0.2.2. To run Twilio this way you need Node.js installed.

Does Twilio need an API key?

Yes. Twilio expects TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN to be set. Create the key for Twilio in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Twilio an official MCP server?

No. Twilio is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Twilio access to company data.

What license is Twilio under?

Twilio is released under the MIT license, according to its GitHub repository. The license covers the code of Twilio; the service it connects to has its own terms.