NTFY MCP Server
NTFY MCP Server
MCP-сервер для уведомлений ntfy.sh, асинхронного обмена сообщениями с агентами и рабочих процессов с участием человека.
Он предоставляет простой способ для MCP-клиента публиковать сообщения в тему ntfy, поддерживать активную подписку и ожидать ответов без создания пользовательского уровня обмена сообщениями.
Что он делает
Этот сервер полезен, когда вам нужно:
push-уведомления от агента, подключенного к MCP
асинхронный обмен сообщениями между пользователем и агентом
легкий цикл подтверждения или ответа от человека через
ntfyпростой канал уведомлений для длительных рабочих процессов
Типичный поток:
Пользователь или внешняя система публикует сообщение в тему
ntfy.MCP-клиент считывает его через
wait-and-read-inboxилиntfy://inbox.Агент отвечает через
send-ntfy.Пользователь получает ответ в виде push-уведомления
ntfy.
Related MCP server: Chat Human MCP Server
Возможности
публикация сообщений с необязательными заголовком, приоритетом, тегами и вложениями
поддержание постоянной подписки для доставки почти в реальном времени
переключение тем без перезапуска сервера
хранение последних сообщений в памяти и на диске
поддержка тем, защищенных токеном (bearer-token) и базовой аутентификацией (basic-auth)
работа с публичным
ntfy.sh«из коробки»
Установка
Установите глобально:
npm install -g nfty-mcp-serverИли запустите через npx:
npx -y --yes nfty-mcp-serverБыстрый старт
1. Выберите тему
Создайте или используйте существующую тему на ntfy.sh. Публичные темы легко настроить, поэтому выберите уникальное имя.
2. Настройте ваш MCP-клиент
Для Cursor или VS Code добавьте это в настройки MCP:
{
"mcpServers": {
"nfty": {
"command": "npx",
"args": ["-y", "--yes", "nfty-mcp-server"],
"env": {
"NTFY_TOPIC": "your-topic-name",
"NTFY_BASE_URL": "https://ntfy.sh"
}
}
}
}Для Claude Desktop добавьте ту же запись сервера в claude_desktop_config.json.
Примечания:
NTFY_TOPICобязателен--yesсохраняет установкиnpxв собственном кэше, не засоряя директорию проекта
3. Перезапустите клиент
Перезапустите Cursor, VS Code или Claude Desktop, чтобы MCP-сервер загрузился.
Инструменты
send-ntfy
Публикует сообщение в настроенную тему.
Параметры:
messageобязателенtitleнеобязателенpriorityнеобязателен, от1до5tagsнеобязателенattachUrlнеобязателен
Пример:
{
"message": "Task completed successfully.",
"title": "Task Status",
"priority": 4
}set-ntfy-topic
Переключает активную тему для текущей сессии.
Параметры:
topicобязателенbaseUrlнеобязателен
wait-and-read-inbox
Ожидает новые сообщения в настроенной теме и возвращает результат, когда приходит хотя бы одно.
Параметры:
sinceнеобязателенsinceTimeнеобязателенsinceNowнеобязателен, по умолчаниюtrue
Важно:
многие MCP-клиенты накладывают ограничение по времени ожидания (тайм-аут) примерно в 60 секунд
если вы ожидаете ввода от человека, клиент или вызывающий агент должен повторить попытку при тайм-ауте
Рекомендуемое поведение промпта для чат-потоков агента:
Если
wait-and-read-inboxзавершается по тайм-ауту в ожидании ответа пользователя, повторяйте попытку, пока не придет новое сообщение.
Ресурсы
ntfy://inbox
Возвращает последние сообщения для настроенной темы в формате JSON.
Пример структуры:
{
"topic": "your-topic",
"baseUrl": "https://ntfy.sh",
"messages": [
{
"id": "message-id",
"time": 1234567890,
"title": "Message Title",
"message": "Message body",
"priority": 3,
"tags": ["tag1"],
"topic": "your-topic"
}
]
}Конфигурация
Хранение данных
Сервер хранит логи, файлы кэша и файлы блокировки в выделенной директории данных, чтобы не загромождать текущий проект.
Расположение по умолчанию:
macOS / Linux:
~/.nfty-mcp-server/Windows:
C:\Users\<user>\.nfty-mcp-server\
Записываемые туда файлы включают:
nfty-messages.jsonnfty-debug.lognfty-process.lognfty.lock
Переменные окружения
Переменная | Описание | По умолчанию |
| Тема для отправки/получения сообщений | обязательно |
| URL сервера ntfy |
|
| Токен доступа (Bearer token) | необязательно |
| Имя пользователя для basic-auth | необязательно |
| Пароль для basic-auth | необязательно |
| Начальный курсор бэклога |
|
| Тайм-аут получения в миллисекундах |
|
| Очищать логи/кэш при запуске |
|
| Завершать существующие экземпляры сервера |
|
| Переопределение директории данных | путь платформы по умолчанию |
| Переопределение файла кэша |
|
Аргументы CLI
Вы также можете настроить сервер напрямую:
npx nfty-mcp-server --topic my-topic --base-url https://ntfy.sh --auth-token your-tokenПоддерживаемые аргументы:
--topic--base-urlили--server--auth-token--username--password--since--log-incoming
Как это работает
Сервер открывает постоянную HTTP-подписку на настроенную тему.
Входящие сообщения принимаются через это активное соединение.
Последние сообщения кэшируются в памяти и сохраняются на диске.
Инструменты MCP предоставляют возможности отправки, переключения тем и ожидания/чтения поверх этой подписки.
Варианты использования
асинхронный обмен сообщениями между пользователем и агентом
push-уведомления для длительных задач
циклы подтверждения человеком
легкие оповещения оператора
координация между агентами через общую тему
Разработка
git clone https://github.com/harshwasan/NFTY-MCP.git
cd NFTY-MCP
npm install
npm test
npm run devСтруктура проекта:
NFTY-MCP/
src/server.js
tests/server.test.js
package.jsonУстранение неполадок
Сообщения не приходят:
проверьте
NTFY_TOPICубедитесь, что тема существует и доступна
изучите отладочный лог в настроенной директории данных
Проблемы с подключением:
проверьте сетевой доступ к настроенному
NTFY_BASE_URLпроверьте настройки аутентификации, если тема защищена
Лицензия
MIT
Available Tools
3 toolssend-ntfySend ntfy messageA
Publish a message to the configured ntfy topic (set in mcp.json). Supports optional title, priority (1-5), tags, and attachUrl. After sending, use wait-and-read-inbox to wait for responses.
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | ||
| title | No | ||
| message | Yes | ||
| priority | No | ||
| attachUrl | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| id | No | |
| time | No | |
| topic | Yes | |
| status | Yes | |
| priority | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior. It only describes the action as 'publish' without mentioning side effects, idempotency, permission requirements, or rate limits. The description lacks transparency on common behavioral aspects for a send operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two concise sentences with essential information front-loaded. The first sentence establishes the core purpose, and the second provides a useful cross-reference. No superfluous content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, return values need not be explained. The description covers the basic operation but omits potential constraints (e.g., message length, priority semantics) and error scenarios. It assumes the topic is configured in mcp.json without discussing what happens if it's not. Completeness is adequate but not thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description partially compensates by listing all optional parameters and noting priority range (1-5). However, it does not explain the purpose of tags or attachUrl, nor does it provide formats or examples, leaving some semantics unclear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Publish a message to the configured ntfy topic', specifying the verb and resource. It lists supported optional fields (title, priority, tags, attachUrl). This differentiates it from siblings set-ntfy-topic (configuration) and wait-and-read-inbox (response handling).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises to use wait-and-read-inbox after sending, providing sequential guidance. It does not discuss when not to use this tool or prerequisites, but the context is clear: it is for sending a message to a preconfigured topic.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set-ntfy-topicSet ntfy topicB
Change the ntfy topic for this MCP server session (no restart needed).
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| baseUrl | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| topic | Yes | |
| baseUrl | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description should disclose behavioral traits. It only mentions 'no restart needed', but does not explain implications of changing topic mid-session, whether the change is persistent, or what happens to ongoing notifications. Lacks detail on side effects and conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core action. However, it could be structured to include more detail without being wasteful; currently it is slightly under-specified for a 2-parameter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for a simple tool but fails to address the baseUrl parameter. Completeness is acceptable for a minimal tool but has a clear gap given the presence of an optional parameter.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains the 'topic' parameter implicitly but does not mention the 'baseUrl' parameter at all, leaving its purpose unclear for the agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Change') and resource ('ntfy topic'), specifying it is for the session and does not require restart. This distinguishes it from siblings send-ntfy and wait-and-read-inbox, which are about message sending and receiving.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context (changing topic in session) but does not explicitly state when to use compared to siblings or when not to use it. 'No restart needed' hints at immediate effect but lacks comprehensive guidance on appropriate scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait-and-read-inboxWait for new messagesA
Waits for new messages on the configured topic (set in mcp.json) and returns when a new message arrives. Does not return until at least one new message is received. Uses the existing subscription. Note: The MCP protocol has a ~60s client-side timeout that cannot be controlled from the server, but this tool will wait as long as possible within that limit.
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | Cursor to filter messages after this point | |
| sinceNow | No | If true (default), only returns messages sent after this call starts. If false, returns all messages since the cursor. | |
| sinceTime | No | Unix timestamp - filter messages with time >= sinceTime |
Output Schema
| Name | Required | Description |
|---|---|---|
| messages | Yes | |
| newCount | Yes | |
| lastCursor | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses behavioral traits: it waits indefinitely (subject to timeout), uses existing subscription, and returns only on new message. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three concise sentences, front-loaded with the core function, each providing essential information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's waiting behavior and 3 parameters, the description covers the key aspects including timeout and return condition. Output schema exists, so return values are covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description does not add extra meaning beyond what the input schema already describes for each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (wait for new messages) and resource (inbox on configured topic), and distinguishes from siblings (send-ntfy, set-ntfy-topic) which are different tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains that the tool blocks until a new message arrives and notes the client-side timeout, providing clear usage context. However, it does not explicitly state when not to use it or compare with siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.35- First observed
send-ntfy - First observed
set-ntfy-topic - First observed
wait-and-read-inbox
TDQS
Scored across 3 tools
Each tool serves a distinct purpose: sending messages, changing topic, and waiting for incoming messages. No overlap, clear boundaries.
Tool names mix patterns: 'send-ntfy' and 'set-ntfy-topic' use verb-ntfy, but 'wait-and-read-inbox' uses a different structure with 'and'. Inconsistent naming conventions.
Three tools is appropriate for a focused notification server: send, configure topic, and receive. Each tool is necessary and none are redundant.
Core publish/subscribe functionality is covered with send and wait. The set-topic tool adds flexibility. A minor gap is lack of explicit unsubscribe or message history, but not essential for core use.
Maintenance
Related MCP Connectors
Push notifications for AI agents - send instant iPhone notifications from any MCP client.
Reach your own phone from an AI agent: notifications, approval questions, reminders, ring, files.
Let your AI agent notify you by email, Slack, Discord, or webhook. One tool: send_notification.
Zero-setup WhatsApp notifications + human-in-the-loop for AI agents — text 'join', send in 60s.
Related MCP Servers
- AlicenseAqualityAmaintenanceA streamlined MCP server that enables AI assistants to send real-time notifications to your devices through the ntfy service, allowing you to receive alerts when tasks complete or important events occur.2204 npm76GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to send messages to human users via chat platforms (currently Discord) and optionally wait for human responses, facilitating human-in-the-loop interactions.MIT
- AlicenseBqualityDmaintenanceEnables AI agents to send push notifications to your phone through ntfy, with built-in security controls to prevent data exfiltration. It exposes a single tool notify_user for notifying when tasks complete or need attention.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to communicate with humans using notify and ask semantics, supporting session management and blocking or non-blocking messages.15 npmMIT