Connect Twilio to Claude Code
Send SMS, read message and call logs, and look up phone numbers. Add Toolspoke to Claude Code once and it can use 9 Twilio actions. Your Twilio credential stays in Toolspoke, and you choose which actions Claude Code may call.
Set it up in Claude Code
Three steps, the first one once for every toolkit you will ever add.
Add Toolspoke to Claude Code
Run it in your project, then /mcp to sign in
claude mcp add --transport http toolspoke https://toolspoke.com/mcpThe sign-in opens in your browser, and Toolspoke asks you to approve it.
Install Twilio and connect it
Add Twilio to a project in your Toolspoke workspace.
Account SID and auth token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- Account SID
- The 34-character Account SID starting with AC, from Console → Account Info. Every account-scoped path in this connector is built from it, which is why it is asked for separately from the token below.
- Account SID and auth token
- Paste the Account SID, a colon, then the auth token, both from Console → Account Info. Twilio reads HTTP Basic with the SID as the username and the auth token as the password, so this one field is what gets base64-encoded into the Authorization header. A subaccount works too: use that subaccount's own SID in both fields.
Choose what Claude Code may do
All 9 actions start on. Switch off the one action that changes something in Twilio, and Claude Code gets a refusal if it tries.
What you can ask Claude Code for
A few of the Twilio actions that only read, so they are safe to try first.
- List messages sent and received on this account, newest first
- Retrieve one message by SID, with its body, status, error code, direction, segment count and price
- List voice calls on this account, newest first
- Retrieve one call by SID: its status, direction, duration, price, and the numbers at both ends
What Claude Code can do in Twilio
8 actions read and one deletes or permanently changes something.
Reads
List messages
List messages sent and received on this account, newest first. Filter by the number at either end, or by the date sent. Twilio's date filters are inclusive on both sides.
Get message
Retrieve one message by SID, with its body, status, error code, direction, segment count and price.
List calls
List voice calls on this account, newest first. Filter by the number at either end, by call status, or by when the call started. Returns call metadata, who called whom, for how long, at what price, and never recording audio.
Get call
Retrieve one call by SID: its status, direction, duration, price, and the numbers at both ends.
List phone numbers
List the phone numbers this account owns, with their capabilities and the webhooks configured on each. Call it before send_sms to find a number you can legitimately send from.
Get account balance
Return the account's remaining Twilio balance and its currency. Takes no arguments, reads nobody's messages and costs nothing, which is why it is what an install tests itself with.
Lookup phone number
Look up a phone number through the Lookup v2 API: whether it is valid, its country, and, when you ask for them, its line type, carrier, or the name it is registered to. Data packages beyond the free validation are billed per lookup, so ask only for the ones you need. This is the one action on a different host: Lookup lives at lookups.twilio.com, not api.twilio.com.
List usage records
List usage and spend on this account, one record per billing category. Use it to answer what a month of messaging cost. Category is a Twilio usage category name such as sms, calls or lookups; leave it out for every category.
Deletes or permanently changes
Send sms
Send an SMS or MMS from a Twilio number. This is classified destructive rather than write, and deliberately so: it delivers a message to a real handset, it cannot be recalled once sent, and Twilio bills per segment. A write grant can read every log in this connector and send nothing. Supply either from (a Twilio number you own, in E.164) or messaging_service_sid (a Messaging Service that picks the number for you). Twilio rejects the request if neither is present.
Twilio in Claude Code: questions
Does Claude Code see my Twilio credential?
No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.
Can I stop Claude Code from changing things in Twilio?
Yes. Each of the 9 actions can be switched off for a project. Turn off the one that changes something and Claude Code can only read.
Will 9 actions crowd Claude Code's context?
No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Twilio action it needs when it needs it. Adding more toolkits does not add more tools to its list.
Can I add it once for every project?
Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.
What does it cost?
Tool calls are free on every plan, and a Twilio call does not run in a sandbox, so it bills nothing.
Twilio in your other apps
Try Twilio in Claude Code
Free to start, and tool calls cost nothing on any plan.