An MCP (Model Context Protocol) server that enables sending SMS messages via the Twilio API.
You can use this server directly via npx:
npx twilio-messaging-mcp-server <accountSid> <apiKey> <apiSecret> <number>
Or install it globally:
npm install -g twilio-messaging-mcp-server
twilio-messaging-mcp-server <accountSid> <apiKey> <apiSecret> <number>
The server requires the following parameters:
accountSid
: Your Twilio Account SID (must start with 'AC', will be validated)apiKey
: Your Twilio API Key (starts with 'SK')apiSecret
: Your Twilio API Secretnumber
: The Twilio phone number to send messages from (in E.164 format, e.g., +1234567890)This server uses API Keys and Secrets instead of Auth Tokens for improved security. This approach provides better access control and the ability to revoke credentials if needed. For more information, see the Twilio API Keys documentation.
For local development (when the package is not published to npm), add the following to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json
on macOS or %APPDATA%\Claude\claude_desktop_config.json
on Windows):
{
"mcpServers": {
"twilio-messaging": {
"command": "node",
"args": [
"/PATHTONODE/twilio-messaging-mcp-server/build/index.js",
"your_account_sid_here",
"your_api_key_here",
"your_api_secret_here",
"+1234567890"
]
}
}
}
Replace the values with your actual Twilio credentials:
You can get the absolute path by running the following command in your project directory:
# On macOS/Linux
echo "$(pwd)/build/index.js"
# On Windows (PowerShell)
Write-Output "$((Get-Location).Path)\build\index.js"
Once the package is published to npm, you can use the following configuration:
{
"mcpServers": {
"twilio-messaging": {
"command": "npx",
"args": [
"-y",
"twilio-messaging-mcp-server",
"your_account_sid_here",
"your_api_key_here",
"your_api_secret_here",
"+1234567890"
]
}
}
}
Sends an SMS message via Twilio.
Parameters:
to
: Destination phone number in E.164 format (e.g., +1234567890)message
: Message content to sendExample usage in Claude:
Can you send an SMS to +1234567890 saying "Hello from MCP!"
To build the project:
npm install
npm run build
To start the server manually for testing (outside of Claude Desktop):
# Run with actual credentials
node build/index.js "your_account_sid_here" "your_api_key_here" "your_api_secret" "+1234567890"
# Or use the npm script (which uses ts-node for development)
npm run dev -- "your_account_sid_here" "your_api_key_here" "your_api_secret" "+1234567890"
The server will start and wait for MCP client connections. You should see output like:
[TwilioMessagingServer] Server started successfully
When using with Claude Desktop, the server is started automatically when Claude loads the configuration file. You don't need to manually start it.
MIT