SuperAPI AI Directory

ntfy-me-mcp

ntfy-me-mcp is a server based on the Model Context Protocol (MCP) that enables AI assistants to send and fetch notifications through the ntfy service. It supports public ntfy.sh and self-hosted ntfy instances, as well as token authentication. AI can push real-time notifications to the user's phone or desktop when a task is completed, an error occurs, or an important milestone is reached. The server has intelligent features, such as automatically recognizing URLs in messages to generate a view action, automatically detecting Markdown formatting, and can be run quickly via npx or Docker. It provides two tools: sending notifications (ntfy_me) and fetching cached messages (ntfy_me_fetch), returning human-readable content and machine-readable structured data.

Open website

About this tool

Purpose

ntfy-me-mcp is a streamlined MCP (Model Context Protocol) server designed to enable AI assistants to send real-time notifications to the user's devices through the ntfy service (public ntfy.sh or a self-hosted instance), and to fetch cached messages. When the AI completes a task, encounters an error, or reaches an important milestone, the user can receive an alert without having to monitor continuously.

Main Capabilities

  • Real-time notifications: Receive updates on your phone or desktop when a task is completed.
  • Rich notifications: Supports topic, title, priority, emoji tags, and detailed messages.
  • Notification fetching: Retrieve and filter cached messages from an ntfy topic.
  • Smart action links: Automatically detects URLs in messages and creates a view action.
  • Click URL: Optionally specify the link to open when the notification is clicked.
  • Smart Markdown: Automatically detects when a message contains Markdown and enables formatting.
  • Security: Optional authentication using an access token.
  • Input masking: Securely store the ntfy token in the VS Code configuration.
  • Self-hosted support: Compatible with ntfy.sh and self-hosted ntfy instances.
  • Email: Can send notifications to an email address (requires configuring an ntfy email server).
  • Image URLs: Intelligently detects image URLs and automatically includes them in messages and notifications.

Usage

Quick Configuration

All configuration examples use NTFY_TOPIC as a required variable, with optional authentication settings commented out by default.

  • Using npx:npx -y ntfy-me-mcp, and set in the environment variables NTFY_TOPIC, optional NTFY_URL and NTFY_TOKEN.
  • Using Docker: Only a Docker environment is required.

Environment variable requirements: Node.js 24 or later is required when using npx, global, or local installation; the Docker method only requires Docker.

Set Up the Notification Receiver

Install the ntfy app on your device or deploy a self-hosted ntfy server, and subscribe to the same topic as NTFY_TOPIC .

Environment Variables

Supports both authenticated and unauthenticated ntfy endpoints:

  • Public topics: No authentication required.
  • Protected topics or private servers: An access token must be provided via the NTFY_TOKEN environment variable or the accessToken parameter within the tool. If authentication is required but not provided, a clear error message will be received.

Note: ThePROTECTED_TOPIC environment variable has been removed in v1.4.0. For protected topics, set the NTFY_TOKENresolved by the client.

Tools

  • ntfy_me: Send a notification. Natural language requests can be used.
  • ntfy_me_fetch: Poll notifications and retrieve cached messages. Both tools return human-readable content and machine-readable structuredContent object.

Use cases

  • Real-time alerts for AI task completion, errors, or key milestones.
  • Scenarios that require pushing rich-text notifications from an AI assistant to a user's device.
  • Use with MCP-capable clients (such as VS Code, Claude Desktop, etc.).
  • Notification integration in self-hosted ntfy server environments.

Limitations and security

  • ntfy-me-mcp treats all tool parameters as untrusted, because parameters may come from a model that has read prompt-injection content.
  • URLs accept only http:// and https://,拒绝内嵌凭据的 URLs (such as https://user:pass@…).
  • Startup checks: a missing or invalid NTFY_TOPIC or an invalid NTFY_URL will prevent the server from starting, and the error is written to stderr.
  • The token must be printable ASCII and contain no spaces.
  • Topics allow only letters, digits, underscores, and hyphens, up to 128 characters.
  • By default, all notifications and fetches are sent to NTFY_URL on NTFY_TOPIC, and the agent cannot change the target unless through an allowlist or an override switch.
  • NTFY_TOPICS_ALLOWLIST lets the agent choose among specified topics and NTFY_TOPIC ; when unset, the tool schema does not include topic names.
  • NTFY_ALLOW_TOPIC_OVERRIDE=true and NTFY_ALLOW_URL_OVERRIDE=true can respectively re-allow any topic or server; if an allowlist is also set, the allowlist takes precedence.
  • Even when URL override is enabled,NTFY_TOKEN will only send to the NTFY_URL server.
  • Fetched messages are untrusted input, and anyone who knows a public topic name can publish content; it is recommended to use hard-to-guess topic names or protected topics with an access token.
  • It is recommended to provide the token through the client's secret input (such as VS Code's ${input:…}) or environment variables, rather than hardcoding it in a configuration file.
  • If the client does not support placeholder substitution such as ${input:…} , the server will fail to start due to unresolved placeholders.
  • To report vulnerabilities, please do so privately via GitHub security advisories.

Development and license

Contributions are welcome; see CONTRIBUTING.md for details. The project is licensed under the GNU General Public License v3.0.