Voice Call (Twilio) MCP server

Enables AI to make outbound phone calls via Twilio with real-time speech processing, creating natural conversations for appointment scheduling, customer service, or information gathering without human intervention.
Back to servers
Setup instructions
Provider
LukasK
Release date
Apr 09, 2025
Language
TypeScript
Stats
42 stars

This MCP server enables AI assistants like Claude to initiate and manage voice calls through Twilio, with real-time audio processing powered by OpenAI's GPT-4o Realtime model. It provides a foundation for AI-powered voice calling that you can extend with your own functionality.

Requirements

  • Node.js >= 22 (use nvm install 22 and nvm use 22 to update)
  • Twilio account with API credentials
  • OpenAI API key
  • Ngrok Authtoken

Installation

Setting Up the Server

  1. Clone the repository

    git clone https://github.com/lukaskai/voice-call-mcp-server.git
    cd voice-call-mcp-server
    
  2. Install dependencies and build

    npm install
    npm run build
    

Configuration

The server requires several environment variables:

  • TWILIO_ACCOUNT_SID: Your Twilio account SID
  • TWILIO_AUTH_TOKEN: Your Twilio auth token
  • TWILIO_NUMBER: Your Twilio number
  • OPENAI_API_KEY: Your OpenAI API key
  • NGROK_AUTHTOKEN: Your ngrok authtoken
  • RECORD_CALLS: Set to "true" to record calls (optional)

Claude Desktop Configuration

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": {
    "voice-call": {
      "command": "node",
      "args": ["/path/to/your/mcp-new/dist/start-all.cjs"],
      "env": {
        "TWILIO_ACCOUNT_SID": "your_account_sid",
        "TWILIO_AUTH_TOKEN": "your_auth_token",
        "TWILIO_NUMBER": "your_e.164_format_number",
        "OPENAI_API_KEY": "your_openai_api_key",
        "NGROK_AUTHTOKEN": "your_ngrok_authtoken"
      }
    }
  }
}

After configuring, restart Claude Desktop to reload the configuration. If connected properly, you should see Voice Call under the 🔨 menu.

Using the MCP Server

Here are some natural ways to interact with the server through Claude:

Simple Call

Can you call +1-123-456-7890 and let them know I'll be 15 minutes late for our meeting?

Restaurant Reservation

Please call Delicious Restaurant at +1-123-456-7890 and make a reservation for 4 people tonight at 7:30 PM. Please speak in German.

Appointment Scheduling

Please call Expert Dental NYC (+1-123-456-7899) and reschedule my Monday appointment to next Friday between 4–6pm.

Important Notes

  • Phone Number Format: All phone numbers must be in E.164 format (e.g., +11234567890)
  • Rate Limits: Be aware of your Twilio and OpenAI account's rate limits and pricing
  • Call Duration: Be mindful of call durations as they affect costs
  • Public Exposure: The ngrok tunnel exposes your server publicly (though with a random URL and protected by a random secret)

Troubleshooting

Common Issues

  1. "Phone number must be in E.164 format"

    • Make sure the phone number starts with "+" and the country code
  2. "Invalid credentials"

    • Double-check your TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN from the Twilio Console
  3. "OpenAI API error"

    • Verify your OPENAI_API_KEY is correct and has sufficient credits
  4. "Ngrok tunnel failed to start"

    • Ensure your NGROK_AUTHTOKEN is valid and not expired
  5. "OpenAI Realtime does not detect the end of voice input, or is lagging."

    • Try using a different receiver as there might be voice encoding issues between Twilio and the receiver's network operator

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "voice-call" '{"command":"node","args":["/path/to/your/mcp-new/dist/start-all.cjs"],"env":{"TWILIO_ACCOUNT_SID":"your_account_sid","TWILIO_AUTH_TOKEN":"your_auth_token","TWILIO_NUMBER":"your_e.164_format_number","OPENAI_API_KEY":"your_openai_api_key","NGROK_AUTHTOKEN":"your_ngrok_authtoken"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "voice-call": {
            "command": "node",
            "args": [
                "/path/to/your/mcp-new/dist/start-all.cjs"
            ],
            "env": {
                "TWILIO_ACCOUNT_SID": "your_account_sid",
                "TWILIO_AUTH_TOKEN": "your_auth_token",
                "TWILIO_NUMBER": "your_e.164_format_number",
                "OPENAI_API_KEY": "your_openai_api_key",
                "NGROK_AUTHTOKEN": "your_ngrok_authtoken"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "voice-call": {
            "command": "node",
            "args": [
                "/path/to/your/mcp-new/dist/start-all.cjs"
            ],
            "env": {
                "TWILIO_ACCOUNT_SID": "your_account_sid",
                "TWILIO_AUTH_TOKEN": "your_auth_token",
                "TWILIO_NUMBER": "your_e.164_format_number",
                "OPENAI_API_KEY": "your_openai_api_key",
                "NGROK_AUTHTOKEN": "your_ngrok_authtoken"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later