Skip to main content
Glama

Servidor MCP de NTFY

Servidor MCP para notificaciones de ntfy.sh, mensajería asíncrona de agentes y flujos de trabajo con intervención humana.

Proporciona una forma sencilla para que un cliente MCP publique mensajes en un tema de ntfy, mantenga una suscripción activa y espere respuestas sin necesidad de crear una capa de mensajería personalizada.

Qué hace

Este servidor es útil cuando necesitas:

  • notificaciones push desde un agente conectado a MCP

  • intercambio de mensajes asíncrono entre un usuario y un agente

  • un ciclo ligero de aprobación o respuesta humana a través de ntfy

  • un canal de notificación simple para flujos de trabajo de larga duración

Flujo típico:

  1. Un usuario o sistema externo publica un mensaje en un tema de ntfy.

  2. El cliente MCP lo lee a través de wait-and-read-inbox o ntfy://inbox.

  3. El agente responde a través de send-ntfy.

  4. El usuario recibe la respuesta como una notificación push de ntfy.

Related MCP server: Chat Human MCP Server

Características

  • publicar mensajes con título, prioridad, etiquetas y archivos adjuntos opcionales

  • mantener una suscripción persistente para una entrega casi en tiempo real

  • cambiar de tema sin reiniciar el servidor

  • mantener mensajes recientes en memoria y en disco

  • soporte para temas protegidos con token de portador (bearer-token) y autenticación básica

  • funciona con ntfy.sh público de forma inmediata

Instalación

Instalar globalmente:

npm install -g nfty-mcp-server

O ejecutar a través de npx:

npx -y --yes nfty-mcp-server

Inicio rápido

1. Elige un tema

Crea o reutiliza un tema en ntfy.sh. Los temas públicos son fáciles de configurar, así que elige un nombre único.

2. Configura tu cliente MCP

Para Cursor o VS Code, añade esto a tus ajustes de MCP:

{
  "mcpServers": {
    "nfty": {
      "command": "npx",
      "args": ["-y", "--yes", "nfty-mcp-server"],
      "env": {
        "NTFY_TOPIC": "your-topic-name",
        "NTFY_BASE_URL": "https://ntfy.sh"
      }
    }
  }
}

Para Claude Desktop, añade la misma entrada de servidor a claude_desktop_config.json.

Notas:

  • NTFY_TOPIC es obligatorio

  • --yes mantiene las instalaciones de npx en su propia caché en lugar de contaminar el directorio del proyecto

3. Reinicia el cliente

Reinicia Cursor, VS Code o Claude Desktop para que se cargue el servidor MCP.

Herramientas

send-ntfy

Publica un mensaje en el tema configurado.

Parámetros:

  • message obligatorio

  • title opcional

  • priority opcional, de 1 a 5

  • tags opcional

  • attachUrl opcional

Ejemplo:

{
  "message": "Task completed successfully.",
  "title": "Task Status",
  "priority": 4
}

set-ntfy-topic

Cambia el tema activo para la sesión actual.

Parámetros:

  • topic obligatorio

  • baseUrl opcional

wait-and-read-inbox

Espera nuevos mensajes en el tema configurado y devuelve el control cuando llega al menos uno.

Parámetros:

  • since opcional

  • sinceTime opcional

  • sinceNow opcional, por defecto true

Importante:

  • muchos clientes MCP imponen un tiempo de espera de aproximadamente 60 segundos

  • si estás esperando una respuesta humana, el cliente o el agente que realiza la llamada debe reintentar tras el tiempo de espera

Comportamiento recomendado para los flujos de chat del agente:

Si wait-and-read-inbox agota el tiempo de espera mientras espera una respuesta del usuario, reintenta hasta que llegue un nuevo mensaje.

Recursos

ntfy://inbox

Devuelve los mensajes recientes del tema configurado en formato JSON.

Forma del ejemplo:

{
  "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"
    }
  ]
}

Configuración

Almacenamiento de datos

El servidor almacena registros, archivos de caché y archivos de bloqueo en un directorio de datos dedicado para no saturar el proyecto actual.

Ubicación por defecto:

  • macOS / Linux: ~/.nfty-mcp-server/

  • Windows: C:\Users\<usuario>\.nfty-mcp-server\

