mcpField
M
mcp-twilio

mcp-twilio

Local
github.com/codesparCommunication275Updated 4w ago

About mcp-twilio

mcp-twilio is an MCP server for Twilio, offering SMS, WhatsApp, voice, Verify two-factor codes, and Lookup phone validation across more than 180 countries. It is aimed at developers and agents that need global messaging and calling. It fills a global gap in a catalog that otherwise leans toward Brazil-specific providers.

Key features

  1. 01Send SMS and WhatsApp messages and look up message records
  2. 02Place, fetch, and update voice calls
  3. 03Start and check Verify two-factor codes
  4. 04Validate and normalize phone numbers with Lookups v2
  5. 05Manage Conversations, Studio Flows, and TaskRouter resources

Use cases

  1. 01Send SMS or WhatsApp notifications to users in many countries
  2. 02Issue and check one-time codes during sign-up or login
  3. 03Validate phone numbers before sending messages

MCP support

This is an MCP server that exposes 22 tools to MCP clients for calling Twilio Accounts, Verify, and Lookups APIs.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-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>"
}
}
}
}
Run commandnpx -y @codespar/mcp-twilio
Environment variables to set
TWILIO_ACCOUNT_SIDTwilio Account SID (starts with AC...). Used as username for HTTP Basic auth.
TWILIO_AUTH_TOKENSecretTwilio Auth Token. Used as password for HTTP Basic auth.
TWILIO_MESSAGING_SERVICE_SIDOptional default Messaging Service SID (starts with MG...) used for send_message when From is omitted.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-twilio0.2.2

Tools

22

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
TostringYesDestination in E.164 (e.g. +5511999999999) or `whatsapp:+E164` for WhatsApp
BodystringYesMessage text (UTF-8)
FromstringNoTwilio phone number in E.164, or `whatsapp:+E164` for WhatsApp. Omit if using MessagingServiceSid.
MediaUrlarrayNoOptional list of media URLs (MMS / WhatsApp media)
StatusCallbackstringNoWebhook URL Twilio calls on delivery-status transitions
MessagingServiceSidstringNoMessaging Service SID (MG...). Overrides env default. Omit if using From.

Details

From the project README

@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)

ToolPurpose
send_messageSend an SMS or WhatsApp message.
get_messageRetrieve a message resource by SID (SM...
list_messagesList messages with optional filters.
delete_messageDelete a message from history.
make_callPlace an outbound voice call.
get_callRetrieve a call resource by SID (CA...).
update_callModify an in-progress call.
start_verificationStart a Verify (2FA) challenge.
check_verificationCheck a Verify (2FA) code against a Service SID.
lookup_phoneValidate and normalize a phone number via Lookups v2.
list_incoming_numbersList Twilio-provisioned phone numbers on this account.
buy_phone_numberProvision a new phone number.
list_recordingsList call recordings on this account.
create_verify_serviceCreate a Verify Service (VA...).
create_conversationCreate a Twilio Conversation.
list_conversationsList Conversations.
add_conversation_participantAdd a participant to a Conversation.
send_conversation_messagePost a message into a Conversation.
list_messaging_servicesList Messaging Services (MG...).
execute_studio_flowTrigger a Studio Flow Execution for a contact.
create_taskrouter_taskCreate a TaskRouter Task on a Workspace.
list_taskrouter_workersList 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.