インストール不要。2分以内に動きます。
cloud.anythingmcp.com で無料トライアルを開始し、Twilio をワンクリックで追加して、AI クライアント(Claude、ChatGPT、Copilot、Cursor)を生成された MCP エンドポイントに向けるだけ。Docker も git clone も、開発経験も不要です。
概要
AI に Twilio を操作させます。SMS と WhatsApp のメッセージの送信と検索、通話と電話番号の確認、Lookup による番号のチェック、Verify によるワンタイムコードの送信と確認、利用量、コスト、残高の把握ができます。
こう聞いてみよう
Twilio のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → Twilio をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も
git cloneもローカルサーバーも不要。
Twilio
AI に Twilio を操作させます。SMS と WhatsApp のメッセージの送信と検索、通話と電話番号の確認、Lookup による番号のチェック、Verify によるワンタイムコードの送信と確認、利用量、コスト、残高の把握ができます。
セットアップ
- console.twilio.com にサインインします。スタートページの Account Info パネルに Account SID(
ACで始まります)と Auth Token が表示されます。 - おすすめ: Auth Token を使う代わりに API キーを作成します。Console で Settings → Account settings → API keys & auth tokens(旧 Console では Admin → Account management → API keys & tokens)を開き、Create API key をクリックし、タイプに Standard を選んで、SID(
SKで始まります)と Secret をコピーします。Secret は一度しか表示されません。キーは Auth Token を変更せずに単独で取り消せます。 - Account SID を
TWILIO_ACCOUNT_SIDに貼り付けます。次に、キーの SID(SK...)をTWILIO_API_KEY_SIDに、その Secret をTWILIO_API_KEY_SECRETに入れるか、Account SID(AC...)をもう一度TWILIO_API_KEY_SIDに、Auth Token をTWILIO_API_KEY_SECRETに入れます。 - コネクターをインストールし、まず
twilio_list_phone_numbersを実行します。保有している番号、つまり AI が送信元として使える番号の一覧が表示されます。Standard の API キーではアカウント情報そのものを読めないことがあり、その場合twilio_get_accountは 401 または 403 を返します。それ以外のツールはすべて使えます。
送信には費用がかかり、実在の相手に届きます: twilio_send_message と twilio_send_verification は実在の人に本物のメッセージやコードを送り、Twilio は 1 件ごとに課金します。AI は先に宛先、送信元、チャネル、本文を示し、あなたの承認を待ちます。twilio_cancel_scheduled_message も同様です。
インストール時はオフ: twilio_delete_message。メッセージの記録を本文ごと完全に削除するツールです。AI にメッセージを削除させる場合だけオンにしてください。
トライアルアカウント: トライアルでは、認証済みの番号最大 5 件にしか送信できず(それ以外はエラー 21608)、送信先も登録した国の中に限られます。トライアル中に API で送る SMS の本文には、Twilio のサンプルテンプレート(sms_2fa や sms_appointment_reminders など)しか使えません。自由な本文を送るにはアップグレードしたアカウントが必要です。
WhatsApp: 両方の番号の前に whatsapp: を付けます(whatsapp:+4915112345678)。最初のテストには 旧 Console の WhatsApp Sandbox を使ってください。相手がサンドボックスの番号に join <code> を送ると、その後 3 日間 whatsapp:+14155238886 からメッセージを送れます。相手の最後のメッセージから 24 時間を過ぎると、WhatsApp は承認済みテンプレートしか配信しません。テンプレートは content_sid(HX...)と content_variables で送ります(そうしないとエラー 63016)。
番号: 常に E.164 形式、つまり +、国番号、スペースなしの番号です(+4915112345678)。twilio_list_phone_numbers は送信元に使える番号を表示し、twilio_list_messaging_services は Messaging Service の一覧を表示します。予約送信には Messaging Service が必要です(schedule_type を fixed にして send_at を指定)。
配信ステータス: 新しいメッセージは queued から始まります。後で twilio_get_message で確認するよう AI に頼んでください。failed や undelivered には error_code が付き、Twilio のエラー一覧 で調べられます。twilio_list_messages と twilio_list_calls は履歴を新しい順に表示します。
Lookup: fields なしの twilio_lookup_phone_number は無料で、形式と国を確認します。fields に指定するデータパッケージ(line_type_intelligence、sms_pumping_risk、caller_name など)は照会ごとに課金されるため、AI は事前に確認します。
Verify: Console で一度だけ Verify サービスを作成します(Verify → Services → Create new)。twilio_list_verify_services でその VA... の sid を確認できます。twilio_send_verification は SMS、音声通話、WhatsApp、メールでコードを送り、twilio_check_verification は相手が入力したコードを確認します(正しければステータスは approved)。承認された認証 1 件あたり約 0.05 USD とチャネルの料金がかかります。
利用量とコスト: twilio_list_usage_records は期間を指定して集計し、twilio_list_usage_records_by_period は日、月、年ごとに分けるか、ThisMonth のような期間で集計します。カテゴリー totalprice が総支出で、twilio_get_balance は残高を表示します。
ページ送り: 一覧の応答には next_page_uri が含まれます(最後のページでは null)。次のページを取得するとき、AI はそこに含まれる page と page_token を渡します。
よくあるエラー: 401 または 20003 は、SID か Secret が間違っているか、API キーを別のアカウントの Account SID と組み合わせていることを示します。404 または 20404 は、そのメッセージ、通話、番号、サービスがこのアカウントに存在しないことを示します。21211 は無効な to 番号、21606 はこのアカウントの Twilio 番号ではないか SMS を送れない from 番号、21610 は STOP と返信した受信者です。429 または 20429 はリクエストが多すぎることを示します。少し待ってからやり直してください。
このコネクターは発信、番号の購入や設定を行わず、Conversations、Studio、Flex、Voice TwiML、Webhook は扱いません。
前提条件: TWILIO_ACCOUNT_SID, TWILIO_API_KEY_SID, TWILIO_API_KEY_SECRET
ローカルでコネクタをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
http://localhost:3000/connectors/store を開き、 Twilio を選択し、前提条件に記載された環境変数を入力します。
利用可能なツール
| Tool | What it does |
|---|---|
twilio_get_account | Read the Twilio account the connector works with: friendly_name, status (active, suspended, closed), type (Trial or Full)… |
twilio_get_balance | Read the account balance and its currency |
twilio_list_messages | List SMS, MMS and WhatsApp messages of the account, newest first, with sid, from, to, body, status (queued, sending, sent, delivered… |
twilio_get_message | Read one message by its sid (SM... or MM...): status, error_code and error_message when it failed, price, segments, sender and recipient… |
twilio_send_message | Send an SMS, MMS or WhatsApp message |
twilio_cancel_scheduled_message | Cancel a message that was scheduled with schedule_type fixed and has not been sent yet; its status becomes canceled |
twilio_list_message_media | List the media (images, files) attached to an MMS or WhatsApp message, with each item's sid and content_type |
twilio_delete_message | Delete a message record from the account for good, including its body |
twilio_list_calls | List phone calls of the account, newest first, with sid, from, to, status, direction, duration (seconds), price, start_time and end_time |
twilio_get_call | Read one call by its sid (CA...): status, direction, from and to, duration, price, answered_by, parent_call_sid and the start and end times |
twilio_list_phone_numbers | List the phone numbers the account owns, with sid (PN...), phone_number, friendly_name, capabilities (voice, sms, mms, fax), the voice and… |
twilio_get_phone_number | Read one owned phone number by its sid (PN...): number, capabilities, webhooks, emergency address status and bundle |
twilio_list_messaging_services | List the Messaging Services of the account (Messaging API v1), with sid (MG...), friendly_name, use case and settings |
twilio_lookup_phone_number | Look up a phone number with Lookup v2 |
twilio_list_verify_services | List the Verify services of the account (sid VA..., friendly_name, code_length, enabled channels) |
twilio_send_verification | Send a one-time code through a Verify service by SMS, voice call, WhatsApp or email |
twilio_check_verification | Check the code a person received from twilio_send_verification |
twilio_get_verification | Read a verification by its sid (VE...): to, channel, status (pending, approved, canceled, max_attempts_reached, deleted, failed, expired)… |
twilio_list_usage_records | List usage and cost per category for a date range: category, description, count with count_unit, usage with usage_unit, price and price_unit |
twilio_list_usage_records_by_period | List usage and cost per category split into periods (one record per category and day, month or year), or for a fixed window: Today… |
プロンプトの例
- 「今日送信した SMS と WhatsApp のメッセージを表示して、失敗したものや配信されなかったものをエラーコード付きで教えてください。」
- 「今月 Twilio でいくら使ったかをカテゴリー別に示し、残高も教えてください。」
- 「+4915112345678 が有効な番号かどうか、どの国の番号かを確認してください。」
- 「当社の Twilio 番号から +4915112345678 に SMS を送り、注文 1042 を発送済みで明日届くことをお客様に伝えてください。」
次のステップ
このガイドは役に立ちましたか?