Los archivos escritos allí incluyen:

  • nfty-messages.json

  • nfty-debug.log

  • nfty-process.log

  • nfty.lock

Variables de entorno

Variable

Descripción

Por defecto

NTFY_TOPIC

Tema para enviar/recibir mensajes

obligatorio

NTFY_BASE_URL

URL del servidor ntfy

https://ntfy.sh

NTFY_AUTH_TOKEN

Token de portador (Bearer)

opcional

NTFY_USERNAME

Nombre de usuario para autenticación básica

opcional

NTFY_PASSWORD

Contraseña para autenticación básica

opcional

NTFY_SINCE

Cursor de backlog inicial

1h

NTFY_FETCH_TIMEOUT_MS

Tiempo de espera de obtención en milisegundos

10000

NTFY_CLEAN_ON_STARTUP

Limpiar registros/caché al iniciar

true

NTFY_KILL_EXISTING

Matar instancias de servidor existentes

true

NTFY_DATA_DIR

Sustitución del directorio de datos

ruta de plataforma por defecto

NTFY_CACHE_FILE

Sustitución del archivo de caché

{NTFY_DATA_DIR}/nfty-messages.json

Argumentos de CLI

También puedes configurar el servidor directamente:

npx nfty-mcp-server --topic my-topic --base-url https://ntfy.sh --auth-token your-token

Argumentos soportados:

  • --topic

  • --base-url o --server

  • --auth-token

  • --username

  • --password

  • --since

  • --log-incoming

Cómo funciona

  1. El servidor abre una suscripción HTTP persistente al tema configurado.

  2. Los mensajes entrantes se reciben a través de esa conexión en vivo.

  3. Los mensajes recientes se almacenan en caché en la memoria y se guardan en el disco.

  4. Las herramientas MCP exponen el comportamiento de envío, cambio de tema y espera/lectura sobre esa suscripción.

Casos de uso

  • mensajería asíncrona usuario-agente

  • notificaciones push para tareas de larga duración

  • ciclos de aprobación humana

  • alertas ligeras para operadores

  • coordinación entre agentes a través de un tema compartido

Desarrollo

git clone https://github.com/harshwasan/NFTY-MCP.git
cd NFTY-MCP
npm install
npm test
npm run dev

Estructura del proyecto:

NFTY-MCP/
  src/server.js
  tests/server.test.js
  package.json

Solución de problemas

Los mensajes no llegan:

  • verifica NTFY_TOPIC

  • confirma que el tema existe y es accesible

  • inspecciona el registro de depuración en el directorio de datos configurado

Problemas de conexión:

  • verifica el acceso a la red a la NTFY_BASE_URL configurada

  • verifica los ajustes de autenticación si el tema está protegido

Licencia

MIT

Available Tools

3 tools
send-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo
titleNo
messageYes
priorityNo
attachUrlNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
idNo
timeNo
topicYes
statusYes
priorityNo

TDQS

A3.7/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYes
baseUrlNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
topicYes
baseUrlYes

TDQS

B3.3/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
sinceNoCursor to filter messages after this point
sinceNowNoIf true (default), only returns messages sent after this call starts. If false, returns all messages since the cursor.
sinceTimeNoUnix timestamp - filter messages with time >= sinceTime

Output Schema

ParametersJSON Schema
NameRequiredDescription
messagesYes
newCountYes
lastCursorYes

TDQS

A4.5/5.0
Behavior5/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 3 tool updatesv1.0.35
    • First observedsend-ntfy
    • First observedset-ntfy-topic
    • First observedwait-and-read-inbox

TDQS

A3.8/5.0

Scored across 3 tools

Disambiguation5/5

Each tool serves a distinct purpose: sending messages, changing topic, and waiting for incoming messages. No overlap, clear boundaries.

Naming Consistency3/5

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.

Tool Count5/5

Three tools is appropriate for a focused notification server: send, configure topic, and receive. Each tool is necessary and none are redundant.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A 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.
    2
    204 npm
    76
    GPL 3.0
  • A
    license
    B
    quality
    D
    maintenance
    Enables 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.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to communicate with humans using notify and ask semantics, supporting session management and blocking or non-blocking messages.
    15 npm
    MIT