Skip to main content
Glama
errajibadr

TwilioManager MCP

by errajibadr

트윌리오 매니저 MCP

Twilio 리소스 관리를 위한 모델 컨텍스트 프로토콜(MCP) 구현입니다. 이 패키지는 표준화된 MCP 인터페이스를 통해 Twilio 하위 계정, 전화번호 및 규제 번들을 관리하는 도구를 제공합니다.

특징

  • Twilio 하위 계정 목록

  • 하위 계정과 연결된 전화번호 가져오기

  • 하위 계정 간 전화번호 전송

  • 규제 번들 SID 받기

  • 직접 및 SSE(Server-Sent Events) 통신 모두 지원

  • Claude Desktop, Cursor 및 기타 MCP 호환 도구와의 통합

Related MCP server: Twilio MCP Server

설치

필수 조건

uv 설치

macOS에서:

지엑스피1

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를 사용하여 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 사용

Traefik 없이 Twilio Manager MCP 컨테이너만 실행하려면 다음을 수행하세요.

  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 에서 사용할 수 있습니다.

용법

커서, Claude Desktop 또는 기타 MCP 호환 도구 사용

이 MCP를 사용하는 데에는 세 가지 옵션이 있습니다.

  1. 직접 UVX 통합 (권장):

    • twilio_manager_mcp_uvx 구성을 사용하세요

    • 이것은 가장 간단한 방법이며 uvx와 함께 바로 작동합니다.

  2. 직접 UV 통합 :

    • 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..."

직접 파이썬 사용법

직접 프로그래밍 방식으로 사용하는 경우:

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 .

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

특허

MIT 라이센스

Available Tools

4 tools
get_account_phone_numbersC

Get all phone numbers associated with a Twilio subaccount

ParametersJSON Schema
NameRequiredDescriptionDefault
account_sidYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Get') but doesn't describe what 'Get all phone numbers' entails—e.g., whether it returns a list, includes pagination, requires specific permissions, or has rate limits. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations, 0% schema description coverage, and no output schema, the description is incomplete. It doesn't address behavioral aspects like return format, error handling, or usage constraints, which are crucial for a tool with one required parameter and no structured guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must compensate. It mentions 'account_sid' implicitly but doesn't explain what this parameter represents, its format, or how to obtain it. Without this additional semantic information, the agent lacks context for proper usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('all phone numbers associated with a Twilio subaccount'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_all_phone_numbers', which might have overlapping functionality, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_all_phone_numbers' or 'list_twilio_subaccounts'. It lacks context about prerequisites, such as whether the account_sid must be for a subaccount specifically, or any exclusions. This leaves the agent without clear usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_all_phone_numbersC

Get all phone numbers associated with a Twilio subaccount

ParametersJSON Schema
NameRequiredDescriptionDefault
source_account_sidYes
phone_number_sidYes
target_account_sidYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states a read operation ('Get'), implying it's likely non-destructive, but doesn't disclose behavioral traits such as authentication needs, rate limits, pagination, error handling, or what 'all' entails (e.g., scope, limits). For a tool with 3 required parameters and no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with zero waste, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 required parameters, no annotations, no output schema), the description is incomplete. It lacks details on parameter usage, behavioral context, and output expectations. For a tool that likely involves account and phone number management, more guidance is needed to help an agent use it correctly, especially with sibling tools present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning parameters are undocumented in the schema. The description adds no meaning beyond the schema—it doesn't explain what the parameters (source_account_sid, phone_number_sid, target_account_sid) do, why they're required, or how they relate to 'getting all phone numbers'. With 3 required parameters and no compensation in the description, this fails to provide necessary semantic context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('all phone numbers associated with a Twilio subaccount'), providing specific verb+resource pairing. However, it doesn't explicitly differentiate from sibling tools like 'get_account_phone_numbers' or 'list_twilio_subaccounts', which likely have overlapping functionality. The purpose is clear but lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for selecting this over siblings like 'get_account_phone_numbers', or any exclusions. Usage is implied by the name and description alone, with no explicit when/when-not instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_regulatory_bundle_sidC

Get the regulatory bundle SID for a Twilio subaccount

