1 提供的工具 (Tools) Available Tools
📡 MO Webhook 接收器工具 📡 MO Webhook Receiver Tools
2 安裝步驟 Setup Guide
需要 Python 3.10+。開啟終端機執行: Requires Python 3.10+. Run in terminal:
pip3 install "mcp[cli]" httpx
下載後建議放在 ~/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 → 設定 → 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"
}
}
}
}
~/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。左下角工具列應出現 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.
pip install openai-agents
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())
pip install google-adk
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"
}
}
}
}
編輯 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"
}
}
}
}
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.
.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 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 設定完成後,在任何連接的通訊頻道(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.
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard
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"}}'
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
query_replies —
查詢收件人回覆
Query recipient replies
📱 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 |
📱 0912345678: "OK, noted." (received: 2026/06/02 10:15:00)
📱 0987654321: "Thank you" (received: 2026/06/03 14:30:00)
2 replies total.
|---|---|---|
| 0912345678 | OK, noted. | 2026/06/02 10:15 |
| 0987654321 | Thank you | 2026/06/03 14:30 |
query_sent_list —
查詢發送紀錄
Query sent message history
✅ 0912345678 — 「您的訂單已出貨」— DELIVRD(2026/06/01 09:00)
✅ 0987654321 — 「您的訂單已出貨」— DELIVRD(2026/06/01 09:00)
⏳ 0933111222 — 「活動優惠通知」— ENROUTE(2026/06/02 14:30)
… 以此類推
✅ 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
send_sms_csv —
個人化大量簡訊
Personalised bulk SMS
0912345678 → 張先生您好,您的訂單 #A001 已出貨!
0987654321 → 李小姐您好,您的訂單 #B002 已出貨!
0933111222 → 王先生您好,您的訂單 #C003 已出貨!
✅ 0912345678(#A001)— 發送成功,msgid: S202606040901001
✅ 0987654321(#B002)— 發送成功,msgid: S202606040901002
✅ 0933111222(#C003)— 發送成功,msgid: S202606040901003
共 3 筆,全部成功,剩餘點數:139。
0912345678 → Hello John, your order #A001 has shipped!
0987654321 → Hello Mary, your order #B002 has shipped!
0933111222 → Hello Bob, your order #C003 has shipped!
✅ 0912345678 (#A001) — Success, msgid: S202606040901001
✅ 0987654321 (#B002) — Success, msgid: S202606040901002
✅ 0933111222 (#C003) — Success, msgid: S202606040901003
3 sent, all successful. Remaining points: 139.
query_delivery_report —
投遞狀態報告
Delivery status report
✅ DELIVRD(已送達):248 筆
❌ UNDELIV(無法送達):5 筆
⏳ ENROUTE(傳送中):3 筆
失敗門號:0912000001、0912000002、0912000003、0912000004、0912000005
✅ DELIVRD (delivered): 248
❌ UNDELIV (failed): 5
⏳ ENROUTE (pending): 3
Failed numbers: 0912000001, 0912000002, 0912000003, 0912000004, 0912000005
6 📡 MO Webhook 接收器 📡 MO Webhook Receiver
srcaddr(回覆號碼)、dstaddr(您的號碼)、smbody(回覆內容)、timestamp、msgid。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()
安裝 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"
}
若您有固定 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=…
🌐 公開 URL:https://swift-fox-123.trycloudflare.com
📡 Webhook:https://swift-fox-123.trycloudflare.com/mo_receive
已向您的 SMSGO 帳號登錄此 Webhook,statuscode: 0 ✓
現在只要有人回覆您的簡訊,我就能即時接收。
🌐 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.
📱 0912345678:「已收到,謝謝!」(2026-06-18 14:32:10)
📱 0987654321:「請問什麼時候到貨?」(2026-06-18 14:35:44)
📱 0912345678: "Got it, thanks!" (2026-06-18 14:32:10)
📱 0987654321: "When will my order arrive?" (2026-06-18 14:35:44)