Skip to main content
Glama
ntfy-mcp

ntfy-mcp

by Edqe14

ntfy-mcp

Standalone MCP server for sending notifications to ntfy.sh or any self-hosted ntfy instance.

This server is reusable across MCP clients. It exposes tools for sending notifications, while keeping the ntfy URL and topic locked at server startup so agents cannot override them per call.

Features

  • stdio MCP server for broad client compatibility

  • locked ntfy base URL and topic

  • startup config via flags or environment variables

  • bearer token or basic auth support

  • ntfy_publish tool for general notifications

  • ntfy_ping tool for simple "finished working" notifications

Related MCP server: mcp-gotify

Install

Local development

npm install
npm run build

Published CLI

After publishing, clients can run the server directly with npx:

npx -y ntfy-mcp --ntfy-url https://ntfy.sh --ntfy-topic my-topic

Smoke test

You can run a local MCP-level smoke test after building:

node scripts/smoke-test.mjs dist/index.js \
  --ntfy-url https://ntfy.sh \
  --ntfy-topic my-test-topic

Configuration

Flags take priority over environment variables.

Flags

node dist/index.js \
  --ntfy-url https://ntfy.sh \
  --ntfy-topic my-topic \
  --ntfy-token tk_your_token

Environment variables

export NTFY_URL="https://ntfy.sh"
export NTFY_TOPIC="my-topic"
export NTFY_TOKEN="tk_your_token"
node dist/index.js

Supported variables:

  • NTFY_URL

  • NTFY_TOPIC

  • NTFY_TOKEN

  • NTFY_USERNAME

  • NTFY_PASSWORD

If both token auth and basic auth are configured, token auth wins.

Tool reference

ntfy_publish

Sends a notification to the configured topic.

Input:

{
  "message": "Deployment complete",
  "title": "Deploy",
  "priority": "high",
  "tags": ["rocket", "white_check_mark"],
  "markdown": false,
  "click": "https://example.com/deploys/123",
  "icon": "https://example.com/icon.png",
  "delay": "10m"
}

ntfy_ping

Convenience tool for simple pings.

Input:

{
  "message": "Agent finished working.",
  "title": "Agent finished",
  "priority": "default",
  "tags": ["robot_face", "white_check_mark"]
}

npm publish

This package is set up to publish as a public npm CLI.

npm login
npm publish

Quick checks before publishing:

npm run build
npm pack --dry-run

skills.sh skill

This repository also contains a reusable skill in the skills/ directory:

  • skills/ntfy-after-task/SKILL.md

After pushing the repo, it can be installed through skills.sh with:

npx skills add Edqe14/ntfy-mcp@ntfy-after-task

OpenCode

Register the server in opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "ntfy": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "ntfy-mcp",
        "--ntfy-url",
        "https://ntfy.sh",
        "--ntfy-topic",
        "my-topic"
      ]
    }
  }
}

This only makes the tool available. To send a ping after the agent finishes working, OpenCode still needs a plugin, hook, or workflow that calls ntfy_ping when the session becomes idle or reaches your chosen completion event.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "ntfy": {
      "command": "npx",
      "args": [
        "-y",
        "ntfy-mcp",
        "--ntfy-url",
        "https://ntfy.sh",
        "--ntfy-topic",
        "my-topic"
      ]
    }
  }
}

Cursor

Add to .cursor/mcp.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "ntfy": {
      "command": "npx",
      "args": [
        "-y",
        "ntfy-mcp",
        "--ntfy-url",
        "https://ntfy.sh",
        "--ntfy-topic",
        "my-topic"
      ]
    }
  }
}

Notes

  • The server publishes with HTTP POST to https://<ntfy-host>/<topic>.

  • ntfy URL and topic are intentionally locked at startup.

  • Per-call overrides for URL or topic are not supported.

  • Use console.error for logs because stdout is reserved for MCP protocol traffic.

Available Tools

2 tools
ntfy_pingSend finished-work pingC

Send a simple notification to the server-configured ntfy topic.

Inputs: icon, tags, click, delay, +4 more. Returns: url, topic, status, responseText

ntfy_publishPublish ntfy notificationC

Send a notification to the server-configured ntfy topic.

Inputs: message (required), icon, tags, click, +4 more. Returns: url, topic, status, responseText

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.5/5.0

    Scored across 2 tools

    Disambiguation1/5

    Both tools perform the same action—sending a notification to the server-configured topic. The only distinction is 'simple' vs. regular, which is not meaningful enough for an agent to reliably choose between them.

    Naming Consistency4/5

    Both tools follow a consistent ntfy_verb pattern with snake_case, which is predictable. Minor deviation is that 'publish' and 'ping' are synonymous verbs for notification delivery.

    Tool Count3/5

    Two tools is borderline for a notification-focused server, but one is essentially redundant, making the count feel padded. A single publish tool would be more appropriate.

    Completeness2/5

    The domain is ntfy notifications, but the server only covers sending. There is no tool for subscription, topic management, or retrieving notification history, leaving significant gaps beyond the core publish action.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      The MCP server that keeps you informed by sending the notification on phone using ntfy.sh
      284 npm
      44
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      MCP server for sending Gotify push notifications to your devices.
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A lightweight MCP server for sending push notifications via ntfy.sh, supporting customizable titles, priorities, tags, and action buttons.
      1
      10 npm
      7
      MIT