ParametersJSON Schema
NameRequiredDescriptionDefault
subaccount_sidYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action is to 'Get', implying a read operation, but doesn't specify if it requires authentication, rate limits, error conditions, or what the output format might be (e.g., a string SID). This leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It front-loads the key action and resource, making it easy to understand at a glance. Every part of the sentence contributes directly to the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a read operation with one parameter), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what a 'regulatory bundle SID' is, how it's used, or what the return value looks like, leaving the agent with insufficient context to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'for a Twilio subaccount', which aligns with the single parameter 'subaccount_sid' in the schema. However, schema description coverage is 0%, so the description doesn't add details beyond the parameter's existence, such as format or validation rules. With one parameter and no schema descriptions, the baseline is 3 as it minimally compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and the resource ('regulatory bundle SID for a Twilio subaccount'), making the purpose understandable. It doesn't explicitly differentiate from sibling tools like 'list_twilio_subaccounts', which lists subaccounts rather than retrieving a specific bundle SID, but the distinction is implied through the specific resource focus.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description lacks context about prerequisites, such as needing a valid subaccount SID, or comparisons to other tools that might handle regulatory data. Usage is implied only by the tool's name and purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_twilio_subaccountsB

List all Twilio subaccounts or filter by friendly name. Provide an empty string for all subaccounts

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the basic operation (listing/filtering subaccounts) but lacks details on permissions, rate limits, pagination, or response format. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the main purpose and includes essential details without waste. It's appropriately sized for a simple tool with no parameters, making it easy to understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It covers the basic operation but lacks details on behavioral aspects like response format or error handling. Without annotations or output schema, the description should do more to compensate, but it's minimally viable for this simple case.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameters are documented in the schema. The description adds value by explaining that filtering by friendly name is possible and that an empty string returns all subaccounts, which clarifies the tool's behavior beyond the empty schema. Since there are 0 parameters, the baseline is 4, and the description provides useful context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('List') and resource ('Twilio subaccounts'), and mentions optional filtering by friendly name. However, it doesn't explicitly differentiate this tool from its sibling tools (get_account_phone_numbers, get_all_phone_numbers, get_regulatory_bundle_sid), which appear to be related but distinct operations. The description is clear but lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by mentioning filtering by friendly name and providing an empty string for all subaccounts, but it doesn't explicitly state when to use this tool versus alternatives or any prerequisites. There's no guidance on when not to use it or comparisons with sibling tools, leaving usage somewhat ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • Changedget_account_phone_numbers1 field changed
      • addedInput schema / title
        Added value: +"get_account_phone_numbers_for_subaccountArguments"
    • Changedget_all_phone_numbers1 field changed
      • addedInput schema / title
        Added value: +"transfer_phone_numberArguments"
    • Changedget_regulatory_bundle_sid1 field changed
      • addedInput schema / title
        Added value: +"get_regulatory_bundle_sidArguments"
    • Changedlist_twilio_subaccounts1 field changed
      • addedInput schema / title
        Added value: +"list_all_twilio_subaccountsArguments"
  2. 4 tool updates
    • First observedget_account_phone_numbers
    • First observedget_all_phone_numbers
    • First observedget_regulatory_bundle_sid
    • First observedlist_twilio_subaccounts

TDQS

C2.9/5.0

Scored across 4 tools

Disambiguation2/5

Two tools have nearly identical purposes: 'get_account_phone_numbers' and 'get_all_phone_numbers' both retrieve phone numbers for Twilio subaccounts, creating clear ambiguity. The other two tools target distinct resources (regulatory bundles and subaccounts), but the overlap between the first two tools is significant and likely to cause misselection.

Naming Consistency4/5

All tools follow a consistent verb_noun pattern (e.g., get_account_phone_numbers, list_twilio_subaccounts) with clear, descriptive names. The naming style is uniform across the set, making it easy to parse and understand the actions and targets.

Tool Count3/5

With only 4 tools, the count feels thin for a server named 'TwilioManager MCP', which suggests broader Twilio API management. This limited set may not cover essential operations like sending messages, managing calls, or updating resources, making it borderline for the implied scope.

Completeness2/5

The tool surface is severely incomplete for Twilio management, lacking core functionalities such as sending SMS, making calls, or updating subaccounts. It focuses narrowly on retrieval operations (get/list) without create, update, or delete capabilities, leading to significant gaps that will hinder agent workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers