🤖 Claude AI Integration

SMSGO MCP Server

讓 Claude AI 直接傳送簡訊。下載 Python 伺服器,設定後即可用自然語言對話操控 SMSGO 完整 API。 Let Claude AI send SMS directly. Download the Python server, configure it, then control the full SMSGO API through natural conversation.

⬇ 下載完整套件 (.zip) ⬇ Download Full Package (.zip) 查看安裝步驟 ↓ View Setup Guide ↓

包含:smsgo_server.py · claude_desktop_config.json · mcp.json · README.txt Includes: smsgo_server.py · claude_desktop_config.json · mcp.json · README.txt

1 提供的工具 (Tools) Available Tools

send_sms
傳送簡訊給一或多位收件人(最多 50 筆),支援中文、英文、長簡訊、WAP Push。 Send SMS to one or more recipients (up to 50). Supports Chinese, English, long SMS, and WAP Push.
query_point
查詢帳號剩餘點數。 Check remaining SMS point balance.
query_sms_status
查詢單筆簡訊的傳送狀態(DELIVRD / UNDELIV / ENROUTE…)。 Check delivery status of a single SMS (DELIVRD / UNDELIV / ENROUTE…).
query_bulk_sms_status
一次查詢多筆簡訊的傳送狀態。 Check delivery status of multiple SMS at once.
cancel_sms
取消尚未發送的預約簡訊。 Cancel a scheduled (not yet sent) SMS.
send_otp
發送 OTP 驗證碼簡訊(4 或 6 位數)。 Send an OTP verification code (4 or 6 digits).
verify_otp
驗證使用者輸入的 OTP 碼是否正確。 Verify an OTP code entered by the user.
query_replies
查詢收件人在指定日期範圍內回傳的簡訊內容。 Query inbound reply messages sent back by recipients within a date range.
query_sent_list
查詢指定日期範圍內的發送紀錄,支援分頁與門號篩選(最多 31 天)。 Query paginated sent message history by date range with optional number filter (max 31 days).
send_sms_csv
透過 CSV 資料發送個人化簡訊,每位收件人可收到不同內容。 Send personalised SMS from CSV data — each recipient gets a unique message.
query_delivery_report
查詢指定日期範圍內的投遞狀態報告(DELIVRD / UNDELIV / ENROUTE…),最多 31 天。 Query delivery status report for a date range (DELIVRD / UNDELIV / ENROUTE…), max 31 days.

📡 MO Webhook 接收器工具 📡 MO Webhook Receiver Tools

start_mo_receiver
啟動本機 HTTP 接收伺服器,可選擇使用 trycloudflare.com 免費隧道或自訂公開網域/埠號。 Start the local HTTP receiver. Optionally open a free trycloudflare.com tunnel or use your own public domain/port.
stop_mo_receiver
停止 HTTP 接收伺服器並關閉 cloudflare 隧道(若已開啟)。 Stop the HTTP server and close the cloudflare tunnel if one is running.
mo_receiver_status
查詢接收器目前狀態、公開 URL 及已緩衝的訊息數量。 Check if the receiver is running, get the public URL, and see how many messages are buffered.
get_received_mo
讀取本機緩衝區中最近收到的 MO 回覆訊息(最多 200 筆,依時間倒序)。 Read the most recent MO messages buffered in memory (newest first, max 200).
register_mo_webhook
將公開 URL 向 SMSGO 帳號登錄為 MO Webhook,收到回覆時 SMSGO 會主動推送。 Register the public URL with your SMSGO account so inbound replies are pushed to it automatically.
get_mo_webhook / clear_mo_webhook
查詢或清除已登錄在 SMSGO 帳號的 MO Webhook 網址。 Query or remove the MO webhook URL registered in your SMSGO account.

2 安裝步驟 Setup Guide

① 安裝 Python 相依套件 ① Install Python dependencies

需要 Python 3.10+。開啟終端機執行: Requires Python 3.10+. Run in terminal:

