Provides tools for sending SMS messages via Twilio, including capabilities for sending plain text messages and pre-formatted greeting messages for special occasions.
Click on "Install 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 ServerSend a text to +15550123456 saying 'I am running 5 minutes late.'"
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 Server
A versatile SMS service that can run as both a Model Context Protocol (MCP) server for Claude Desktop and as a standalone REST API for cloud deployment.
๐ Two Deployment Modes
1. MCP Server Mode (Local with Claude Desktop)
Enables Claude and other AI assistants to send SMS messages through the Model Context Protocol.
2. Web API Mode (Cloud Deployment)
Standalone REST API that can be deployed to any cloud platform for web applications.
โจ Features
๐ฑ Send SMS messages via Twilio
๐ REST API endpoints for web integration
๐จ MCP server for Claude Desktop integration
๐ Pre-built prompts for common messaging scenarios
๐ Secure handling of Twilio credentials
๐ณ Docker support for easy deployment
โ๏ธ Cloud deployment ready
๐ Requirements
Node.js >= 18
Twilio account with SMS capabilities
Environment variables for Twilio credentials
โ๏ธ Environment Setup
Create a .env file in the project root:
๐ Installation & Usage
Local Development
Install dependencies
npm install
Build the project
npm run build
Run as MCP server (for Claude Desktop)
npm run start:mcp
Run as Web API server
npm run start:web
Development mode (rebuilds and starts web server)
npm run dev:web ```
๐ Web API Endpoints
When running in Web API mode, the following endpoints are available:
GET /
API documentation and usage examples
GET /health
Health check endpoint
POST /send-sms
Send an SMS message
Request Body:
Response:
POST /send-greeting
Send a greeting message for special occasions
Request Body:
๐ฅ๏ธ Claude Desktop Configuration (MCP Mode)
To use this server with Claude Desktop, add the following to your configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
After updating the configuration, restart Claude Desktop. If connected successfully, you should see Twilio under the ๐จ menu.
โ๏ธ Cloud Deployment
Option 1: Railway
Connect your GitHub repository to Railway
Set environment variables in Railway dashboard
Deploy automatically
Option 2: Render
Connect your repo to Render
Create a new Web Service
Build command:
npm install && npm run buildStart command:
npm run start:webAdd environment variables
Option 3: Heroku
Option 4: Docker
๐งช Testing the API
Local Testing
๐ฌ Example Interactions with Claude (MCP Mode)
Here are some natural ways to interact with the server through Claude:
Simple SMS:
Creative SMS:
Greeting Messages:
๐ Scripts Reference
npm run build- Build TypeScript to JavaScriptnpm run start:mcp- Start MCP server modenpm run start:web- Start web API server modenpm run dev:web- Development mode (rebuild + start web server)npm run watch- Watch TypeScript files for changes
โ ๏ธ Important Notes
Phone Number Format: All phone numbers must be in E.164 format (e.g., +11234567890)
Twilio Trial Accounts: Can only send messages to verified phone numbers
Rate Limits: Be aware of your Twilio account's rate limits and pricing
Security: Keep your Twilio credentials secure and never commit them to version control
Environment Variables: Use
.envfile for local development, set via platform for cloud deployment
๐ Troubleshooting
Common Errors and Solutions:
"Phone number must be in E.164 format"
Ensure phone number starts with "+" and includes country code
"Invalid credentials" / "accountSid must start with AC"
Verify your ACCOUNT_SID and AUTH_TOKEN from Twilio Console
Ensure environment variables are properly loaded
"Invalid 'To' Phone Number"
For trial accounts: Verify the destination number in Twilio Console
For paid accounts: Ensure the number format is correct
"Environment variable is required"
Check that
.envfile exists and contains all required variablesFor cloud deployment, ensure environment variables are set in platform settings
๐ค Contributing
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Security
Please do not include any sensitive information (like phone numbers or Twilio credentials) in GitHub issues or pull requests.