ntfy-mcp
Enables sending push notifications through ntfy, allowing AI agents to notify users about task completions, failures, approval requests, or other events requiring human attention.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ntfy-mcpnotify me when the build is complete"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ntfy-mcp
ntfy-mcp is a small, security-focused MCP server that lets AI agents send push
notifications through ntfy.
It is designed for the practical moments when a long-running agent needs your attention:
a build or test run finishes
tests fail while you are away
an approval is needed
a PR is ready for review
a task fails and needs human attention
The server exposes one MCP tool:
notify_userUnder the hood it sends an HTTPS POST to an operator-configured ntfy topic. The model can write the notification content, but it cannot choose arbitrary ntfy servers, arbitrary topics, arbitrary headers, attachments, or action buttons.
Why This Exists
Coding agents are increasingly good at running for several minutes without help. The missing piece is often human attention. Desktop notifications tied to one app are easy to miss, and polling a terminal is tedious.
ntfy-mcp gives MCP-capable clients a tiny, boring, auditable path to notify you
on your phone without turning ntfy into an unbounded exfiltration channel.
Related MCP server: ntfy-mcp
Security Model
This project treats notification delivery as a security boundary, not as a thin wrapper around ntfy.
The MCP model is considered untrusted input. It must not control:
the ntfy base URL
arbitrary topics
auth headers
arbitrary request headers
file attachments
action buttons
MVP controls:
NTFY_TOPICis required.NTFY_ALLOWED_TOPICSdefaults toNTFY_TOPIC.Requested topics must be in the allow-list.
Topics must match a conservative letters, numbers,
_,-format.NTFY_BASE_URLmust use HTTPS and cannot include credentials.Bearer auth only comes from
NTFY_TOKEN.Priority is constrained to
1through5.Long messages are truncated before sending.
Obvious secret-like content is rejected before sending.
click_urlmust behttp://orhttps://.Only a fixed set of ntfy headers is sent.
Full notification messages are not logged by default.
NTFY_DRY_RUN=truevalidates and returns success without network I/O.
Secret detection is intentionally basic. It blocks obvious private keys, GitHub
tokens, OpenAI-style tokens, JWT-looking tokens, AWS access keys, and common
token=, password=, api_key= style assignments. It is a guardrail, not a
replacement for careful tool permissions.
Quickstart
Install dependencies:
uv syncChoose a long random topic:
openssl rand -hex 24Run a dry-run MCP client smoke test:
NTFY_TOPIC="replace-with-long-random-topic" \
NTFY_ALLOWED_TOPICS="replace-with-long-random-topic" \
NTFY_DRY_RUN=true \
uv run python examples/mcp-client-smoke.pyRun the STDIO MCP server directly:
NTFY_TOPIC="replace-with-long-random-topic" \
NTFY_ALLOWED_TOPICS="replace-with-long-random-topic" \
uv run python -m ntfy_mcp.serverThe server waits for MCP messages on STDIO. Use an MCP client to call
notify_user.
Subscribe In The ntfy App
Install the ntfy mobile app.
Add a subscription.
Use
https://ntfy.shunless you self-host ntfy.Enter your long random topic.
If your ntfy server requires auth, configure a token on the server and set
NTFY_TOKENfor this MCP server.
Avoid short or guessable topics. Public ntfy topics are effectively bearer secrets unless protected by server-side access control.
Test ntfy Directly
Before wiring an MCP client, verify ntfy delivery:
curl -fsS \
-H "Title: ntfy-mcp test" \
-H "Priority: 3" \
-d "hello from ntfy-mcp" \
"https://ntfy.sh/$NTFY_TOPIC"For protected topics:
curl -fsS \
-H "Authorization: Bearer $NTFY_TOKEN" \
-H "Title: ntfy-mcp test" \
-d "hello from ntfy-mcp" \
"https://ntfy.sh/$NTFY_TOPIC"Codex Setup
Add a server entry to ~/.codex/config.toml:
[mcp_servers.ntfy]
command = "uv"
args = ["--directory", "/absolute/path/to/ntfy-mcp", "run", "python", "-m", "ntfy_mcp.server"]
enabled = true
enabled_tools = ["notify_user"]
[mcp_servers.ntfy.env]
NTFY_BASE_URL = "https://ntfy.sh"
NTFY_TOPIC = "replace-with-long-random-topic"
NTFY_ALLOWED_TOPICS = "replace-with-long-random-topic"
NTFY_SOURCE = "codex"
NTFY_DEFAULT_PRIORITY = "3"
NTFY_MAX_MESSAGE_LENGTH = "1800"If your topic requires auth:
NTFY_TOKEN = "replace-with-ntfy-access-token"Keep tokens in local config or a secret manager. Do not commit them.
Claude Desktop Setup
Add a server entry to Claude Desktop's MCP configuration:
{
"mcpServers": {
"ntfy": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/ntfy-mcp",
"run",
"python",
"-m",
"ntfy_mcp.server"
],
"env": {
"NTFY_BASE_URL": "https://ntfy.sh",
"NTFY_TOPIC": "replace-with-long-random-topic",
"NTFY_ALLOWED_TOPICS": "replace-with-long-random-topic",
"NTFY_SOURCE": "claude",
"NTFY_DEFAULT_PRIORITY": "3",
"NTFY_MAX_MESSAGE_LENGTH": "1800"
}
}
}
}Add NTFY_TOKEN inside env only if the ntfy topic requires bearer auth.
Tool Input
notify_user accepts:
Field | Type | Notes |
| string | Required. Sent as the ntfy title. |
| string | Required. Truncated to |
|
| Required by schema default. |
| integer | Optional. Must be |
| list of strings | Optional. Conservative tag aliases only. |
| string | Optional. Must start with |
| string | Optional. Must be in |
Severity adds a default tag:
Severity | Default tag |
|
|
|
|
|
|
|
|
Priority behavior:
Explicit priority wins if it is
1through5.infoandsuccessuseNTFY_DEFAULT_PRIORITY.warningdefaults to at least4when no explicit priority is supplied.errordefaults to5when no explicit priority is supplied.
Example Prompts
"Notify me when the build finishes."
"Notify me only if tests fail."
"Notify me when you need approval."
"Notify me when the PR is ready for review."
Environment Variables
Variable | Required | Default | Description |
| No |
| HTTPS ntfy server base URL. |
| Yes | None | Default topic. Must pass topic validation. |
| No |
| Comma-separated allow-list. |
| No | None | Bearer token used for the |
| No |
| Default priority for |
| No |
| Maximum message length before truncation. |
| No |
| Operator-controlled source label. |
| No |
| Validate and return success without network I/O. |
Development
uv run pytest
uv run ruff check .Dry-run the full MCP path:
NTFY_TOPIC="ntfymcp_smoke_topic_123" \
NTFY_ALLOWED_TOPICS="ntfymcp_smoke_topic_123" \
NTFY_DRY_RUN=true \
uv run python examples/mcp-client-smoke.pyLimitations
STDIO first.
Remote Streamable HTTP mode is future work.
Attachments are intentionally omitted from the MVP.
Action buttons are intentionally omitted from the MVP.
Secret detection is basic and intentionally conservative.
No local rate limiting yet.
Roadmap
Optional local rate limiting and duplicate suppression.
Streamable HTTP mode with authentication guidance.
Stronger configurable secret scanning.
Metadata-only audit logging.
Notification templates for common agent states.
Packaged releases and signed artifacts.
License
MIT. See LICENSE.
Available Tools
1 toolnotify_userB
Send an allow-listed ntfy push notification to the configured user.
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| message | Yes | ||
| severity | No | info | |
| priority | No | ||
| tags | No | ||
| click_url | No | ||
| topic | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden but only mentions 'allow-listed' without explaining implications. It omits details about side effects, error handling, rate limits, or permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that conveys the core purpose without extraneous words. It is appropriately front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the presence of an output schema, the description lacks completeness for a tool with 7 parameters and no parameter descriptions. It does not explain prerequisites, failure modes, or what 'allow-listed' means in practice.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, but it provides no explanation of parameters beyond the schema's field names and types. The general context of 'push notification' gives minimal insight.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action 'send', the medium 'ntfy push notification', and the scope 'to the configured user' with the qualifier 'allow-listed'. It is specific and distinct despite no sibling tools for comparison.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool, when not to use it, or any alternatives. The description lacks usage context that would help the agent decide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
notify_user
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of confusion or overlap between tools.
The single tool uses a clear verb_noun pattern (notify_user), which is consistent within the set.
One tool is minimal; while it may suffice for sending a notification, a more feature-rich server might benefit from additional tools like listing or managing subscriptions.
The tool covers the core action of sending a notification, but lacks any additional operations such as checking delivery status or managing notification preferences.
Maintenance
Related MCP Connectors
Let your AI agent notify you by email, Slack, Discord, or webhook. One tool: send_notification.
Reach your own phone from an AI agent: notifications, approval questions, reminders, ring, files.
Push notifications for AI agents - send instant iPhone notifications from any MCP client.
Build and send email, SMS, and push straight from your AI agent.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables bidirectional communication between AI agents and users through ntfy.sh push notifications, allowing agents to send messages and wait for user responses in asynchronous chat workflows.316 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables sending push notifications via ntfy with a single tool, allowing Claude agents to send notifications directly without shell access.MIT
- FlicenseAqualityBmaintenanceEnables AI to send push notifications to your phone via a configurable gateway. It is a thin wrapper that posts to an Apprise push gateway.1-
- AlicenseAqualityAmaintenanceEnables AI agents to send push alerts to your phone via Blipr, useful for notifying when tasks complete, builds break, or approvals are needed.517 npmMIT