pip3 install "mcp[cli]" httpx
② 下載伺服器程式 ② Download the server script

下載後建議放在 ~/mcp/smsgo_server.py We recommend saving it to ~/mcp/smsgo_server.py:

mkdir -p ~/mcp
curl -o ~/mcp/smsgo_server.py https://www.smsgo.com.tw/mcp/smsgo_server.py
③ 設定 Claude Desktop ③ Configure Claude Desktop

開啟 Claude Desktop → 設定 → Developer → Edit Config,將以下內容加入 claude_desktop_config.json,並填入您的帳號密碼: Open Claude Desktop → Settings → Developer → Edit Config, then add the following to claude_desktop_config.json and fill in your credentials:

{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["/Users/你的帳號/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "你的SMSGO帳號",
        "SMSGO_PASSWORD": "你的密碼或API Key"
      }
    }
  }
}
{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["/Users/your_username/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "your_smsgo_username",
        "SMSGO_PASSWORD": "your_password_or_api_key"
      }
    }
  }
}
⚠️ config 檔通常位於 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows)。 ⚠️ The config file is typically at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
④ 重啟 Claude Desktop ④ Restart Claude Desktop

完全關閉並重新開啟 Claude Desktop。左下角工具列應出現 smsgo 伺服器圖示,代表連線成功。 Fully quit and reopen Claude Desktop. The smsgo server icon should appear in the bottom-left toolbar, confirming a successful connection.

3 Claude Code (CLI) 設定 Claude Code (CLI) Setup

在專案根目錄新增 .mcp.json Add .mcp.json to your project root
{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["~/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "你的SMSGO帳號",
        "SMSGO_PASSWORD": "你的密碼或API Key"
      }
    }
  }
}
{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["~/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "your_smsgo_username",
        "SMSGO_PASSWORD": "your_password_or_api_key"
      }
    }
  }
}

4 其他 AI 平台 Other AI Platforms

MCP 是開放協議,不限於 Claude。以下平台同樣支援此伺服器,smsgo_server.py 無需任何修改。 MCP is an open protocol — not exclusive to Claude. The same smsgo_server.py works with any MCP-compatible client with no changes needed.

① 安裝套件 ① Install package
pip install openai-agents
② 在 Python 程式中連接 ② Connect in your Python script
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerStdio

async def main():
    async with MCPServerStdio(
        name="smsgo",
        params={
            "command": "python3",
            "args":    ["/Users/你的帳號/mcp/smsgo_server.py"],
            "env":     {
                "SMSGO_USERNAME": "你的SMSGO帳號",
                "SMSGO_PASSWORD": "你的密碼或API Key"
            }
        }
    ) as server:
        agent = Agent(
            name="SMS Agent",
            instructions="你可以透過 SMSGO 發送簡訊。",
            mcp_servers=[server]
        )
        result = await Runner.run(agent, "傳簡訊給 0912345678:您好")
        print(result.final_output)

asyncio.run(main())
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerStdio

async def main():
    async with MCPServerStdio(
        name="smsgo",
        params={
            "command": "python3",
            "args":    ["/Users/your_username/mcp/smsgo_server.py"],
            "env":     {
                "SMSGO_USERNAME": "your_smsgo_username",
                "SMSGO_PASSWORD": "your_password_or_api_key"
            }
        }
    ) as server:
        agent = Agent(
            name="SMS Agent",
            instructions="You can send SMS messages via SMSGO.",
            mcp_servers=[server]
        )
        result = await Runner.run(agent, "Send SMS to 0912345678: Hello!")
        print(result.final_output)

asyncio.run(main())
① 安裝 Google ADK 套件 ① Install Google ADK
pip install google-adk
② 在 ADK Agent 中載入工具 ② Load tools in your ADK Agent
from google.adk.tools.mcp_tool import MCPToolset, StdioServerParameters

