notify-mcp

notify-mcp

Provides a send_notification MCP tool for push notifications to mobile devices, bypassing Claude Code's suppression of pushes when terminal has focus. Works with multiple providers like ntfy, Pushover, and Telegram.

Category
访问服务器

README

notify-mcp

Generic push-to-phone notifications for any agent or script. Exposes a send_notification MCP tool (available in every Claude Code session) plus a CLI (notify) for cron jobs, daemons, and other non-agent callers — both backed by one provider-agnostic core.

Why it exists: Claude Code's built-in PushNotification tool suppresses the mobile push whenever the terminal "has focus" or the user typed recently. On a remote setup the terminal always reads as focused, so every push is silently dropped. notify-mcp is an independent path that ignores that gate.

Architecture

caller ─┬─ MCP tool  (Claude agents, any session)  ─┐
        └─ CLI / import  (cron, daemons, scripts)   ─┴─► sendNotification() ──► provider (ntfy | pushover | telegram) ──► phone
  • src/notify.ts — provider-agnostic core: defaults, truncation, retries w/ backoff, logging. Never throws.
  • src/providers/ — one file per provider behind a common Provider interface.
  • src/mcp.ts — stdio MCP server exposing send_notification.
  • src/cli.ts — thin CLI wrapper.

For agents (MCP tool)

Tool: send_notification. Registered globally, so every Claude session/project inherits it.

Param Required Notes
message yes The alert body. Lead with the actionable fact.
title no Bold title; defaults to config defaults.title.
priority no min | low | default | high | max. high/max can pierce Do-Not-Disturb.
tags no Labels / ntfy emoji shortcodes, e.g. ["warning"].
source no Caller name; rendered as [source] prefix on the title so the user knows the origin.
click no URL to open when the notification is tapped.

When to use it: genuine decision + time-sensitivity — an approval/auth needed, a failure, a long job finished — assuming the user is away. Not routine status updates.

For scripts (CLI)

bun run /Users/doug/dev-local/notify-mcp/src/cli.ts \
  --title "Deploy" --priority high --source "ci" --tags "rocket" \
  "prod deploy finished in 4m12s"

Options: --title/-t, --priority/-p, --tags <a,b,c>, --source/-s, --click/-c, --help/-h. Exit code is 0 on success, nonzero on final failure — safe to use in a pipeline guard (notify "…" || true).

Programmatic use from another Bun/Node project:

import { sendNotification } from "/Users/doug/dev-local/notify-mcp/src/notify.ts";

const result = await sendNotification({ message: "hi", priority: "high" });

Config

Lives at ~/.config/notify-mcp/config.json (chmod 600, outside the repo). Override the path with NOTIFY_MCP_CONFIG. Template: config.example.json.

{
  "provider": "ntfy",
  "defaults": { "title": "Notification", "priority": "default", "maxLength": 512, "retries": 2, "timeoutMs": 5000 },
  "ntfy": { "server": "https://ntfy.sh", "topic": "<long-random-topic>" }
}

Switch providers by changing provider and filling the matching block:

  • ntfy{ server, topic }. On public ntfy.sh the topic is the password — keep it long, random, and out of logs/commits.
  • pushover{ token, user }. Private by design.
  • telegram{ botToken, chatId }.

Logs

Every attempt appends a JSONL line to ~/.config/notify-mcp/notify.log (ts, provider, ok, status, attempts, title, message, error). Log-write failures are swallowed so they can't break a caller.

Setup (one-time, user)

  1. Install the ntfy app (iOS/Android) and subscribe to your topic on server https://ntfy.sh.
  2. Copy config.example.json~/.config/notify-mcp/config.json, set the topic, chmod 600.
  3. The MCP server is registered in ~/.claude.json (global). New Claude sessions pick it up; an already-running session must be restarted to see the tool.

Test

bun run typecheck
bun run src/cli.ts --priority high "test push"   # expect: Sent via ntfy (HTTP 200, 1 attempt(s)).

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选