TwilioManager MCP

Integrations

  • Used for managing Twilio credentials and environment variables required for authentication with the Twilio API.

  • Enables direct interaction with Twilio's API for subaccount management, phone number control, regulatory compliance handling, and address management for compliance requirements.

Twilio 管理器 MCP

用于管理 Twilio 资源的模型上下文协议 (MCP) 实现。此软件包提供了通过标准化 MCP 接口管理 Twilio 子账户、电话号码和监管捆绑包的工具。

特征

  • 列出 Twilio 子账户
  • 获取与子账户关联的电话号码
  • 在子账户之间转移电话号码
  • 获取监管软件包 SID
  • 支持直接通信和服务器发送事件 (SSE) 通信
  • 与 Claude Desktop、Cursor 和其他 MCP 兼容工具集成

安装

先决条件

安装 uv

在 macOS 上:

brew install uv

在 Windows 上:

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

在 Linux 上:

curl -LsSf https://astral.sh/uv/install.sh | sh

项目设置

  1. 克隆存储库:
git clone https://github.com/yourusername/twilio_manager_mcp.git cd twilio_manager_mcp
  1. 使用 uv 安装依赖项:
uv sync

配置

  1. 使用您的 Twilio 凭据在根目录中创建一个.env文件:
TWILIO_ACCOUNT_SID=your_account_sid TWILIO_AUTH_TOKEN=your_auth_token
  1. 通过创建.cursor/mcp.json文件为您的工具(Cursor、Claude Desktop 等)配置 MCP:
{ "mcpServers": { "twilio_manager_mcp_abs": { "command": "uv", "args": ["--directory", "/path/to/twilio_manager_mcp", "run", "mcp", "run", "./twilio_manager_mcp.py"], "env": { "TWILIO_ACCOUNT_SID": "your_account_sid", "TWILIO_AUTH_TOKEN": "your_auth_token" } }, "twilio_manager_mcp_uvx": { "command": "uvx", "args": [ "twilio-manager-mcp" ], "env": { "TWILIO_ACCOUNT_SID": "your_account_sid", "TWILIO_AUTH_TOKEN": "your_auth_token" } }, "twilio_manager_mcp_sse": { "url": "http://localhost:8000/sse" } } }

Docker

您可以使用 Docker 运行 Twilio Manager MCP,以便更轻松地部署和管理。

使用 Docker Compose

该项目包括一个 Docker Compose 配置,用于设置:

  • Twilio Manager MCP 服务
  • 具有自动 HTTPS 的 Traefik 反向代理
  1. .env文件中配置环境变量:
# Twilio credentials TWILIO_ACCOUNT_SID=your_account_sid TWILIO_AUTH_TOKEN=your_auth_token # Domain configuration for Traefik DOMAIN_NAME=yourdomain.com ACME_EMAIL=user@yourdomain.com # Address details (optional) ADDRESS_CUSTOMER_NAME= ADDRESS_FRIENDLY_NAME= ADDRESS_STREET= ADDRESS_CITY= ADDRESS_REGION= ADDRESS_POSTAL_CODE= ADDRESS_ISO_COUNTRY=
  1. 启动服务:
docker-compose up -d

该应用程序将在启用 HTTPS 的配置域中可用。

不使用 Docker Compose 来使用 Docker

如果您只想运行 Twilio Manager MCP 容器而不运行 Traefik:

  1. 构建 Docker 镜像:
docker build -t twilio-manager-mcp .
  1. 运行容器:
docker run -p 8000:8000 \ -e TWILIO_ACCOUNT_SID=your_account_sid \ -e TWILIO_AUTH_TOKEN=your_auth_token \ twilio-manager-mcp

SSE 端点将在http://localhost:8000/sse上可用。

用法

使用 Cursor、Claude Desktop 或其他 MCP 兼容工具

您有三种选择来使用此 MCP:

  1. 直接 UVX 集成(推荐):
    • 使用twilio_manager_mcp_uvx配置
    • 这是最简单的方法,可以直接使用 uvx
  2. 直接紫外线集成
    • 使用twilio_manager_mcp_abs配置
    • 需要指定安装的完整路径
  3. SSE 服务器
    • 使用twilio_manager_mcp_sse配置
    • 首先启动SSE服务器:
      uvicorn twilio_manager_mcp_sse:app --host 0.0.0.0 --port 8000

可用工具

工具名称描述
list_twilio_subaccounts列出所有 Twilio 子账户
get_account_phone_numbers获取特定子账户的电话号码
get_all_phone_numbers在子账户之间转移电话号码
get_regulatory_bundle_sid获取子账户的监管捆绑包 SID

Cursor/Claude Desktop 中的示例用法

配置完成后,您可以直接在 AI 助手对话中使用这些工具:

  1. 列出所有子账户:
# The AI will automatically use the MCP to list all subaccounts # No need to write code - just ask "List all Twilio subaccounts"
  1. 获取子账户的电话号码:
# Simply ask: "Show me all phone numbers for subaccount AC..."

直接使用 Python

对于直接编程使用:

from mcp import ClientSession from clients.client import MCPClient async with MCPClient("uvx", ["twilio-manager-mcp"], env={}) as session: # List available tools tools = (await session.list_tools()).tools # List all subaccounts subaccounts = await session.invoke("list_twilio_subaccounts") # Get phone numbers for a subaccount numbers = await session.invoke("get_account_phone_numbers", {"account_sid": "AC..."})

项目结构

twilio_manager_mcp/ ├── api/ │ └── async_twilio_api.py # Async Twilio API implementation ├── clients/ │ ├── client.py # Direct MCP client implementation │ └── client_sse.py # SSE client implementation ├── twilio_manager_mcp.py # Core MCP server implementation ├── twilio_manager_mcp_sse.py # SSE server wrapper ├── requirements.txt # Project dependencies └── README.md # This file

发展

对于开发,您可以使用uv的虚拟环境管理:

# Create a virtual environment uv venv # Activate the virtual environment source .venv/bin/activate # On Unix .venv\Scripts\activate # On Windows # Install dependencies in development mode uv pip install -e .

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

MIT 许可证

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

通过模型上下文协议将 Claude AI 连接到 Twilio 的服务器,实现对 Twilio 帐户、电话号码和法规遵从性的及时辅助管理。

  1. 特征
    1. 安装
      1. 先决条件
      2. 项目设置
    2. 配置
      1. Docker
        1. 使用 Docker Compose
        2. 不使用 Docker Compose 来使用 Docker
      2. 用法
        1. 使用 Cursor、Claude Desktop 或其他 MCP 兼容工具
        2. 可用工具
        3. Cursor/Claude Desktop 中的示例用法
        4. 直接使用 Python
      3. 项目结构
        1. 发展
          1. 贡献
            1. 执照

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                An MCP (Model Context Protocol) server that lets users send SMS messages through Twilio API directly from Claude Desktop via natural language commands.
                Last updated -
                1
                TypeScript
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables AI models and applications to interact directly with Twitter/X, providing capabilities to create posts, reply to tweets, retrieve user data, and manage account actions.
                Last updated -
                87
                4
                TypeScript
                MIT License
              • -
                security
                -
                license
                -
                quality
                A Model Context Protocol server that enables Claude and other AI assistants to send SMS and MMS messages using Twilio.
                Last updated -
                5
                JavaScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                An MCP server that enables secure, PCI-compliant payment processing during voice calls via Twilio API, providing asynchronous callbacks and guided workflow for agent-assisted payments.
                Last updated -
                2
                TypeScript
                MIT License
                • Apple

              View all related MCP servers

              ID: 5s1dhxznxx