Send SMS messages using the Twilio API. Functions as an MCP server or a standalone REST API.
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.
Enables Claude and other AI assistants to send SMS messages through the Model Context Protocol.
Standalone REST API that can be deployed to any cloud platform for web applications.
Create a .env
file in the project root:
# Twilio Configuration (Required)
ACCOUNT_SID=your_twilio_account_sid_here
AUTH_TOKEN=your_twilio_auth_token_here
FROM_NUMBER=+1234567890
# Server Configuration (Optional, defaults to 3000)
PORT=3000
```bash
npm install
npm run build
npm run start:mcp
npm run start:web
npm run dev:web ```
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:
{
"to": "+11234567890",
"message": "Your message here"
}
Response:
{
"success": true,
"message": "Message sent successfully",
"messageSid": "SM...",
"to": "+11234567890",
"from": "+1234567890"
}
POST /send-greeting
Send a greeting message for special occasions
Request Body:
{
"to": "+11234567890",
"occasion": "birthday",
"customMessage": "Optional custom message"
}
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
{
"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"
}
}
}
}
After updating the configuration, restart Claude Desktop. If connected successfully, you should see Twilio under the π¨ menu.
npm install && npm run build
npm run start:web
heroku create your-app-name
heroku config:set ACCOUNT_SID=your_sid
heroku config:set AUTH_TOKEN=your_token
heroku config:set FROM_NUMBER=your_number
git push heroku main
# Build Docker image
docker build -t twilio-sms-server .
# Run container
docker run -p 3000:3000 \
-e ACCOUNT_SID=your_sid \
-e AUTH_TOKEN=your_token \
-e FROM_NUMBER=your_number \
twilio-sms-server
# Start the server
npm run start:web
# Test health endpoint
curl http://localhost:3000/health
# Send a test SMS
curl -X POST http://localhost:3000/send-sms \
-H "Content-Type: application/json" \
-d '{"to": "+1234567890", "message": "Hello from the API!"}'
# Send a greeting
curl -X POST http://localhost:3000/send-greeting \
-H "Content-Type: application/json" \
-d '{"to": "+1234567890", "occasion": "birthday"}'
Here are some natural ways to interact with the server through Claude:
Send a text message to +11234567890 saying "Don't forget about dinner tonight!"
Write a haiku about autumn and send it to my number +11234567890
Send a birthday greeting to +11234567890
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.env
file for local development, set via platform for cloud deployment"Phone number must be in E.164 format"
"Invalid credentials" / "accountSid must start with AC"
"Invalid 'To' Phone Number"
"Environment variable is required"
.env
file exists and contains all required variablesContributions are welcome! Please read our contributing guidelines before submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Please do not include any sensitive information (like phone numbers or Twilio credentials) in GitHub issues or pull requests.
Integrates with the LinkedIn API, allowing interaction with your professional network and content.
An MCP server for sending emails via the Postmark service, configured through environment variables.
A server for interacting with LinkedIn, including authentication and posting capabilities.
Provides AI assistants with comprehensive access to Cisco Webex messaging capabilities.
An MCP server for seamless integration with the Kick.com API.
Send iMessage and SMS messages using the Sendblue API.
An MCP server for collecting interactive user feedback through a graphical user interface.
Provides audio input and output capabilities for AI assistants.
A read-only MCP server for querying live RSS data using the CData JDBC Driver for RSS.
A read-only MCP server by CData that enables LLMs to query live SendGrid data. Requires the external CData JDBC Driver for SendGrid.