smsgo_toolset = MCPToolset(
    connection_params=StdioServerParameters(
        command="python3",
        args=["/Users/你的帳號/mcp/smsgo_server.py"],
        env={
            "SMSGO_USERNAME": "你的SMSGO帳號",
            "SMSGO_PASSWORD": "你的密碼或API Key"
        }
    )
)

# 傳入 Agent 的 tools 參數
from google.adk.agents import LlmAgent
agent = LlmAgent(
    model="gemini-2.0-flash",
    name="sms_agent",
    tools=[smsgo_toolset]
)
from google.adk.tools.mcp_tool import MCPToolset, StdioServerParameters

smsgo_toolset = MCPToolset(
    connection_params=StdioServerParameters(
        command="python3",
        args=["/Users/your_username/mcp/smsgo_server.py"],
        env={
            "SMSGO_USERNAME": "your_smsgo_username",
            "SMSGO_PASSWORD": "your_password_or_api_key"
        }
    )
)

# Pass to your Agent's tools parameter
from google.adk.agents import LlmAgent
agent = LlmAgent(
    model="gemini-2.0-flash",
    name="sms_agent",
    tools=[smsgo_toolset]
)

在 Cursor 設定中新增 MCP 伺服器,設定檔路徑:~/.cursor/mcp.json(全域)或專案根目錄下的 .cursor/mcp.json Add the MCP server in Cursor settings. Config file: ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project root.

{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["/Users/你的帳號/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "你的SMSGO帳號",
        "SMSGO_PASSWORD": "你的密碼或API Key"
      }
    }
  }
}
{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["/Users/your_username/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "your_smsgo_username",
        "SMSGO_PASSWORD": "your_password_or_api_key"
      }
    }
  }
}
儲存後在 Cursor 的 Settings → MCP 重新整理,即可在 Composer (Agent mode) 中使用 SMSGO 工具。 After saving, refresh in Cursor's Settings → MCP. SMSGO tools will then be available in Composer (Agent mode).

編輯 Windsurf 的 MCP 設定檔:~/.codeium/windsurf/mcp_config.json Edit Windsurf's MCP config file: ~/.codeium/windsurf/mcp_config.json.

{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["/Users/你的帳號/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "你的SMSGO帳號",
        "SMSGO_PASSWORD": "你的密碼或API Key"
      }
    }
  }
}
{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["/Users/your_username/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "your_smsgo_username",
        "SMSGO_PASSWORD": "your_password_or_api_key"
      }
    }
  }
}
儲存後重啟 Windsurf。在 Cascade (Agent mode) 對話框中即可直接呼叫 SMSGO 工具。 After saving, restart Windsurf. SMSGO tools will be available directly in the Cascade (Agent mode) chat.

NanoClaw 是一個在 WhatsApp、Telegram、Slack、Discord、Teams 等通訊軟體上運行的個人 AI Agent,底層使用 Claude Code,天然支援 MCP。只需在 NanoClaw 專案根目錄的 .mcp.json 中加入 SMSGO 設定即可。 NanoClaw is a personal AI agent for WhatsApp, Telegram, Slack, Discord, and Teams, powered by Claude Code — with native MCP support. Just add the SMSGO config to the .mcp.json file in your NanoClaw project root.

① 編輯 NanoClaw 專案根目錄的 .mcp.json ① Edit .mcp.json in your NanoClaw project root
{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["~/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "你的SMSGO帳號",
        "SMSGO_PASSWORD": "你的密碼或API Key"
      }
    }
  }
}
{
  "mcpServers": {
    "smsgo": {
      "command": "python3",
      "args": ["~/mcp/smsgo_server.py"],
      "env": {
        "SMSGO_USERNAME": "your_smsgo_username",
        "SMSGO_PASSWORD": "your_password_or_api_key"
      }
    }
  }
}
② 重啟 NanoClaw(或讓 Agent 自動完成) ② Restart NanoClaw (or let the agent do it for you)

