Twilio MCP
Twilio MCP (Model Context Protocol) is a self-hostable server that uses Twilio's Public OpenAPI schema to expose Twilio's Public API via the MCP Server. This allows Twilio customers to use their existing LLM clients and leverage the power of Twilio without building their own custom integration.

Kousha Talebian

Brian Partridge

Vinnie Giarrusso
Background
Twilio MCP is a self-hostable server that uses Twilio's Public OpenAPI schema to expose Twilio's Public API via the MCP Server. This allows Twilio customers to use their existing LLM clients and leverage the power of Twilio without having to build own integration.
What is MCP?
The Model Context Protocol (MCP) is an open standard introduced by Anthropic that "enables developers to build secure, two-way connections between their data sources and AI-powered tools" (source) If APIs are how developers access and build upon services then MCPs are how _AI agents_ access and build upon services. Using an MCP can result in higher accuracy code generation and the ability to perform actions without writing custom logic.
For example, using the Claude desktop app with the Twilio MCP, you can achieve tasks such as:
- What are the phone numbers I own on Twilio?
- Buy me a number on Twilio from Mexico, and configure it to use https://mywebsite.com on incoming calls.
- Provision a sub-account and configure Twilio Serverless
Future explorations
Below is a list of MCP-related projects we may explore in the future.
Self-hostable MCP server
Twilio MCP is a self-hostable server that uses Twilio's Public OpenAPI schema to expose Twilio's Public API via the MCP Server. This allows Twilio customers to use their existing LLM clients and leverage the power of Twilio without having to build own integration.
Publish OpenAPI to MCP Tool
Our MCP server dynamically translates Twilio's OpenAPI Spec into MCP specific tool definition. We have open-sourced this generator tool to allow other users to use their OpenAPI specs with MCP.
Authentication
We are working on a way to authenticate users with Twilio's API using the MCP server. This will allow us to migrate the server into the Cloud and provide a more secure way to access Twilio's API.
Dynamic Tools
Twilio has nearly 2k APIs. The MCP Tool definition includes the request body schema. The combined MCP tool of 2k is over most LLMs' context size token limit. We, therefore, need a way to filter the available tools to only the subset of tools required to achieve the given task. The current method we're using is to pass an argument to the server execution command to specify one of the services defined in our OpenAPI spec, e.g. `--services api_v2010`. We're working to add service configuration in the `init` CLI command.
Instead of requiring users to specify the services they need during MCP server setup, a system that updates tools available to the client to fit in the model's context size token limit. We've also seen that MCP clients haven't yet implemented a documented notification feature of the MCP project, `notifications/tools/list_changed.` This notification from the server alerts the client to refresh its list of available tools. A remote MCP server dynamically adjusts the tools exposed to each client, depending on the MCP client's implementation of this notification to become aware of new tools.
Cloud-based MCP
Once we have an authentication protocol, we will publicly investigate exposing the MCP server on the cloud.