Twilio SMS MCP Server
Provides tools for sending, receiving, and scheduling SMS and MMS messages, managing conversation threads, and retrieving Twilio account and phone number information.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Twilio SMS MCP Server Send a text to +12025551234 asking if they're free for lunch today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Twilio SMS MCP Server
Production-grade Model Context Protocol server for Twilio SMS.
Send, receive, schedule, redact, and inspect SMS/MMS conversations through any MCP-compatible client — VS Code Copilot, Codex CLI, Claude Desktop, and more.
Features
Tools (16)
Tool | Description |
| Send a single SMS or MMS |
| Send the same message to up to 100 recipients with bounded concurrency |
| Schedule a message for future delivery (requires Messaging Service) |
| Cancel a scheduled message |
| List outbound messages with optional filters |
| Fetch one message by SID, enriched with delivery status |
| Delete a message record from Twilio |
| NEW — Redact message body for GDPR / privacy compliance |
| List inbound webhook-captured messages |
| Merge local inbox with Twilio history for a full thread |
| Mark inbox messages as read |
| List Twilio phone numbers on the account |
| Carrier and line-type intelligence lookup |
| NEW — Validate any phone string and return E.164 + national format |
| NEW — Daily SMS/MMS usage and cost analytics |
| Account balance, status, and metadata |
Resources
URI | Description |
| High-level account summary (SID, sender, version) |
Prompts
Prompt | Description |
| AI-assisted SMS drafting given a recipient and topic |
| Summarize all messages exchanged with a number |
Production Hardening
Retry with exponential backoff on transient Twilio API errors (429, 5xx, network failures)
Webhook rate limiting — in-memory per-IP throttle (120 req/min)
Structured logging — timestamped, leveled, consistent format on stderr
Input validation — Pydantic v2 strict schemas with E.164, SID pattern enforcement
Webhook signature verification — Twilio
RequestValidatoron all inbound hooksHealth and readiness endpoints —
/healthz,/readyzfor orchestratorsDocker multi-stage build with non-root user, health checks, persistent volume
py.typedmarker for downstream type-checker compatibility
Related MCP server: Twilio MCP Server
Requirements
Python 3.11+
A Twilio account and a Twilio phone number
For scheduled messages: a Twilio Messaging Service SID
For inbound messages: a publicly reachable webhook URL
Docker Desktop (optional, for container deployment)
Quick Start
cp env.example .env # fill in your Twilio credentials; for local runs set TWILIO_DB_PATH=inbox.db
pip install -e ".[dev]"
pytest # run the test suite
python -m twilio_sms_mcp.boot # start MCP + webhook serverClient Configuration
VS Code (GitHub Copilot / Copilot Chat)
Add to your VS Code settings.json or .vscode/mcp.json:
{
"mcp": {
"servers": {
"twilio-sms": {
"command": "python",
"args": ["-m", "twilio_sms_mcp.boot"],
"env": {
"TWILIO_ACCOUNT_SID": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"TWILIO_AUTH_TOKEN": "your_auth_token_here",
"TWILIO_FROM_NUMBER": "+12025551234"
}
}
}
}
}Claude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"twilio-sms": {
"command": "python",
"args": ["-m", "twilio_sms_mcp.boot"],
"env": {
"TWILIO_ACCOUNT_SID": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"TWILIO_AUTH_TOKEN": "your_auth_token_here",
"TWILIO_FROM_NUMBER": "+12025551234"
}
}
}
}Codex CLI
codex mcp add twilio-sms \
-- docker run --rm -i \
--env-file .env \
-p 8080:8080 \
-v twilio_sms_data:/data \
twilio-sms-mcpVerify:
codex mcp get twilio-sms
codex mcp listDocker
Build and run:
docker build -t twilio-sms-mcp .
docker run --rm -i \
--env-file .env \
-p 8080:8080 \
-v twilio_sms_data:/data \
twilio-sms-mcpOr use Docker Compose:
docker compose up -dWebhook Notes
Configure Twilio to POST to
<your-host>/webhook/smsfor inbound messages.Configure Twilio to POST to
<your-host>/webhook/statusfor delivery callbacks.Set
TWILIO_PUBLIC_WEBHOOK_BASE_URLwhen behind a reverse proxy or ngrok.Keep
TWILIO_VALIDATE_WEBHOOK_SIGNATURES=truein production.
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Twilio Account SID (starts with |
| Yes | — | Twilio Auth Token |
| Yes | — | Default sender in E.164 format |
| No | — | Required for |
| No | — | Override for webhook signature validation |
| No | — | Public URL for webhook signature validation |
| No |
| Disable only for local debugging |
| No |
| Max parallel sends for |
| No |
| Logging verbosity |
| No |
| SQLite database location |
| No |
| Webhook HTTP server port |
| No |
| Retry count for transient API errors |
| No |
| Base delay in seconds between retries |
| No |
| MCP transport: |
| No |
| Bind address for SSE/HTTP transport |
| No |
| Port for SSE/HTTP transport |
Testing
pip install -e ".[dev]"
pytest -vProduction Checklist
Use HTTPS for webhook delivery
Set
TWILIO_VALIDATE_WEBHOOK_SIGNATURES=trueUse a Messaging Service SID for sender pooling and scheduled messages
Persist
/datavolume so inbox state survives restartsNever commit
.env— it is excluded via.gitignoreand.dockerignoreMonitor
/healthzand/readyzfrom your orchestratorSet
TWILIO_LOG_LEVEL=WARNINGin high-traffic environments
License
Available Tools
16 toolssms_account_infoARead-onlyIdempotent
Fetch account balance, status, and friendly name.
Inputs: no named parameters. Returns: result
sms_cancel_scheduledDDestructiveIdempotent
Inputs: params (required). Returns: result
sms_delete_messageDDestructiveIdempotent
Inputs: params (required). Returns: result
sms_format_numberARead-onlyIdempotent
Validate a phone number and return its E.164 form, national format, and country code.
Inputs: params (required). Returns: result
sms_get_conversationDRead-onlyIdempotent
Inputs: params (required). Returns: result
sms_get_messageDRead-onlyIdempotent
Inputs: params (required). Returns: result
sms_list_inboxDRead-onlyIdempotent
Inputs: params (required). Returns: result
sms_list_numbersDRead-onlyIdempotent
Inputs: no named parameters. Returns: result
sms_list_sentDRead-onlyIdempotent
Inputs: params (required). Returns: result
sms_lookup_numberDRead-onlyIdempotent
Inputs: params (required). Returns: result
sms_mark_readDIdempotent
Inputs: params (required). Returns: result
sms_redact_messageADestructiveIdempotent
Redact the body of a delivered message. Twilio keeps metadata but clears the text for compliance / privacy.
Inputs: params (required). Returns: result
sms_scheduleD
Inputs: params (required). Returns: result
sms_sendD
Inputs: params (required). Returns: result
sms_send_bulkD
Inputs: params (required). Returns: result
sms_usage_statsARead-onlyIdempotent
Retrieve daily SMS/MMS usage statistics for the account, useful for cost monitoring and analytics.
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Most tools have distinct purposes targeting different SMS operations like sending, scheduling, listing, and managing messages, but some ambiguity exists between 'sms_list_inbox', 'sms_list_sent', and 'sms_get_conversation' without descriptions, which could cause confusion in message retrieval contexts. Overall, the set is well-differentiated with clear resource-action pairs.
All tool names follow a consistent 'sms_' prefix with snake_case and clear verb_noun patterns (e.g., 'sms_send', 'sms_list_numbers', 'sms_delete_message'), making them predictable and easy to parse. There are no deviations in naming conventions across the 16 tools.
With 16 tools, the count is slightly high but reasonable for a comprehensive SMS management server covering account info, message handling, number operations, and usage stats. It might feel heavy but each tool appears to serve a specific function in the domain without obvious redundancy.
The tool set covers core SMS functionalities like sending, scheduling, listing, and deleting messages, but lacks clear update operations (e.g., no tool for modifying scheduled messages) and has several tools without descriptions, making it hard to assess full lifecycle coverage. Gaps in update capabilities could lead to agent workarounds.
Maintenance
Related MCP Connectors
Business texting for AI agents: send texts, read threads, manage contacts and run campaigns.
Build and send email, SMS, and push straight from your AI agent.
Send messages and automate conversations over SMS, MMS, WhatsApp, Viber, IVR, and USSD in 150+ countries. Manage contacts, campaigns, and automated services, analyze message history, and look up channel options and pricing. Organizations can require human approval before sending messages.
Give your agent a real phone number — send and receive SMS and MMS from a persistent US number.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with all Twilio APIs through the Model Context Protocol. Supports SMS, voice, messaging, and other Twilio services with secure authentication and configurable API filtering.-
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered SMS messaging through Twilio with automatic conversation threading, message status tracking, and webhook support for receiving inbound messages.103 npm1MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to send SMS messages via Twilio through the Model Context Protocol or a standalone REST API. It supports standard messaging, automated greetings, and creative content generation using natural language.119 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables sending SMS, listing messages, and making phone calls via Twilio's REST API. Integrates through Pipeworx gateway for AI agent access.316 npmMIT