Twilio SMS Server

by mustafa-boorenie

Not rated
GitHub

About

Send SMS messages using the Twilio API. Functions as an MCP server or a standalone REST API.

Details

Author
mustafa-boorenie
Categories
Communication, Other, API

πŸ–₯️ 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

{ "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.
- Connect your GitHub repository toRailway
- Set environment variables in Railway dashboard
- Deploy automatically
- Connect your repo to
[Render
- Create a new Web Service
- Build command:npm install && npm run build
- Start command:npm run start:web
- Add environment variables

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"}'

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.

1. MCP Server Mode (Local with Claude Desktop)

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.

- πŸ“± 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

- Node.js >= 18
- Twilio account with SMS capabilities
- Environment variables for Twilio credentials

# 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

Development mode (rebuilds and starts web server)

When running in Web API mode, the following endpoints are available:

{ "to": "+11234567890", "message": "Your message here" }
{ "success": true, "message": "Message sent successfully", "messageSid": "SM...", "to": "+11234567890", "from": "+1234567890" }

Send a greeting message for special occasions

{ "to": "+11234567890", "occasion": "birthday", "customMessage": "Optional custom message" }

πŸ–₯️ 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

{ "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.
- Connect your GitHub repository toRailway
- Set environment variables in Railway dashboard
- Deploy automatically
- Connect your repo to
Render
- Create a new Web Service
- Build command:npm install && npm run build
- Start command:npm run start:web
- Add environment variables

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"}'

πŸ’¬ Example Interactions with Claude (MCP Mode)

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 JavaScript
- npm run start:mcp- Start MCP server mode
- npm run start:web- Start web API server mode
- npm run dev:web- Development mode (rebuild + start web server)
- npm run watch- Watch TypeScript files for changes
- 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
-

"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 fromTwilio 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 variables
- For cloud deployment, ensure environment variables are set in platform settings

Contributions 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.

Enables seamless integration with communication platform that allows you to reach your customers globally across any channel.

Platfone - Receive SMS & Virtual Numbers MCP

Virtual phone number platform for AI agents β€” rent numbers across 200+ countries, receive SMS, and manage the full activation lifecycle

Wavix is a global communications platform offering APIs for voice, SMS, 2FA, and phone numbers. Our MCP server brings these capabilities to AI agents and agentic workflows.

Self-hosted email and SMS platform for AI agents β€” each agent gets a real email address, phone number, inbox, and API key.

Send SMS messages using the Aligo SMS API.

A read-only MCP server for querying live Twilio data, powered by the CData JDBC Driver.

Send SMS, query delivery reports, manage senders / blacklists, register and check Δ°YS (Turkish messaging consent registry) records through the iletiMerkezi BTK-licensed SMS API. 11 tools, runtime-fetched manifest stays in lock-step with the live API. Install: npx -y @iletimerkezi/mcp-server

A public MCP server that gives AI agents access to real UK carrier phone numbers for SMS verification. Agents can rent disposable or rental numbers, pay Lightning invoices, and read incoming SMS, all through standard MCP tool calls with no authentication required.

Get virtual phone numbers for SMS verification, OTP receipt, and number management.

Make voice calls and send SMS messages using the Vonage API.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.