ntfy MCP Server
Send push notifications to mobile devices via ntfy.sh from AI assistants.
README
Simple ntfy MCP Server
Send push notifications to your mobile device via ntfy.sh from Claude Desktop or any agent supporting the Model Context Protocol (MCP).
What is This?
This MCP (Model Context Protocol) server allows agents to send push notifications to your phone when tasks complete, for alerts, reminders, or any custom messages. It integrates with the free ntfy.sh notification service.
Features
- 📱 Send notifications directly from AI conversations
- 🎨 Customize with titles, priorities, and emoji tags
- 🔧 Simple configuration - no API keys needed
- 🚀 Works with any tool enabled model
Prerequisites
-
Install the ntfy app on your phone:
- iOS: https://apps.apple.com/app/ntfy/id1625396347
- Android: https://play.google.com/store/apps/details?id=io.heckel.ntfy
-
Subscribe to your channel:
- Open the ntfy app
- Tap "+" to add a subscription
- Enter your channel name (as channel names are public, you should choose a unique name)
- Subscribe!
-
Test your setup:
curl -d "Hello from your computer!" ntfy.sh/yourchannel(Replace
yourchannelwith whatever channel name you chose)
Installation
These instructions assume you have Claude Desktop installed. To include this server in your AI coding editor or agentic solution the process will be similar. Please consult the documentation for your specific editor or solution on how to setup a custom mcp server.
Option 1: Direct Run with uvx (Recommended)
No installation needed! Just add to Claude Desktop config:
On macOS:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ntfy": {
"command": "uvx",
"args": ["--from", "/path/to/ntfy-mcp", "ntfy-mcp", "--channel", "yourchannel"]
}
}
}
On Windows:
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"ntfy": {
"command": "uvx",
"args": ["--from", "C:\\path\\to\\ntfy-mcp", "ntfy-mcp", "--channel", "yourchannel"]
}
}
}
Replace /path/to/ntfy-mcp with the actual path and yourchannel with your desired channel name.
Alternative: Using Environment Variable
You can also set the channel using an environment variable:
{
"mcpServers": {
"ntfy": {
"command": "uvx",
"args": ["--from", "/path/to/ntfy-mcp", "ntfy-mcp"],
"env": {
"NTFY_CHANNEL": "yourchannel"
}
}
}
}
To test from command line:
cd /path/to/ntfy-mcp
uvx --from . ntfy-mcp --channel yourchannel
Multiple MCP Servers
If you already have other MCP servers configured, just add ntfy to your existing configuration:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/files"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your-token-here"
}
},
"ntfy": {
"command": "uvx",
"args": ["--from", "/path/to/ntfy-mcp", "ntfy-mcp", "--channel", "yourchannel"]
}
}
}
Option 2: Run with Python directly
If you prefer to use Python directly:
{
"mcpServers": {
"ntfy": {
"command": "python",
"args": ["/path/to/ntfy_mcp.py", "--channel", "yourchannel"]
}
}
}
Note: You'll need to install dependencies first:
pip install mcp httpx pydantic
Configuration
Channel Configuration
The ntfy channel is now configured when starting the MCP server, not hardcoded in the script. You have two options:
Option 1: Command Line Argument (Recommended)
{
"mcpServers": {
"ntfy": {
"command": "uvx",
"args": ["--from", "/path/to/ntfy-mcp", "ntfy-mcp", "--channel", "mychannel"]
}
}
}
Option 2: Environment Variable
{
"mcpServers": {
"ntfy": {
"command": "uvx",
"args": ["--from", "/path/to/ntfy-mcp", "ntfy-mcp"],
"env": {
"NTFY_CHANNEL": "mychannel"
}
}
}
}
Important: If no channel is configured, the MCP server will return a helpful error message explaining how to set it up.
Private Channels
For private ntfy.sh channels (requires ntfy.sh Pro), you'll need to add authentication headers. See ntfy.sh documentation for details.
Usage in Claude Desktop
After configuration, just ask Claude naturally:
Basic Examples (uses your configured default channel):
- "Notify me when you're done"
- "Send a notification to my phone saying 'Meeting in 10 minutes'"
- "Alert me when this analysis completes"
- "Send me a notification with high priority that deployment succeeded"
With emoji tags:
- "Send a notification with rocket emoji that the build is complete"
- "Notify me with a checkmark that all tests passed"
Channel Override Examples (when you have multiple channels):
- "Send a notification to the urgent-alerts channel that deployment failed"
- "Notify me on the family channel that dinner is ready"
- "Alert the dev-team channel that the build is complete"
Important: Claude will only use a different channel when you explicitly mention a specific channel name. The exact channel name you specify will be used, even if it appears to contain typos.
Available Emoji Tags
Common tags you can use:
tada🎉 - Celebrationrocket🚀 - Launch/deploymentwhite_check_mark✅ - Successwarning⚠️ - Warningx❌ - Error/failurebell🔔 - Reminderhourglass⏳ - In progressfire🔥 - Urgent/hot
Priority Levels
min- Minimal prioritylow- Low prioritydefault- Normal priority (default)high- High priorityurgent- Urgent (triggers special notification behavior)
Troubleshooting
MCP Server won't start?
If the server fails to start, check the Claude Desktop logs for startup errors:
- macOS:
tail -f ~/Library/Logs/Claude/mcp*.log - Windows:
type %APPDATA%\Claude\logs\mcp-server-ntfy.log
Common startup errors:
- "No default ntfy channel configured" - You need to add
--channel yourchannelor setNTFY_CHANNELenvironment variable - "Command not found" - Wrong path to ntfy-mcp or missing uvx/python
Notifications not appearing?
-
Check subscription: Ensure you're subscribed to the correct channel in the ntfy app
-
Test manually: Run this in terminal:
curl -d "Test message" ntfy.sh/yourchannel(Replace
yourchannelwith your configured channel) If you receive it, the issue is with the MCP server configuration. -
Check Claude Desktop logs:
- macOS:
tail -f ~/Library/Logs/Claude/mcp*.log - Windows:
type %APPDATA%\Claude\logs\mcp-server-ntfy.log
- macOS:
-
Verify config: Make sure the path in
claude_desktop_config.jsonis correct -
Restart Claude Desktop completely (quit, don't just close) after making configuration changes
Path Configuration Issues
Common path mistakes:
❌ Wrong: ~/Downloads/ntfy-mcp (don't use ~ in JSON)
✅ Correct: /Users/yourname/Downloads/ntfy-mcp
❌ Wrong: C:\Users\YourName\Downloads\ntfy-mcp (single backslash)
✅ Correct: C:\\Users\\YourName\\Downloads\\ntfy-mcp (double backslash in JSON)
❌ Wrong: Relative path like ./ntfy-mcp
✅ Correct: Absolute path /full/path/to/ntfy-mcp
To find the correct path:
# Navigate to the ntfy-mcp folder
cd /path/to/ntfy-mcp
# Get the full path
pwd
# Use this output in your config along with --channel yourchannel
How It Works
- Claude Desktop starts the ntfy MCP server as a subprocess
- The server runs on your local machine (not in Claude's sandbox)
- When you ask Claude to send a notification, it calls the MCP server
- The MCP server makes an HTTP POST to ntfy.sh
- ntfy.sh delivers the notification to your phone
This architecture bypasses sandbox restrictions because the MCP server runs with your user's permissions.
Advanced Usage
Multiple Channels
You can send to different channels by explicitly mentioning them in your request:
- "Send a notification to the family channel saying dinner is ready"
- "Alert the urgent-alerts channel that the server is down"
- "Notify me on the work-updates channel about the meeting"
Important: Claude will only use a different channel when you explicitly mention it by name. It will not choose channels based on context or message content - only when you specifically request a different channel.
Custom Integration
The MCP server can be extended to support:
- Attachments (images, files)
- Actions (buttons in notifications)
- Scheduled notifications
- Message templates
See ntfy.sh documentation for available features: https://docs.ntfy.sh/
File Structure
ntfy-mcp/
├── ntfy_mcp.py # Main MCP server implementation
├── pyproject.toml # Python project configuration
├── LICENSE # MIT License
├── .gitignore # Git ignore rules for Python
└── README.md # This file
License
MIT License
Copyright (c) 2024 ntfy-mcp contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Note: The ntfy.sh service is separate and has its own terms of service.
Support
- ntfy.sh documentation: https://docs.ntfy.sh/
- MCP documentation: https://modelcontextprotocol.io/
- Claude Desktop support: https://support.claude.com/
Credits
Built with:
- Model Context Protocol by Anthropic
- ntfy.sh by Philipp C. Heckel
- FastMCP Python SDK
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。