Purpose
Twilio MCP Monorepo is for developers who want to establish a standardized connection between AI tools and Twilio services. It wraps Twilio's public APIs as Model Context Protocol (MCP) tools, enabling AI assistants and other tools that support the MCP protocol to directly invoke Twilio capabilities, such as sending messages, managing phone numbers, and configuring accounts.
Main Packages and Capabilities
This monorepo contains two main packages:
- mcp: An MCP server for all of Twilio's public APIs, exposing the Twilio APIs as MCP tools.
- openapi-mcp-server: An MCP server used to provide a given OpenAPI specification, that is, turning an OpenAPI specification into MCP tools.
Each package has its own complete README documentation.
Usage
The simplest way to get started is to use npx. Before use, you can refer to the Twilio API Keys documentation to learn how to find or create an API Key and Secret.
Both packages accept configuration parameters:
- MCP Server: Use
--servicesand--tagsto filter the APIs to expose. - OpenAPI MCP Server: Use
--apiPathto specify the location of the OpenAPI specification file.
For complete configuration details, refer to each package's dedicated documentation.
Security Recommendations
To prevent injection attacks from leading to untrusted systems accessing Twilio data, the ETI team recommends that users of the Twilio MCP server avoid installing or running any community MCP server together with the official server. This helps ensure that only trusted MCP servers can access the tools that interact with the Twilio account, reducing the risk of unauthorized data access.
Common Troubleshooting
- Context size limits: Due to LLM context limits, it is recommended to load specific APIs via
--servicesor--tags. - Authentication issues: Check the format and permissions of the Twilio API credentials.
- API versions: Confirm that the correct API version is used for your needs (v1, v2, v3).
For detailed troubleshooting guides, see each package's dedicated documentation.
Other Information
Contributions to the project are welcome; you can submit a Pull Request. It uses the ISC License, see the LICENSE file for details.