
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@deshartman/twilio-messaging-mcp-server
Advanced tools
Twilio Messaging MCP Server example with Tools, Resources and Prompts. Includes callback handling
An MCP (Model Context Protocol) server that enables sending SMS messages via the Twilio API.
You can use this server directly via npx:
# With environment variables for callback functionality
NGROK_AUTH_TOKEN="your_ngrok_auth_token" NGROK_CUSTOM_DOMAIN="your_custom_domain" npx twilio-messaging-mcp-server <accountSid> <apiKey> <apiSecret> <number>
# Or using -e flag with npx
npx -e NGROK_AUTH_TOKEN="your_ngrok_auth_token" -e NGROK_CUSTOM_DOMAIN="your_custom_domain" twilio-messaging-mcp-server <accountSid> <apiKey> <apiSecret> <number>
Or install it globally:
npm install -g twilio-messaging-mcp-server
# Run with environment variables
NGROK_AUTH_TOKEN="your_ngrok_auth_token" NGROK_CUSTOM_DOMAIN="your_custom_domain" 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)For status callback functionality, the following environment variables are required:
NGROK_AUTH_TOKEN
: Your ngrok authentication token (required for the callback server)NGROK_CUSTOM_DOMAIN
: (Optional) Your custom ngrok domain if you have oneThey need to be passed in the NPX command with "-e" for example.
This server uses ngrok to create a public URL that Twilio can use to send status callbacks. When you send an SMS message, Twilio will send status updates to this URL as the message status changes (e.g., from "queued" to "sent" to "delivered"). These status updates are captured by the callback server and made available through the twilio-status-callback
resource.
To use this functionality, you need to provide an ngrok authentication token via the NGROK_AUTH_TOKEN
environment variable. You can optionally provide a custom domain via the NGROK_CUSTOM_DOMAIN
environment variable if you have a paid ngrok account with custom domains.
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"
],
"env": {
"NGROK_AUTH_TOKEN": "your_ngrok_auth_token_here",
"NGROK_CUSTOM_DOMAIN": "your_custom_domain_here" // Optional
}
}
}
}
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"
],
"env": {
"NGROK_AUTH_TOKEN": "your_ngrok_auth_token_here",
"NGROK_CUSTOM_DOMAIN": "your_custom_domain_here" // Optional
}
}
}
}
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!"
Get the last raw status callback data from Twilio.
URI: twilio://statuscallback
This resource provides access to the most recent status callback data received from Twilio after sending a message. The data is in raw JSON format and contains all the information Twilio sends in its status callbacks, including:
Example usage in Claude:
Can you check the status of the SMS message I just sent?
Claude will access the twilio://statuscallback
resource and display the latest status information.
A prompt that guides the LLM on how to use the SMS sending tool. This prompt helps Claude understand how to properly format and send SMS messages using the Twilio API.
Parameters:
to
: Destination phone number in E.164 format (e.g., +1234567890)message
: Message content to sendExample usage in Claude:
Can you help me send an SMS? I want to send "Meeting at 3pm tomorrow" to +1234567890.
Claude will use the SendSMS prompt to understand how to format the request and then use the send-sms tool to send the message.
This project uses the following key dependencies:
To build the project:
npm install
npm run build
To start the server manually for testing (outside of Claude Desktop):
# Run with actual credentials
NGROK_AUTH_TOKEN="your_ngrok_auth_token" NGROK_CUSTOM_DOMAIN="your_custom_domain" 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)
NGROK_AUTH_TOKEN="your_ngrok_auth_token" NGROK_CUSTOM_DOMAIN="your_custom_domain" 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 via standard input/output (stdio).
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
FAQs
Twilio Messaging MCP Server example with Tools, Resources and Prompts. Includes callback handling
The npm package @deshartman/twilio-messaging-mcp-server receives a total of 1 weekly downloads. As such, @deshartman/twilio-messaging-mcp-server popularity was classified as not popular.
We found that @deshartman/twilio-messaging-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.