notify-phone-mcp
Allows sending notifications to Discord through an Apprise Discord webhook URL configured via NOTIFY_URL or NOTIFY_URLS.
Allows sending push notifications to ntfy topics via ntfy.sh or a self-hosted ntfy server, optionally using an access token and priority levels such as high for failures.
Allows sending notifications to Slack through an Apprise Slack webhook URL configured via NOTIFY_URL or NOTIFY_URLS.
Allows sending notifications to Telegram through an Apprise Telegram bot URL using a bot token and chat ID configured via NOTIFY_URL or NOTIFY_URLS.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@notify-phone-mcp Send me a high-priority push notification that the experiment finished."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-Notify-Phone
輕量、通用、邏輯與介面抽離的手機推播通知工具,專為 AI Agent 監督長時間執行的實驗/訓練腳本 而設計。
MCP 標準優先:原生提供標準 Model Context Protocol(MCP)Server(
notify-phone-mcp),可直接接入 Antigravity、Claude Code / Desktop、Cursor、Windsurf 等支援 MCP 的工具。邏輯與介面抽離:推播核心(
notifier.py+config.py)獨立於介面層,同時提供 MCP Server 與 CLI(notify-phone)。基於開源 Apprise(BSD-2-Clause 授權):預設以
ntfy.sh為主,免改程式碼即可透過環境變數切換為 Discord、Telegram、Slack、Bark、Pushover 等 80+ 種通知管道。
專案架構
MCP-Notify-Phone/
├── pyproject.toml # 標準 Python 打包設定(支援 uvx / pipx / venv)
├── LICENSE # MIT License
├── .env.example # 環境變數範本
├── src/notify_phone/
│ ├── config.py # 環境變數與 URL 標準化(自動支援 https://ntfy.sh/... 與 ntfy://...)
│ ├── notifier.py # 核心推播邏輯層(封裝 Apprise)
│ ├── mcp_server.py # MCP Server 介面層(notify-phone-mcp)
│ └── cli.py # CLI 介面層(notify-phone)
└── tests/ # 單元測試Related MCP server: notify-mcp
一、手機端設定說明(以 ntfy 為例)
ntfy 是免費開源的推播服務,不需註冊帳號即可開始使用:
在手機安裝 ntfy App
iOS:到 App Store 搜尋並安裝 ntfy(開發者:Philipp C. Heckel)。
Android:到 Google Play 或 F-Droid 安裝 ntfy。
開啟 App 時請允許推播通知權限。
決定一個專屬且不易被猜到的頻道名稱(Topic)
公開的
ntfy.sh頻道沒有預設密碼,任何知道頻道名稱的人都能收發訊息,請勿使用test、notify等簡單名稱。建議格式:
<你的代號>-exp-<隨機字串>,例如my-exp-9f3k2m8x(長度 16 字元以上為佳)。
在手機 App 訂閱該頻道
點擊 App 右下角
+(訂閱主題 / Subscribe to topic)。主題名稱填入剛取的頻道名稱,保留預設伺服器
https://ntfy.sh,點擊「訂閱(Subscribe)」。
進階提示(可選)
實驗失敗時工具會送出
priority="high",可在手機系統設定中將 ntfy App 設為不受省電限制,確保能即時收到通知。若需要更高隱私,可搭配
ntfy.sh帳號 Access Token 或自架 ntfy 伺服器(設定NTFY_SERVER與NTFY_TOKEN)。
二、快速使用(從 GitHub 直接執行,免手動裝環境)
方式 A:使用 uvx(推薦,不污染主機 Python)
在你的 MCP 設定檔(例如 Antigravity 的 ~/.gemini/config/mcp_config.json)加入:
{
"mcpServers": {
"notify-phone": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/JohnnyDo0730/MCP-Notify-Phone",
"notify-phone-mcp"
],
"env": {
"NOTIFY_URL": "ntfy://換成你的秘密頻道"
}
}
}
}也可以直接用 uvx 測試 CLI 推播:
NOTIFY_URL="ntfy://換成你的秘密頻道" uvx \
--from git+https://github.com/JohnnyDo0730/MCP-Notify-Phone \
notify-phone --title "測試通知" --message "從 GitHub 公開版發送成功!" --level success方式 B:使用 pipx 安裝到隔離環境
pipx install git+https://github.com/JohnnyDo0730/MCP-Notify-Phone安裝完成後,在 mcp_config.json 直接設定 "command": "notify-phone-mcp" 並透過 "env" 傳入 NOTIFY_URL 即可。
方式 C:使用標準 Python 獨立虛擬環境(venv)
python3 -m venv .venv
.venv/bin/pip install git+https://github.com/JohnnyDo0730/MCP-Notify-Phone
# 測試發送通知
NOTIFY_URL="ntfy://換成你的秘密頻道" .venv/bin/notify-phone \
--title "測試通知" \
--message "透過獨立 venv 安裝成功!" \
--level success在 mcp_config.json 中將 command 指向該虛擬環境的 /path/to/.venv/bin/notify-phone-mcp 即可。
NOTIFY_URL同時支援ntfy://你的頻道與https://ntfy.sh/你的頻道(程式會自動正規化)。
三、本機開發與打包
git clone https://github.com/JohnnyDo0730/MCP-Notify-Phone.git
cd MCP-Notify-Phone
# 建立隔離虛擬環境並安裝開發依賴
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
# 執行測試
.venv/bin/pytest -v
# 打包 Wheel (.whl) 與原始碼壓縮包 (.tar.gz)
.venv/bin/pip install build
.venv/bin/python -m build四、環境變數與多通道支援(Apprise)
環境變數 | 說明 | 範例 |
| 單一推播目標(Apprise URL 或 |
|
| 多個推播目標(逗號或換行分隔,優先於 |
|
| ntfy 快捷設定(未設 |
|
| 選填,自架 ntfy 伺服器網址 |
|
| 選填,ntfy Access Token |
|
| 選填,未傳入標題時的預設值 |
|
切換其他推播平台只需修改 NOTIFY_URL,無需修改程式碼:
Discord Webhook:
discord://<WebhookID>/<WebhookToken>Telegram Bot:
tgram://<BotToken>/<ChatID>Slack Webhook:
slack://<TokenA>/<TokenB>/<TokenC>Bark (iOS):
bark://<DeviceKey>@api.day.app更多支援清單請見 Apprise Wiki。
授權聲明
本專案採用 MIT License。
所依賴之 Apprise 採用 BSD-2-Clause 開源授權。
Available Tools
1 toolsend_phone_notificationA
發送推播通知到使用者的手機或指定通訊管道。
使用時機:
僅在使用者明確要求「完成後通知我」、「發手機通知」,或長時間執行的實驗/訓練腳本結束 (成功或失敗中斷)需回報結果時,於所有主要工作結束後的「最後一步」呼叫此工具。
一般簡短問答或使用者未要求通知的任務,請勿主動呼叫。
參數說明:
title: 簡短明確的通知標題(例如「實驗訓練完成」或「腳本異常中止」)。
message: 任務結果摘要,建議包含執行狀態、耗時、關鍵數據指標(如 loss/accuracy)或錯誤原因。
level: 通知類型,可選 "info"、"success"、"warning"、"failure"(預設 "info")。
priority: 推播優先級,可選 "min"、"low"、"default"、"high"、"max" (實驗失敗或需立即處理時建議使用 "high")。
Inputs: title (required), message (required), level, priority. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of selection ambiguity. Its purpose (send a phone notification at the end of a task) is clearly stated and scoped.
The single tool follows a clear verb_noun pattern (send_phone_notification) in snake_case. With one tool there is no convention mixing to penalize.
The server's purpose is deliberately narrow—one notification operation—so a single tool is nearly the right scope rather than a mismatch. It is slightly thin (no status check or channel listing), but each parameter earns its place.
The core lifecycle of 'compose and send a notification' is covered with title, message, level, and priority. Minor gaps exist—no delivery-status query, no batch send, and the description mentions a 'specified channel' without exposing a channel parameter—but agents can work around these.
Maintenance
Related MCP Connectors
Push notifications for AI agents - send instant iPhone notifications from any MCP client.
Send yourself a push notification from an AI assistant. No account, one environment variable.
Let your AI agent notify you by email, Slack, Discord, or webhook. One tool: send_notification.
Push notifications with personalized sounds - manage and trigger your vybits via MCP
Related MCP Servers
- AlicenseBqualityDmaintenancePushinator MCP lets you send push notifications to your devices from your LLM-powered workflows.1MIT
- FlicenseAqualityDmaintenanceEnables AI to send push notifications to your phone via a configurable gateway. It is a thin wrapper that posts to an Apprise push gateway.1-
- AlicenseNot gradedqualityDmaintenanceSend push notifications to mobile devices via ntfy.sh from AI assistants.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that enables agents to send tagged notifications through Apprise, run one-off URL sends, and check upstream health via stdio or streamable HTTP.2AGPL 3.0