remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Allows configuration of the server using environment variables stored in .env files, supporting settings for notification topics, server URLs, and authentication tokens.
Provides containerized deployment option with official Docker images available on Docker Hub and GitHub Container Registry for running the server in a containerized environment.
Supports rich text formatting in notifications, with automatic detection and rendering of markdown syntax for creating formatted lists, code blocks, links, tables, and other text styling.
📤 ntfy-me-mcp
A streamlined Model Context Protocol (MCP) server for sending notifications via ntfy service (public or selfhosted with token support) 📲
Overview
ntfy-me-mcp provides AI assistants with the ability to send real-time notifications to your devices through the ntfy service (either public or selfhosted with token support). Get notified when your AI completes tasks, encounters errors, or reaches important milestones - all without constant monitoring.
The server includes intelligent features like automatic URL detection for creating view actions and smart markdown formatting detection, making it easier for AI assistants to create rich, interactive notifications without extra configuration.
Available via:
Name | Link / Badge |
---|---|
Glama.ai | |
Smithery.ai |
Table of Contents
Features
- 🚀 Quick Setup: Run with npx or docker!
- 🔔 Real-time Notifications: Get updates on your phone/desktop when tasks complete
- 🎨 Rich Notifications: Support for topic, title, priorities, emoji tags, and detailed messages
- 🔍 Notification Fetching: Fetch and filter cached messages from your ntfy topics
- 🎯 Smart Action Links: Automatically detects URLs in messages and creates view actions
- 📄 Intelligent Markdown: Auto-detects and enables markdown formatting when present
- 🔒 Secure: Optional authentication with access tokens
- 🔑 Input Masking: Securely store your ntfy token in your vs config!
- 🌐 Self-hosted Support: Works with both ntfy.sh and self-hosted ntfy instances
(Coming soon...)
- 📨 Email: Send notifications to email (requires ntfy email server configuration)
- 🔗 Click urls: Ability to customize click urls
- 🖼️ Image urls: Intelligent image url detection to automatically include image urls in messages and notifications
- 🏁 and more!
Quickstart - MCP Server Configuration
NPM / NPX (Recommended Method)
- Requires npm / npx installed on your system.
- This method is recommended for most users as it provides a simple & lightweight method to set up the server.
For the easiest setup with MCP-compatible assistants, add this to your MCP configuration:
Minimal configuration (for public topics on ntfy.sh)
Full configuration (for private servers or protected topics)
Option 1: Direct token in configuration
Option 2: Using VS Code inputs for secure token handling (recommended)
Add this to your VS Code settings.json file:
With this setup, VS Code will prompt you for the token when starting the server and the token will be masked when entered.
Docker
Using with MCP in Docker
- Requires Docker installed on your system.
- This method is useful for running the server in a containerized environment.
- You can use the official Docker images available on Docker Hub or GitHub Container Registry.
Docker Images:
gitmotion/ntfy-me-mcp:latest
(Docker Hub)ghcr.io/gitmotion/ntfy-me-mcp:latest
(GitHub Container Registry)
In your MCP configuration (e.g., VS Code settings.json):
Installation
If you need to install and run the server directly (alternative to the MCP configuration above):
Option 1: Install globally
Option 2: Run with npx
Option 3: Install locally
Option 4: Build and use locally with node command
If you're developing or customizing the server, you might want to run it directly with node:
Using locally built server with MCP
When configuring your MCP to use a locally built version, specify the node command and path to the built index.js file:
Remember to use the absolute path to your build/index.js file in the args array.
Option 5: MCP Marketplace installations
Installing via Smithery
To install ntfy-me-mcp for Claude Desktop automatically via Smithery:
Configuration
Environment Variables
Create a .env
file in your project directory by copying the provided example:
Your .env
file should contain these variables:
Note: The
PROTECTED_TOPIC
flag helps the application determine whether authentication is required for your topic. When set to "true" and no token is provided, you'll be prompted to enter one. This prevents authentication failures with protected topics.
Usage
Authentication
This server supports both authenticated and unauthenticated ntfy endpoints:
- Public Topics: When using public topics on ntfy.sh or other public servers, no authentication is required.
- Protected Topics: For protected topics or private servers, you need to provide an access token.
If authentication is required but not provided, you'll receive a clear error message explaining how to add your token.
Setting Up the Notification Receiver
- Install the ntfy app on your device
- Subscribe to your chosen topic (the same as your
NTFY_TOPIC
setting)
Sending Notifications (ntfy_me tool)
This section covers all functionality related to sending notifications using the ntfy_me tool.
Using Natural Language
When working with your AI assistant, you can use natural phrases like:
Message Parameters
The tool accepts these parameters:
Parameter | Description | Required |
---|---|---|
taskTitle | The notification title | Yes |
taskSummary | The notification body | Yes |
priority | Message priority: min, low, default, high, max | No |
tags | Array of notification tags (supports emoji shortcodes) | No |
markdown | Boolean to enable markdown formatting (true/false) | No |
actions | Array of view action objects for clickable links | No |
Example:
This will send a high-priority notification with a checkmark emoji.
Action Links
You can add clickable action buttons to your notifications using the actions
parameter, or let the server automatically detect URLs in your message.
Automatic URL Detection
When URLs are present in your message body, the server automatically creates up to 3 view actions (ntfy's maximum limit) from the first detected URLs. This makes it easy to include clickable links without manually specifying the actions array.
For example, this message:
Will automatically generate view actions for both URLs, making them easily clickable in the notification.
Manual Action Configuration
For more control, you can manually specify actions:
Property | Description | Required |
---|---|---|
action | Must be "view" | Yes |
label | Button text to display | Yes |
url | URL to open when clicked | Yes |
clear | Whether to clear notification on click (optional) | No |
Example with action links:
Emoji Shortcodes
You can use emoji shortcodes in your tags for visual indicators:
warning
→ ⚠️check
→ ✅rocket
→ 🚀tada
→ 🎉
See the full list of supported emoji shortcodes.
Markdown Formatting
Your notifications support rich markdown formatting with intelligent detection! When you include markdown syntax in your taskSummary
, the server automatically detects it and enables markdown parsing - no need to set markdown: true
explicitly.
Automatic Detection
The server checks for common markdown patterns like:
- Headers (#, ##, etc.)
- Lists (-, *, numbers)
- Code blocks (```)
- Links (text)
- Bold/italic (text, text)
When these patterns are detected, markdown parsing is automatically enabled for the message.
Manual Override
While automatic detection works in most cases, you can still explicitly control markdown parsing:
Retrieving Messages (ntfy_me_fetch tool)
This section covers all functionality related to fetching and filtering messages using the ntfy_me_fetch tool.
Using Natural Language
AI assistants understand various ways to request message fetching:
Message Parameters
The tool accepts these parameters:
Parameter | Description | Required |
---|---|---|
ntfyTopic | Topic to fetch messages from (defaults to NTFY_TOPIC env var) | No |
since | How far back to retrieve messages ('10m', '1h', '1d', timestamp, message ID, or 'all') | No |
messageId | Find a specific message by its ID | No |
messageText | Find messages containing exact text content | No |
messageTitle | Find messages with exact title/subject | No |
priorities | Find messages with specific priority levels | No |
tags | Find messages with specific tags | No |
Examples
- Fetch Recent Messages
- Filter by Title and Priority
- Search Different Topic with Tags
- Find Specific Message
Messages are returned with full details including:
- Message ID and timestamp
- Topic and title
- Content and priority
- Tags and attachments
- Action links and expiration
Note: Message history availability depends on your ntfy server's cache settings. The public ntfy.sh server typically caches messages for 12 hours.
Development
Building from Source
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Made with ❤️ by gitmotion
You must be authenticated.
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.