Build a Twilio MCP Server with QuickMCP: SMS & Voice Control

Complete guide to connecting Twilio API to Claude Desktop with QuickMCP. Send SMS, make calls, and manage phone numbers through AI.

Twilio is the leading communications API for SMS, voice, and video. Let's connect it to Claude Desktop with QuickMCP so you can send messages and make calls through natural language.

What You'll Build

Ask Claude:

  • "Send an SMS to +1234567890 saying the meeting is at 3pm"
  • "List all my Twilio phone numbers"
  • "Show me SMS messages received today"
  • "What's my account balance?"

Prerequisites

  • QuickMCP CLI: dotnet tool install -g QuickMCP.CLI
  • Twilio account (free trial works!)
  • Account SID and Auth Token from Twilio
  • Claude Desktop

Step 1: Get Twilio Credentials

Create Account

  1. Sign up at: https://www.twilio.com/try-twilio
  2. Verify your email and phone number
  3. You'll get free trial credit!

Find Your Credentials

  1. Go to: https://console.twilio.com
  2. Find your Account SID (starts with AC...)
  3. Find your Auth Token (click "show" to reveal)
  4. Copy both - you'll need them soon

Step 2: Generate QuickMCP Configuration

Twilio provides an official OpenAPI spec:

quickmcp build config \
  --spec-url https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json \
  --auth basic \
  --ai-metadata \
  --output-path ~/quickmcp/twilio-config.json

Why Basic Auth?

Twilio uses Basic Authentication with:

  • Username: Your Account SID
  • Password: Your Auth Token

Step 3: Configure Authentication

Edit ~/quickmcp/twilio-config.json:

{
  "serverId": "twilio",
  "specificationUrl": "https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json",
  "authentication": {
    "type": "Basic",
    "username": "${TWILIO_ACCOUNT_SID}",
    "password": "${TWILIO_AUTH_TOKEN}"
  }
}

Step 4: Add to Claude Desktop

macOS:

~/Library/Application Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Configuration:

{
  "mcpServers": {
    "twilio": {
      "command": "quickmcp",
      "args": [
        "serve",
        "--config-path",
        "/Users/yourname/quickmcp/twilio-config.json"
      ],
      "env": {
        "TWILIO_ACCOUNT_SID": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "TWILIO_AUTH_TOKEN": "your_auth_token_here"
      }
    }
  }
}

Step 5: Restart Claude Desktop

Close and reopen Claude Desktop.

Testing Your Integration

Test 1: Send SMS

Free Trial Note: With a trial account, you can only send to verified phone numbers.

Ask Claude:

"Send an SMS to +1234567890 with message: Hello from Claude and QuickMCP!"

Claude will call Twilio's Messages API and send the text.

Test 2: List Phone Numbers

"Show me all my Twilio phone numbers"

Claude lists your purchased/rented numbers.

Test 3: Check Messages

"Show me the last 10 SMS messages I received"

Claude retrieves your message log.

Test 4: Account Info

"What's my Twilio account balance?"

Claude shows your current balance and currency.

Real-World Examples

Example 1: Automated Notifications

"Send an SMS to +1555000111 saying: Your order #12345 has shipped!"
"Find all SMS messages containing the word 'appointment' from the past week"

Example 3: Phone Number Management

"List all phone numbers in my account with their capabilities"

Advanced Configuration

Filter for Safety

Only allow reading operations, no sending:

quickmcp build config \
  --spec-url https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json \
  --auth basic \
  --only-for-paths "/2010-04-01/Accounts/*/Messages/list,/2010-04-01/Accounts/*/IncomingPhoneNumbers" \
  --output-path ~/quickmcp/twilio-readonly-config.json

Separate Send & Read Servers

Read-only server:

{
  "mcpServers": {
    "twilio-read": {
      "command": "quickmcp",
      "args": ["serve", "--config-path", "/path/to/twilio-readonly-config.json"],
      "env": {
        "TWILIO_ACCOUNT_SID": "AC...",
        "TWILIO_AUTH_TOKEN": "token"
      }
    }
  }
}

Full access server:

{
  "mcpServers": {
    "twilio-full": {
      "command": "quickmcp",
      "args": ["serve", "--config-path", "/path/to/twilio-config.json"],
      "env": {
        "TWILIO_ACCOUNT_SID": "AC...",
        "TWILIO_AUTH_TOKEN": "token"
      }
    }
  }
}

Comment out the one you don't want active.

Twilio Trial Limitations

Free Trial Restrictions

  • SMS: Can only send to verified phone numbers
  • Voice: Can only call verified numbers
  • Numbers: Limited phone number selection
  • Messages: Include "Sent from your Twilio trial account" prefix

Upgrade Benefits

Once you upgrade (add credit card):

  • Send to any phone number
  • Remove trial message prefix
  • Access all Twilio features
  • Pay-as-you-go pricing

Common Issues

Issue: "Authentication failed"

Solution: Verify credentials:

curl -X GET "https://api.twilio.com/2010-04-01/Accounts.json" \
  -u ACxxxxxxxx:your_auth_token

If this fails, your credentials are wrong.

Issue: "Cannot send to this number"

Cause: Trial account can only send to verified numbers.

Solution:

  1. Go to: https://console.twilio.com/verify
  2. Add the phone number
  3. Verify it with the code sent
  4. Try again

Issue: "Insufficient funds"

Solution: Add credit to your account:
https://console.twilio.com/billing

Security Best Practices

1. Protect Your Auth Token

Your Auth Token is like a password. Never:

  • Commit it to Git
  • Share it publicly
  • Hardcode it in files

Always use environment variables.

2. Use API Keys (Advanced)

Instead of main credentials, create API keys:

  1. Go to: https://console.twilio.com/project/api-keys
  2. Create a new API key
  3. Use API Key SID as username
  4. Use API Key Secret as password

3. Monitor Usage

Check your Twilio usage regularly:
https://console.twilio.com/usage

Set up usage alerts to avoid surprise bills.

4. Limit Permissions

Use path filtering to restrict what Claude can do:

# Only allow reading messages, not sending
--only-for-paths "/2010-04-01/Accounts/*/Messages/list"

What's Available

With full Twilio API access through QuickMCP:

SMS:

  • Send messages
  • Receive messages
  • List message history
  • Search messages

Voice:

  • Make calls
  • List call history
  • Get call recordings

Phone Numbers:

  • List owned numbers
  • Purchase new numbers
  • Release numbers

Account:

  • Check balance
  • View usage
  • Manage subaccounts

Cost Considerations

Pricing (US)

  • SMS: ~$0.0075 per message
  • Voice: ~$0.013 per minute
  • Phone Number: ~$1/month rental

Free Trial

New accounts get:

  • $15.00 in free credit
  • Enough for ~2,000 SMS or ~1,150 minutes of calls

Going to Production

1. Upgrade Account

Add a credit card and remove trial restrictions.

2. Use API Keys

Create restricted API keys instead of main credentials.

3. Set Up Monitoring

Configure usage alerts:
https://console.twilio.com/monitor/alerts

4. Review Permissions

Audit what operations QuickMCP exposes and filter as needed.

Use Cases

Customer Support

"Send SMS to +1555000111: Your support ticket #456 has been resolved"

Appointment Reminders

"Send appointment reminder to +1555000222: You have a meeting tomorrow at 2pm"

Status Updates

"Check if I've received any SMS messages in the past hour"

Bulk Notifications

Claude can help compose and send multiple messages (within rate limits).

Next Steps

Twilio + QuickMCP brings SMS and voice control to Claude Desktop. Start communicating through AI today!