Skip to main content
TW

Twilio

v0.2.0API Key

Global SMS + WhatsApp + Voice + 2FA Verify + phone Lookup across 180+ countries. Fills the global gap in the messaging category (all other entries are BR-specific).

22 tools3 env vars๐ŸŒ GLOBALstable on npm

Install

terminal
$ npm install @codespar/mcp-twilio

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "twilio": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-twilio"
      ],
      "env": {
        "TWILIO_ACCOUNT_SID": "<your_twilio_account_sid>",
        "TWILIO_AUTH_TOKEN": "<your_twilio_auth_token>"
      }
    }
  }
}

After restart, your agent can call any of the 22 tools below โ€” try send_message first.

Environment variables ยท 3

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

TWILIO_ACCOUNT_SID
required

Twilio Account SID (starts with AC...). Used as username for HTTP Basic auth.

TWILIO_AUTH_TOKEN
requiredsecret

Twilio Auth Token. Used as password for HTTP Basic auth.

TWILIO_MESSAGING_SERVICE_SID
optional

Optional default Messaging Service SID (starts with MG...) used for send_message when From is omitted.

Available tools ยท 22

Each tool is independent โ€” your agent loads only what it needs to reduce context and response time.

WRITEsend_message
Send an SMS or WhatsApp message. For WhatsApp, prefix `To` (and `From`) with `whatsapp:+E164`. Supply either `From` (a Twilio phone number) OR `MessagingServiceSid` (a Messaging Service). If neither is given, falls back to env TWILIO_MESSAGING_SERVICE_SID.
READget_message
Retrieve a message resource by SID (SM... or MM...).
READlist_messages
List messages with optional filters. Returns Twilio's paginated list; pass PageSize to cap.
DELETEdelete_message
Delete a message from history. Irreversible.
READmake_call
Place an outbound voice call. Twilio fetches TwiML from `Url` on connect to drive the call.
READget_call
Retrieve a call resource by SID (CA...).
WRITEupdate_call
Modify an in-progress call. Set Status='completed' to hang up, or pass a new Url to redirect the call to fresh TwiML.
READstart_verification
Start a Verify (2FA) challenge. Sends a one-time code to `To` via the chosen channel. Requires a Verify Service SID (VA...).

Compatible frameworks

MCP is a protocol โ€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

All credentials are encrypted at rest in an isolated vault scoped per organization. OAuth2 tokens are automatically refreshed before expiry. Your agent code never sees raw secrets โ€” it receives scoped, short-lived session tokens.
Servers โ€” Every LatAm commerce API your agent needs | CodeSpar