notiferry-mcp
Official# notiferry-mcp
[](LICENSE)
[](https://glama.ai/mcp/servers/n2ctech/notiferry-mcp)
Zero-dependency **Model Context Protocol (MCP) server**, **Claude Code plugin (`Notification` & `Stop` hooks)**, and **Agent Skill** that sends push notifications to your **iPhone and Apple Watch** via the free [ntfy](https://ntfy.sh) app when long-running AI coding sessions finish or pause for permission.
Works with **Claude Code**, **OpenAI Codex CLI**, **Cursor**, **Windsurf**, **Claude Desktop**, **Cline**, and self-hosted `ntfy` servers.
---
## Quickstart (60 seconds)
### 1. Subscribe your iPhone in the free `ntfy` app
1. Install the free open-source **[ntfy](https://apps.apple.com/app/ntfy/id1625396347)** app on your iPhone.
2. Generate a private random topic on your machine and subscribe to it in `ntfy`:
```bash
export NTFY_TOPIC="nf-$(openssl rand -hex 16)"
echo "$NTFY_TOPIC"
```
*(Treat your topic name like a password - anyone with a public `ntfy.sh` topic string can read or post to it, or point `NTFY_SERVER` + `NTFY_TOKEN` at your own HTTPS `ntfy` server.)*
### 2A. Add as an MCP Server (Claude Code, Cursor, Codex, Windsurf)
**Claude Code CLI:**
```bash
claude mcp add notiferry-mcp \
-e NTFY_TOPIC="nf-your-random-topic" \
-- npx -y github:n2ctech/notiferry-mcp
```
**Cursor / Windsurf / Claude Desktop (`mcp.json`):**
```json
{
"mcpServers": {
"notiferry-mcp": {
"command": "npx",
"args": ["-y", "github:n2ctech/notiferry-mcp"],
"env": {
"NTFY_TOPIC": "nf-your-random-topic"
}
}
}
}
```
### 2B. Or install as a Claude Code Plugin (automatic `Notification` + `Stop` hooks)
Inside Claude Code:
```text
/plugin marketplace add n2ctech/notiferry-mcp
/plugin install notiferry-mcp@n2ctech
```
With `NTFY_TOPIC` exported in your shell, the plugin automatically sends a high-priority iPhone alert whenever Claude Code blocks on a tool-permission prompt (`Notification` hook) or completes a run (`Stop` hook), without requiring the model to remember to call a tool.
---
## Included MCP Tools
| Tool | Purpose |
| --- | --- |
| `send_iphone_notification` | Send a push alert (`title`, `message`, `priority`, `tags`, optional HTTPS `click_url`) when a build, test suite, or task finishes. |
| `notify_agent_waiting` | Send a high-priority alert when an agent is blocked waiting for human approval or a decision. |
| `check_macos_notification_setup` | Check `NTFY_TOPIC`, `~/.claude/settings.json` hooks, and whether system-wide macOS Notification Center forwarding is active. |
**Built-in safety guardrails:**
- Zero npm runtime dependencies (uses only Node.js `>=18` built-in modules).
- Enforces HTTPS on `NTFY_SERVER` and `click_url`.
- Blocks accidental transmission of common secret patterns (`sk-...`, `ghp_...`, `AKIA...`, `tk_...`, PEM private keys).
---
## Free MCP/Hook vs. Full macOS Notification Center Forwarding
`notiferry-mcp` is free and MIT-licensed, and covers any tool where an MCP client or shell hook runs. If you are on macOS and also want automatic iPhone alerts from **every desktop Mac app** without per-app hooks, compare the two approaches:
| Capability | `notiferry-mcp` (this repo) | [NotiFerry for macOS](https://notiferry.com) |
| --- | --- | --- |
| **Price & license** | Free, open source (MIT) | 7-day free trial, then EUR 9.99 once (2 Macs) |
| **Claude Code / MCP tools** | Yes (MCP tools + `hooks.json`) | Yes (forwards terminal & desktop banners) |
| **GUI Mac apps (Xcode, Cursor, Codex Desktop, Ghostty, Finder, exports)** | Requires per-tool hook or script | Automatic via macOS Notification Center |
| **macOS permission model** | None (outbound HTTPS only) | App Sandbox + read-only single `usernoted` folder (no Full Disk Access) |
| **Privacy modes (`Title only` / `Generic`)** | Manual prompt discipline | Enforced locally before queuing |
| **Burst folding & stale-alert cutoff** | Basic | Folds 5+ queued alerts when >=30s behind; drops alerts >10 min old |
If you want the companion macOS menu-bar app ([NotiFerry](https://notiferry.com), which I built):
```bash
brew install --cask n2ctech/tap/notiferry
```
Note: when `NotiFerry.app` is running on your Mac, `scripts/claude-ntfy-hook.sh` automatically skips duplicate hook sends unless `NOTIFERRY_SKIP_HOOK_WHEN_APP_RUNNING=0` is set.
---
## Environment Variables
| Variable | Required | Description |
| --- | --- | --- |
| `NTFY_TOPIC` | Yes | Random 1-64 char topic (`A-Za-z0-9_-`) subscribed in your iPhone `ntfy` app. |
| `NTFY_SERVER` | No | Defaults to `https://ntfy.sh`. Set to your own HTTPS `ntfy` server URL if self-hosted. |
| `NTFY_TOKEN` | No | Optional Bearer access token (`tk_...`) for protected or self-hosted `ntfy` topics. |
## Development & Tests
```bash
npm test
```
## License
MIT - see [LICENSE](LICENSE).
TDQS
Scored across 3 tools
All three tools target distinct actions (send routine completion push, send high-priority blocked alert, inspect setup), but the two send tools overlap in mechanism and could be confused for one another without reading the urgency/context distinction. Descriptions do enough to separate them in practice.
All names use snake_case with a verb-leading pattern (send_, notify_, check_), which is predictable. The verbs and structure lengths vary slightly, but the convention is clearly readable and consistent.
Three tools is thin but appropriate for a narrowly scoped notification bridge. Each tool covers a genuinely different scenario without padding.
The surface covers sending and verifying setup, but there is no way to configure NTFY_TOPIC or register hooks from the tool set, so an agent that fails the setup check hits a dead end. No test-send or notification history/status tools either.