Twilio MCP Server
Expose Twilio's public REST APIs (SMS, Voice, Verify, Video, Studio, TaskRouter, and more) as MCP tools, with filtering by service or tag.
The Twilio MCP server is an alpha, proof-of-concept project from Twilio's ETI team that exposes Twilio's public REST APIs as Model Context Protocol tools. It is distributed as a monorepo with two npm packages: @twilio-alpha/mcp, which wraps the Twilio APIs directly, and @twilio-alpha/openapi-mcp-server, a generic server that turns any OpenAPI specification into MCP tools.
The MCP package covers 40+ Twilio product surfaces, including Messaging (SMS), Voice, Verify, Video, Lookups, Conversations, Studio, TaskRouter, Flex, Serverless, Sync, Numbers, Trust Hub, Intelligence, and the core api.twilio.com resource set. Because Twilio's full API surface is large, the server supports --services and --tags flags so you can load only the endpoints relevant to your workflow and keep the MCP tool list within model context limits.
Authentication uses standard Twilio Account SID plus API Key/Secret credentials, passed as a single positional argument in the form ACCOUNT_SID/API_KEY:API_SECRET. The project is officially maintained under the twilio-labs org but is published under the @twilio-alpha scope, indicating it is still experimental.
Tools
| Tool | Description |
|---|---|
Twilio REST endpoints (dynamic) |
Each Twilio REST API endpoint is exposed as an individual MCP tool, generated from Twilio's OpenAPI specs. Tool names map to the endpoint operations (e.g. create/list/fetch/update/delete resources) in the selected services. |
--services filter |
CLI flag that selects which Twilio service specs to load (e.g. twilio_messaging_v1, twilio_voice_v1, twilio_verify_v2). Pass an empty string to filter only by tags. |
--tags filter |
CLI flag that limits the loaded tools to specific OpenAPI tags within the selected services. |
@twilio-alpha/openapi-mcp-server |
Companion package that turns any directory of OpenAPI YAML specs into MCP tools, with pluggable hooks for capabilities, request bodies, and response transformation. |
Prerequisites
- Node.js 18+ and npm 9+
- A Twilio account
- A Twilio API Key and Secret (create one in the Twilio Console under Account > API keys & tokens)
- Your Twilio Account SID
Install and run
The server is run via npx, no manual install needed:
npx -y @twilio-alpha/mcp YOUR_ACCOUNT_SID/YOUR_API_KEY:YOUR_API_SECRET
Claude Desktop / MCP client config
Add the following to your MCP client config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"twilio": {
"command": "npx",
"args": [
"-y",
"@twilio-alpha/mcp",
"YOUR_ACCOUNT_SID/YOUR_API_KEY:YOUR_API_SECRET"
]
}
}
}
Filter the API surface
Twilio exposes a very large API. Use --services and/or --tags to reduce the loaded tool count so it fits in your model's context window.
Load only the Serverless API:
"args": [
"-y",
"@twilio-alpha/mcp",
"YOUR_ACCOUNT_SID/YOUR_API_KEY:YOUR_API_SECRET",
"--services", "twilio_serverless_v1"
]
Load only specific resources by tag:
"args": [
"-y",
"@twilio-alpha/mcp",
"YOUR_ACCOUNT_SID/YOUR_API_KEY:YOUR_API_SECRET",
"--services", "",
"--tags", "Api20100401IncomingPhoneNumber,StudioV2Flow"
]
Common service names include twilio_api_v2010 (core API, SMS/calls/phone numbers), twilio_messaging_v1, twilio_voice_v1, twilio_verify_v2, twilio_video_v1, twilio_lookups_v2, twilio_conversations_v1, twilio_studio_v2, twilio_taskrouter_v1, twilio_flex_v2, and twilio_numbers_v2.
Security note
The Twilio README recommends against running community Twilio MCP servers alongside this official one, since malicious tool definitions could exfiltrate account data.
- Send SMS, MMS, and WhatsApp messages from an AI agent by loading
twilio_api_v2010ortwilio_messaging_v1and calling the Messages endpoint. - Programmatically place outbound calls or fetch call logs and recordings using the Voice and core API tools.
- Run phone number verification flows (Verify v2) for OTP and 2FA workflows triggered by an agent.
- Search, buy, and configure phone numbers via the Numbers and IncomingPhoneNumbers endpoints.
- Inspect and modify Studio flows, TaskRouter workspaces, or Conversations from a chat-based developer assistant.
- "Send an SMS from my Twilio number +15551234567 to +15557654321 saying 'Your order has shipped.'"
- "List the last 10 incoming calls on my Twilio account and summarize them."
- "Start a Verify v2 verification by SMS for +447700900123 and then check the code 482910."
- "Search for available US local phone numbers in area code 415 and buy the first one."
- "Show me all active Studio flows and dump the JSON for the one named 'Lead Router'."
- Officially published by
twilio-labs, the Twilio engineering org. - Broad coverage of 40+ Twilio products generated directly from Twilio's OpenAPI specs, so it stays close to the underlying REST API.
- Built-in
--servicesand--tagsfiltering to manage the very large tool surface and stay within model context limits. - Includes a reusable
@twilio-alpha/openapi-mcp-serverfor wrapping arbitrary OpenAPI specs as MCP tools.
- Published under the
@twilio-alphascope and labeled by the maintainers as a proof-of-concept, so it is not yet GA. - Loading the full Twilio API surface produces a very large tool list that will overwhelm most models unless filtered.
- README does not document a built-in docs/spec search tool; you must know which Twilio service or tag you want and pass it explicitly.
- SendGrid MCP style community servers for email-only workflows (SendGrid is a Twilio product).
- Vonage / MessageBird community MCP servers for alternative CPaaS providers.
- Building a custom MCP server with
@twilio-alpha/openapi-mcp-serverover a trimmed Twilio OpenAPI spec if you only need a few endpoints.