儲存後重啟 NanoClaw Docker 容器,SMSGO 工具即自動載入。也可以直接在通訊軟體中對 NanoClaw Agent 說: Save the file and restart the NanoClaw Docker container — SMSGO tools load automatically. Alternatively, just tell your NanoClaw agent directly in your messaging app:

請在 .mcp.json 中加入 SMSGO MCP Server,帳號是 my_account,密碼是 my_password,檔案路徑 ~/mcp/smsgo_server.py。 Please add the SMSGO MCP server to .mcp.json with username my_account, password my_password, script at ~/mcp/smsgo_server.py.
🤖
已更新 .mcp.json 並重啟 MCP 連線,現在您可以直接說「傳簡訊給 09xxxxxxxx」。 Updated .mcp.json and reloaded MCP connections. You can now say "Send SMS to 09xxxxxxxx" directly.
💡 NanoClaw 底層是 Claude Code,與 Claude Code CLI 使用完全相同的 .mcp.json 格式。SMSGO MCP Server 設定完成後,在任何連接的通訊頻道(WhatsApp、Telegram、Slack 等)都可以用自然語言觸發傳簡訊。 💡 NanoClaw runs on Claude Code internally, so it uses the exact same .mcp.json format. Once configured, you can trigger SMS sending via natural language from any connected messaging channel (WhatsApp, Telegram, Slack, etc.).

OpenClaw 是一個可在 WhatsApp、Telegram、Discord、Slack、Signal 等平台運行的本地 AI Agent,使用 openclaw mcp set CLI 指令即可一行加入 SMSGO。 OpenClaw is a local AI agent for WhatsApp, Telegram, Discord, Slack, Signal, and more. Add SMSGO in one CLI command using openclaw mcp set.

① 安裝並啟動 OpenClaw(若尚未完成) ① Install and start OpenClaw (if not already done)
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard
② 用一行指令加入 SMSGO MCP Server ② Add the SMSGO MCP server with one command
openclaw mcp set smsgo \
  '{"command":"python3","args":["~/mcp/smsgo_server.py"],"env":{"SMSGO_USERNAME":"你的SMSGO帳號","SMSGO_PASSWORD":"你的密碼或API Key"}}'
openclaw mcp set smsgo \
  '{"command":"python3","args":["~/mcp/smsgo_server.py"],"env":{"SMSGO_USERNAME":"your_smsgo_username","SMSGO_PASSWORD":"your_password_or_api_key"}}'
③ 確認已成功註冊 ③ Verify the server is registered
openclaw mcp list

輸出中應出現 smsgo 條目。設定即時生效,無需重啟。 You should see a smsgo entry in the output. The config takes effect immediately — no restart needed.

💡 要移除設定,執行 openclaw mcp unset smsgo。OpenClaw 支援 stdio 與 HTTP/SSE 兩種傳輸方式;smsgo_server.py 使用 stdio,為預設建議方式。 💡 To remove: openclaw mcp unset smsgo. OpenClaw supports both stdio and HTTP/SSE transports; smsgo_server.py uses stdio, which is the recommended default.

5 使用範例 Example Usage

直接用自然語言對話操作 Talk to Claude naturally
傳簡訊給 0912345678,內容是「您的訂單已出貨,請注意收件。」
🤖
已透過 SMSGO 傳送簡訊給 0912345678,msgid: 1504280910499665,狀態:成功,剩餘點數:142。
我還有多少點數?
🤖
您的帳號目前剩餘 142 點
發 OTP 給 0987654321,然後幫我驗證碼 5823。
🤖
OTP 已發送(serial: 1504280910512345)。驗證碼 5823 驗證結果:成功 ✓
You
Send an SMS to 0912345678 saying "Your order has shipped. Please watch for delivery."
🤖
SMS sent via SMSGO to 0912345678. msgid: 1504280910499665, status: Success, remaining points: 142.
You
How many points do I have left?
🤖
Your account has 142 points remaining.
You
Send an OTP to 0987654321, then verify code 5823.
🤖
OTP sent (serial: 1504280910512345). Code 5823 verified: Success ✓
query_replies查詢收件人回覆 Query recipient replies
查詢 2026/06/01 到 2026/06/04 這段時間有哪些人回覆了簡訊?
🤖
以下是這段期間收到的回覆:

