Ntfy Me MCP Server for AI Agents
Send and receive ntfy notifications from AI agents with the Ntfy Me MCP server-secure token auth, self-hosted ntfy support, usable via npx or Docker.
npx -y @gitmotion/ntfy-me-mcpOverview
Ntfy Me MCP Server is a lightweight bridge that lets AI agents send and receive ntfy notifications using the Model Context Protocol (MCP). It provides a simple, secure HTTP interface that translates MCP-style requests into ntfy messages and listens for ntfy events so agents can react to user replies or external signals. The server works with public ntfy services (like ntfy.sh) or self‑hosted ntfy instances, and it is built to be run locally, in CI, or on a server via npx or Docker.
This server is useful when you want agents to push short notifications (alerts, summaries, or prompts) to a user’s device and to receive callbacks or replies as structured events. By centralizing authentication and ntfy configuration, the MCP server removes the need for each agent to manage direct ntfy credentials or protocols.
Features
- Secure token-based authentication for MCP clients (agents)
- Send notifications to ntfy topics on behalf of agents
- Receive and forward ntfy events (replies, clicks) back to agents
- Works with public ntfy services or self-hosted ntfy endpoints
- Easy to run via npx for ad-hoc usage or Docker for production
- Minimal configuration via environment variables or CLI flags
- Lightweight HTTP API compatible with agent workflows
Installation / Configuration
Quick start (run with npx):
# Run directly from the repository via npx (one-off)
Run via Docker (build locally and start):
# Build
# Run with environment variables
Configuration options (environment variables / CLI flags):
| Variable / Flag | Description | Default |
|---|---|---|
| PORT | HTTP port the MCP server listens on | 8080 |
| NTFY_URL | Base URL for ntfy (public or self-hosted) | https://ntfy.sh |
| AUTH_TOKEN | Shared secret token used for agent authentication | (none — required) |
| NTFY_TOPIC_PREFIX | Optional prefix applied to topics | (none) |
| LOG_LEVEL | Logging verbosity (debug/info/warn/error) | info |
Example .env:
PORT=8080
NTFY_URL=https://ntfy.myselfhosted.instance
AUTH_TOKEN=super-secret-token
NTFY_TOPIC_PREFIX=agents/
LOG_LEVEL=info
Security notes:
- Keep AUTH_TOKEN confidential and rotate it regularly.
- If using a self-hosted ntfy instance, ensure TLS and firewall rules are configured appropriately.
Available Resources
- Repository: https://github.com/gitmotion/ntfy-me-mcp
- CLI: run via npx as shown above for development or ad-hoc runs
- Docker: build the image locally or use a provided image if available in the project registry
- HTTP API: a small set of endpoints to send notifications and receive events (examples below)
- Example client snippets (curl, JS) to integrate agent workflows
Example HTTP endpoints (illustrative):
- POST /mcp/notify — send a notification
- POST /mcp/events — webhook endpoint for inbound ntfy events (or server pushes events to connected agents)
Example send (curl):
Example event payload delivered to agents (webhook / callback):
Use Cases
- Agent notifications: an autonomous agent sends a short summary or decision prompt to a human operator. The operator replies via ntfy; the MCP server forwards the reply back to the agent so it can continue its workflow.
- Multi-agent orchestration: use the server as a central notification hub for multiple agents. Each agent posts to its topic; a human or service can monitor and respond without giving each agent direct ntfy credentials.
- Self-hosted privacy: organizations running a private ntfy instance can use Ntfy Me MCP Server to keep all message traffic within their infrastructure while exposing a small, authenticated API to internal agent workloads.
- Rapid prototyping: run quickly with npx during development to test agent-to-human