Twilio SMS MCP Server
Enables AI agents to send, receive, schedule, and manage SMS and MMS messages using the Twilio Programmable Messaging API. It provides comprehensive tools for handling bulk messaging, conversation threads, and real-time inbox monitoring through a secure, production-grade architecture.
README
Twilio SMS MCP Server
Twilio SMS MCP server for sending, receiving, scheduling, and inspecting SMS or MMS conversations through any MCP-compatible client.
Features
sms_send: send a single SMS or MMSsms_send_bulk: send the same message to multiple recipients with bounded concurrencysms_schedule: schedule a message for future delivery through a Twilio Messaging Servicesms_cancel_scheduled: cancel a scheduled messagesms_list_sent: inspect outbound messagessms_get_message: fetch one message by SIDsms_delete_message: delete a message record from Twiliosms_list_inbox: inspect inbound webhook-captured messagessms_get_conversation: combine local inbox state with Twilio message historysms_mark_read: mark inbox messages as readsms_list_numbers: list Twilio phone numbers on the accountsms_lookup_number: inspect carrier and line-type informationsms_account_info: fetch account balance and status
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, if you want the container deployment path
Local Setup
Copy-Item env.example .env
python -m pip install -e .[dev]
pytest
Fill in .env with your Twilio credentials before running the real server.
Run Locally
Start the MCP server and the webhook sidecar in one process:
python -m twilio_sms_mcp.boot
The webhook server listens on http://127.0.0.1:8080 by default.
Docker
Build the image:
docker build -t twilio-sms-mcp .
Run it with your local .env file:
docker run --rm -i `
--env-file .env `
-p 8080:8080 `
-v twilio_sms_data:/data `
twilio-sms-mcp
Webhook Notes
- Configure Twilio to call
POST /webhook/smsfor inbound messages. - Configure Twilio to call
POST /webhook/statusfor delivery callbacks. - Set
TWILIO_PUBLIC_WEBHOOK_BASE_URLwhen the service runs behind ngrok, a reverse proxy, or a load balancer and the internal request URL differs from the public one. - Leave
TWILIO_VALIDATE_WEBHOOK_SIGNATURES=truein production.
Codex Registration
This project supports a stable Codex registration path without copying secrets into Codex config. The Docker-backed registration below is the same flow that was validated locally.
codex mcp add twilio-sms `
-- docker run --rm -i `
--env-file U:\Twilio-mcp-server\.env `
-p 8080:8080 `
-v twilio_sms_data:/data `
twilio-sms-mcp
Verify it:
codex mcp get twilio-sms
codex mcp list
Production Notes
- Do not commit
.env; it is ignored by.gitignoreand excluded from Docker build context. - Use HTTPS for webhook delivery.
- Prefer
TWILIO_MESSAGING_SERVICE_SIDfor scheduled messages and sender pooling. - Persist
/dataso inbox state and delivery status survive restarts. - Keep webhook signature validation enabled unless you are diagnosing a local URL-mismatch problem.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.