📱 0912345678:「好的,我會注意。」(收到時間:2026/06/02 10:15:00)
📱 0987654321:「謝謝」(收到時間:2026/06/03 14:30:00)

共 2 則回覆。
把這些回覆整理成表格給我。
🤖
| 回覆門號 | 回覆內容 | 收到時間 |
|---|---|---|
| 0912345678 | 好的,我會注意。 | 2026/06/02 10:15 |
| 0987654321 | 謝謝 | 2026/06/03 14:30 |
You
Show me all reply messages received between 2026/06/01 and 2026/06/04.
🤖
Here are the replies received during that period:

📱 0912345678: "OK, noted." (received: 2026/06/02 10:15:00)
📱 0987654321: "Thank you" (received: 2026/06/03 14:30:00)

2 replies total.
You
Summarise those replies in a table.
🤖
| Phone | Reply | Received |
|---|---|---|
| 0912345678 | OK, noted. | 2026/06/02 10:15 |
| 0987654321 | Thank you | 2026/06/03 14:30 |
query_sent_list查詢發送紀錄 Query sent message history
幫我查一下六月份的發送紀錄,看有哪些門號收到了簡訊。
🤖
已查詢 2026/06/01 ~ 2026/06/30 的發送紀錄,共 128 筆(第 1 頁,共 3 頁):

✅ 0912345678 — 「您的訂單已出貨」— DELIVRD(2026/06/01 09:00)
✅ 0987654321 — 「您的訂單已出貨」— DELIVRD(2026/06/01 09:00)
⏳ 0933111222 — 「活動優惠通知」— ENROUTE(2026/06/02 14:30)
… 以此類推
0933111222 那筆狀態是 ENROUTE,幫我單獨查一下它的即時狀態。
🤖
已查詢 0933111222 的最新傳送狀態:DELIVRD ✓,簡訊已成功送達。
You
Pull up the sent message history for June and tell me which numbers received SMS.
🤖
Queried sent list for 2026/06/01 – 2026/06/30: 128 records (page 1 of 3):

✅ 0912345678 — "Your order has shipped" — DELIVRD (2026/06/01 09:00)
✅ 0987654321 — "Your order has shipped" — DELIVRD (2026/06/01 09:00)
⏳ 0933111222 — "Promotional offer" — ENROUTE (2026/06/02 14:30)
… and so on
You
0933111222 shows ENROUTE — check its current delivery status.
🤖
Checked delivery status for 0933111222: DELIVRD ✓ — message successfully delivered.
send_sms_csv個人化大量簡訊 Personalised bulk SMS
幫我發個人化簡訊給以下三位客戶:
0912345678 → 張先生您好,您的訂單 #A001 已出貨!
0987654321 → 李小姐您好,您的訂單 #B002 已出貨!
0933111222 → 王先生您好,您的訂單 #C003 已出貨!
🤖
已透過 SMSGO CSV 功能發送個人化簡訊:

