Skip to main content
T

Twilio

@codespar/mcp-twilio Β· v0.2.2

🌐 GlobalMessagingAuth · API Keybeta22 tools3 env vars

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

Get started Β· freeView docs

MIT Β· runs locally or through the CodeSpar runtime

Package
@codespar/mcp-twilio
Version
0.2.2
npm dist-tag
latest
Category
Messaging
Auth
API Key
Country
🌐 Global
License
MIT
Transport
stdio Β· streamable-http

Quickstart

Install, set the credentials, make the first call.

Pick your client. The server runs locally over stdio, or through the hosted runtime.

Add the server to your clientOne config entry. No build step, no SDK required.
Set the environment variables3 variables read by this server's code, listed below.
Restart and make the first callThe agent can call any of the 22 tools. Try send_message first.
terminal
# Claude Code claude mcp add twilio -e TWILIO_ACCOUNT_SID=… -e TWILIO_AUTH_TOKEN=… -e TWILIO_MESSAGING_SERVICE_SID=… -- npx -y @codespar/mcp-twilio@0.2.2 # then: /mcp to confirm the server is connected
Environment variables3 variables
TWILIO_ACCOUNT_SIDTwilio Account SID (starts with AC...). Used as username for HTTP Basic auth.required
TWILIO_AUTH_TOKENTwilio Auth Token. Used as password for HTTP Basic auth.requiredsecret
TWILIO_MESSAGING_SERVICE_SIDOptional default Messaging Service SID (starts with MG...) used for send_message when From is omitted.optional

Names read from the package code (@codespar/mcp-twilio@0.2.2). Descriptions and flags come from its manifest. Self-hosted, you hold the credentials. On the CodeSpar runtime the credential you connect is stored encrypted (AES-256-GCM, key derived per organization), and the runtime adds it to the provider call itself; the agent never receives it.

First call demosend_message

"Send an SMS or WhatsApp message. For WhatsApp, prefix `To`"

tools/callsend_messageresult returned

Tools

What your agent can call.

22 tools, as the package's tools/list returns them.

send_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.

get_message

Retrieve a message resource by SID (SM... or MM...).

list_messages

List messages with optional filters. Returns Twilio's paginated list; pass PageSize to cap.

delete_message

Delete a message from history. Irreversible.

make_call

Place an outbound voice call. Twilio fetches TwiML from `Url` on connect to drive the call.

get_call

Retrieve a call resource by SID (CA...).

update_call

Modify an in-progress call. Set Status='completed' to hang up, or pass a new Url to redirect the call to fresh TwiML.

start_verification

Start a Verify (2FA) challenge. Sends a one-time code to `To` via the chosen channel. Requires a Verify Service SID (VA...).

check_verification

Check a Verify (2FA) code against a Service SID. Returns status=approved when the code matches.

lookup_phone

Validate and normalize a phone number via Lookups v2. Optional `Fields` lets you request carrier info, line_type_intelligence, caller_name, identity_match, etc.

list_incoming_numbers

List Twilio-provisioned phone numbers on this account. Filter by PhoneNumber (partial), FriendlyName, or Beta.

buy_phone_number

Provision a new phone number. Supply either a specific `PhoneNumber` (from AvailablePhoneNumbers search) or an `AreaCode` to let Twilio pick one.

Names and descriptions come from the package's tools/list (@codespar/mcp-twilio@0.2.2). A kind (read, write, delete) is shown only when the package annotates its tools or each tool was verified one by one; neither exists for this server yet.

Compatibility

MCP is a protocol. Any client that speaks it can mount this server.

Through the CodeSpar runtime, codespar_discover finds this server's tools, and a tools/call runs with the credential connected in your project, a test key included.

hostedhttps://connect.codespar.dev/mcp15 meta-tools

Protocol

Any MCP client

stdio Β· streamable-http

Questions

Before you install.

How do I install the Twilio MCP server?

Run npx -y @codespar/mcp-twilio@0.2.2 and add the config block above to your MCP client: Claude Code, Cursor, Claude Desktop, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? Add the CodeSpar endpoint with a test key and connect Twilio in your project; codespar_discover finds its tools.

What can my agent do with Twilio?

Twilio exposes 22 tools for messaging. Your agent calls them directly; the full list is above.

How does Twilio authenticate, and how are credentials stored?

Twilio uses API Key. Self-hosted, you hold the credentials: the server reads them from its environment variables. On the CodeSpar runtime the credential you connect is stored encrypted for your organization, and the runtime adds it to each provider call, so the agent never handles it.

How does Twilio handle upstream API changes?

Every server is versioned independently on npm. The command on this page pins 0.2.2, the version whose tools are listed here; your agent keeps running it until you change the version.

Is Twilio open source? How do I report a bug?

Yes. Twilio is MIT-licensed and published on npm as @codespar/mcp-twilio, source on GitHub (link in the Details panel). Report issues on the package repository; security issues go to security@codespar.dev, and we respond within 24 hours.

Start in seconds.

On the CodeSpar runtime, the credential you connect stays encrypted for your organization and the runtime adds it to each call. You just call the tool.

Start in seconds demo
Create an account and copy a test key.
Add the hosted endpoint to your client with the config above.
Connect Twilio in your project and ask your agent for the first call.
Twilio β€” MCP server Β· 22 tools | CodeSpar