sms-gateway-mcp-handler
Facilitates outbound text message (SMS/MMS) transmission utilizing the Twilio API, incorporating predefined communication templates and rigorously securing access credentials.
Author

YiyangLi
Quick Info
Actions
Tags
Twilio Messaging Interface (MCP Server)
This Model Context Protocol (MCP) server component allows conversational AI models, such as Claude, to interface with the Twilio platform for dispatching Short Message Service (SMS) and Multimedia Messaging Service (MMS) communications.
Demonstration
Core Capabilities
- Execute SMS transmissions 📱
- Access templated messages optimized for frequent communication workflows 📝
- Ensure stringent, confidential management of Twilio API keys/secrets 🔒
Prerequisites
- Runtime Environment: Node.js version 18 or newer
-
For updating Node.js, utilization of
nvm(Node Version Manager) is suggested: bash nvm install 18.14.2 nvm alias default 18.14.2 -
To validate the setup or debug initialization issues within Claude Desktop, execute the subsequent command in your terminal: bash npx -y @yiyang.1i/sms-mcp-server
Operational Setup
The server mandates the presence of three distinct environment variables for configuration:
ACCOUNT_SID: The unique identifier for your Twilio accountAUTH_TOKEN: Your confidential authorization credential for the APIFROM_NUMBER: The registered Twilio telephone number associated with the account (must adhere to E.164 format, e.g., +11234567890)
Integration with Claude Desktop
To integrate this service with your local Claude Desktop instance, append the subsequent structure to your configuration file:
macOS Path: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows Path: %APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "twilio": { "command": "npx", "args": [ "-y", "@yiyang.1i/sms-mcp-server" ], "env": { "ACCOUNT_SID": "your_account_sid", "AUTH_TOKEN": "your_auth_token", "FROM_NUMBER": "your_twilio_number" } } } }
Once the modification is saved, relaunch Claude Desktop. A successful connection will register 'Twilio' under the application's tools menu (🔨).
Illustrative AI Interactions
These examples demonstrate typical prompts Claude can employ when utilizing the server:
- Standard Text Transmission:
Transmit a text message to the recipient line +11234567890 conveying the reminder: "Don't forget about dinner tonight!"
- Content Generation and Dispatch:
Compose a short, three-line poem (haiku) centered on the theme of autumn and dispatch it to my mobile contact number +11234567890
Critical Operational Directives
- Number Formatting Standard: Adherence to E.164 format (starting with '+' followed by the country code) is mandatory for all recipient and sender numbers.
- Usage Constraints: Users must monitor their Twilio account's stipulated transmission rate limits and associated service charges.
- Security Posture: Safeguard Twilio credentials; these secrets must never be committed to any public or private source code repositories.
Issue Resolution
Guidance for resolving prevalent errors:
- Error: "Phone number must be in E.164 format"
-
Rectification: Confirm the number prefix includes the '+' symbol and the correct country code.
-
Error: "Invalid credentials"
- Rectification: Scrutinize
ACCOUNT_SIDandAUTH_TOKENentries. These can be verified or regenerated via the Twilio Console.
Community Contribution
We welcome external input! Kindly review our contribution protocols before submitting any proposed modifications or pull requests.
Licensing Information
This software is distributed under the terms outlined in the MIT License (refer to the accompanying LICENSE document).
Security Policy
Refrain from including any confidential data (e.g., credentials, personal phone numbers) within public discussions, GitHub issues, or submitted code contributions.