✅ 0912345678(#A001)— 發送成功,msgid: S202606040901001
✅ 0987654321(#B002)— 發送成功,msgid: S202606040901002
✅ 0933111222(#C003)— 發送成功,msgid: S202606040901003

共 3 筆,全部成功,剩餘點數:139。
預約明天早上八點發送,內容一樣。
🤖
已預約 3 筆個人化簡訊於 2026/06/05 08:00:00 發送,全部排程成功。
You
Send personalised SMS to these three customers:
0912345678 → Hello John, your order #A001 has shipped!
0987654321 → Hello Mary, your order #B002 has shipped!
0933111222 → Hello Bob, your order #C003 has shipped!
🤖
Sent personalised SMS via SMSGO CSV:

✅ 0912345678 (#A001) — Success, msgid: S202606040901001
✅ 0987654321 (#B002) — Success, msgid: S202606040901002
✅ 0933111222 (#C003) — Success, msgid: S202606040901003

3 sent, all successful. Remaining points: 139.
You
Schedule the same messages for tomorrow at 8 AM.
🤖
Scheduled 3 personalised SMS for 2026/06/05 08:00:00. All queued successfully.
query_delivery_report投遞狀態報告 Delivery status report
幫我查一下本週的投遞報告,看有沒有傳送失敗的門號。
🤖
已查詢 2026/06/02 ~ 2026/06/04 的投遞報告,共 256 筆

✅ DELIVRD(已送達):248 筆
❌ UNDELIV(無法送達):5 筆
⏳ ENROUTE(傳送中):3 筆

失敗門號:0912000001、0912000002、0912000003、0912000004、0912000005
把失敗的門號整理成清單,然後重新發送一次。
🤖
已重新發送簡訊給 5 個失敗門號,msgid: S202606041200001,狀態:成功 ✓
You
Pull this week's delivery report and tell me if any messages failed.
🤖
Delivery report for 2026/06/02 – 2026/06/04, 256 records:

✅ DELIVRD (delivered): 248
❌ UNDELIV (failed): 5
⏳ ENROUTE (pending): 3

Failed numbers: 0912000001, 0912000002, 0912000003, 0912000004, 0912000005
You
Resend to all the failed numbers.
🤖
Resent SMS to 5 failed recipients. msgid: S202606041200001 — Success ✓

6 📡 MO Webhook 接收器 📡 MO Webhook Receiver

運作原理 How It Works
收件人回覆簡訊後,SMSGO 平台會以 HTTP GET 呼叫您登錄的 Webhook URL,並帶入以下參數:srcaddr(回覆號碼)、dstaddr(您的號碼)、smbody(回覆內容)、timestampmsgid。MCP Server 內建一個輕量 HTTP 伺服器,可在本機接收這些呼叫,並讓 Claude 直接讀取回覆內容。 When a recipient replies to your SMS, SMSGO calls your registered webhook URL via HTTP GET with params: srcaddr, dstaddr, smbody, timestamp, msgid. The MCP server embeds a lightweight HTTP server that receives these callbacks locally, letting Claude read the replies directly.
Recipient replies
        │
        ▼
  SMSGO platform
        │  HTTP GET  srcaddr · dstaddr · smbody · timestamp · msgid
        ▼
  Public URL  (trycloudflare.com tunnel  OR  your own domain:port)
        │
        ▼
  smsgo_server.py  local HTTP server  :8765/mo_receive
        │  buffers up to 200 messages in memory
        ▼
  Claude reads via  get_received_mo()
選項 A — trycloudflare.com(無需自有伺服器) Option A — trycloudflare.com (no server needed)

安裝 cloudflared 後,MCP Server 會自動建立免費的公開隧道,無需設定 DNS 或防火牆。 Install cloudflared and the MCP server will automatically create a free public tunnel — no DNS or firewall configuration needed.

# macOS
brew install cloudflare/cloudflare/cloudflared

# Linux
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 \
     -o cloudflared && chmod +x cloudflared

在 MCP 設定中加入以下環境變數,即可在啟動時自動開啟隧道並向 SMSGO 登錄: Add these env vars to auto-start the tunnel and register it with SMSGO on launch:

"env": {
  "SMSGO_USERNAME":    "your_username",
  "SMSGO_PASSWORD":    "your_password",
  "SMSGO_MO_ENABLED":  "true",
  "SMSGO_MO_REGISTER": "true"
}
⚠️ trycloudflare 隧道 URL 每次啟動都會變更。如需固定網址,請使用選項 B。 ⚠️ trycloudflare URLs change on every restart. Use Option B for a stable URL.
選項 B — 自訂網域或公開 IP Option B — Own domain or public IP

若您有固定 IP 或反向代理(nginx、Caddy 等),設定 SMSGO_MO_PUBLIC_URL 即可略過 cloudflared。 If you have a static IP or reverse proxy (nginx, Caddy…), set SMSGO_MO_PUBLIC_URL to skip cloudflared.

"env": {
  "SMSGO_USERNAME":       "your_username",
  "SMSGO_PASSWORD":       "your_password",
  "SMSGO_MO_ENABLED":     "true",
  "SMSGO_MO_PORT":        "8765",
  "SMSGO_MO_PUBLIC_URL":  "https://mo.example.com",
  "SMSGO_MO_REGISTER":    "true"
}

SMSGO 將呼叫:https://mo.example.com/mo_receive?srcaddr=…&smbody=… SMSGO will call: https://mo.example.com/mo_receive?srcaddr=…&smbody=…

讓 Claude 管理接收器 Let Claude manage the receiver
👤
啟動 MO 接收器,用 cloudflare 隧道,然後登錄到我的 SMSGO 帳號。
Start the MO receiver with a cloudflare tunnel, then register it with my SMSGO account.
🤖
已啟動本機 HTTP 伺服器(埠 8765)並建立 cloudflare 隧道。

🌐 公開 URL:https://swift-fox-123.trycloudflare.com
📡 Webhook:https://swift-fox-123.trycloudflare.com/mo_receive

已向您的 SMSGO 帳號登錄此 Webhook,statuscode: 0 ✓

現在只要有人回覆您的簡訊,我就能即時接收。
Local HTTP server started on port 8765 with a cloudflare tunnel.

🌐 Public URL: https://swift-fox-123.trycloudflare.com
📡 Webhook: https://swift-fox-123.trycloudflare.com/mo_receive

Registered with your SMSGO account — statuscode: 0 ✓

Any reply to your SMS number will now be delivered to me in real time.
👤
有沒有新的回覆?
Any new replies?
🤖
收到 2 則回覆:

📱 0912345678:「已收到,謝謝!」(2026-06-18 14:32:10)
📱 0987654321:「請問什麼時候到貨?」(2026-06-18 14:35:44)
2 replies received:

📱 0912345678: "Got it, thanks!" (2026-06-18 14:32:10)
📱 0987654321: "When will my order arrive?" (2026-06-18 14:35:44)
👤
完成了,請停止接收器。
I'm done, please stop the receiver.
🤖
MO 接收器已停止,cloudflare 隧道已關閉。
MO receiver stopped and cloudflare tunnel closed.

7 環境變數參考 Environment Variables

變數名稱Variable 必填Required 說明Description
SMSGO_USERNAME ✓ 必填✓ Yes SMSGO 帳號SMSGO account username
SMSGO_PASSWORD ✓ 必填✓ Yes 密碼或 API KeyPassword or API Key
SMSGO_BASE_URL 選填No API 伺服器位址,預設 https://www.smsgo.com.tw API base URL, defaults to https://www.smsgo.com.tw
📡 MO Webhook 接收器📡 MO Webhook Receiver
SMSGO_MO_ENABLED 選填No 設為 true 可在啟動時自動開啟 HTTP 接收伺服器(預設 false Set true to auto-start the HTTP receiver on launch (default false)
SMSGO_MO_PORT 選填No 本機監聽埠號,預設 8765 Local port to listen on, default 8765
SMSGO_MO_PATH 選填No 回呼路徑,預設 /mo_receive Callback URL path, default /mo_receive
SMSGO_MO_PUBLIC_URL 選填No 自訂公開網址(如 https://mo.example.com),省略時自動啟用 trycloudflare 隧道 Your own public URL (e.g. https://mo.example.com). Omit to use a trycloudflare.com tunnel
SMSGO_MO_REGISTER 選填No 設為 true 可在啟動時自動向 SMSGO 帳號登錄 Webhook URL(預設 false Set true to auto-register the webhook URL with SMSGO on startup (default false)