ntfy-mcp-server
Enables sending notifications to any device with ntfy integration, supporting rich message formatting with titles, tags, priorities, action buttons, and attachments for real-time notifications to phones, desktops, and other devices.
Click on "Install 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-mcp-serversend me a notification when the deployment finishes"
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.
Tools
Four tools covering the ntfy publish/subscribe surface — message lifecycle (publish, manage, fetch) plus an emoji-tag lookup that feeds the publish tool's tags field:
Tool Name | Description |
| Send or update a push notification on an ntfy topic. |
| Clear or delete a previously-sent notification by |
| Poll cached messages from one or more topics with optional filters. |
| Look up ntfy emoji tag short codes for use in |
ntfy_publish_message
Send or update a push notification on an ntfy topic. Topics are created on first publish — treat the topic name as a secret because anyone who knows it can publish or subscribe.
Full publish-parameter coverage —
title,priority(1–5),tags,click,attach,icon,filename,markdown,delay,email,call,cache,firebaseUp to three discriminated action buttons (
view,broadcast,http,copy) per messageUpdate or replace previously-sent messages by passing the original
sequence_idPer-call
base_urloverride that forwards credentials only when the override matches a registered server (NTFY_BASE_URLor anNTFY_SERVERSentry); otherwise the request goes out unauthenticated, so credentials never leak to alternate hostsPublishes carrying
email,call, or abroadcast/httpaction button ask the user to confirm the specific recipient or target first, on STDIO clients that support MCP elicitation
ntfy_manage_message
Clear (mark read & dismiss) or delete a previously-sent ntfy notification by sequence_id. Append-only — the original message stays in cache, and a message_clear / message_delete event is emitted to subscribers. Idempotent.
STDIO clients that support MCP elicitation prompt the user to confirm the topic,
sequence_id, and operation before the event fires; declining fails the call withconsent_declined
ntfy_fetch_messages
Poll cached messages from one or more topics with optional filters. Returns a snapshot, not a live stream — use it to confirm delivery, replay missed alerts, or audit topic activity.
Comma-separated multi-topic queries (e.g.
alerts,backups,phil_alerts)Filter by
since(duration / timestamp / message ID /all/latest),priority,tags,id,title,message, scheduled-onlyDefault window
10m, default limit 20 messages per response, hard cap 100 — over-limit windows keep the newestlimitmessages, listed oldest-firstLong bodies truncated to ~500 chars with
messageTruncatedreporting the dropped count; refetch with a messageidto read that one in full
ntfy_search_emoji_tags
Substring search over the bundled ntfy emoji-tag reference. Returns the tag strings ready to plug into ntfy_publish_message's tags field. Without a query, returns the first slice of the full reference; offset pages through matches beyond the limit cap.
Related MCP server: ntfy-me-mcp
Resources and prompts
Type | Name | Description |
Resource |
| Snapshot of a topic — latest 20 messages from the past 1 hour, plus the topic's browser URL. Same normalized message shape as |
ntfy_fetch_messages covers the same topic data with custom windows and filters when the resource's fixed defaults aren't enough.
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool and resource definitions — single file per primitive, framework handles registration and validation
Typed error contracts via
ctx.fail(reason, …)plus framework error factories (forbidden,notFound,validationError, …)Pluggable auth:
none,jwt,oauthSwappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1Structured logging with optional OpenTelemetry tracing
STDIO and Streamable HTTP transports
ntfy-specific:
Wraps ntfy's HTTP API with retry-aware client (
withRetry+ per-request timeout)Per-server scoped auth — credentials are bound to each registered base URL (
NTFY_BASE_URLor per-entry underNTFY_SERVERS); per-callbase_urloverrides forward auth only when the override matches a registered server, and go out unauthenticated otherwiseUser confirmation before side effects that leave the notification drawer — a clear/delete, or a publish carrying
email,call, or abroadcast/httpaction button. Clients that support MCP elicitation get a prompt naming the exact target; on clients that don't, the tool annotations remain the only signal. Reachable over STDIO today — the Streamable HTTP transport builds a fresh server per request, so a client's advertised capabilities do not survive to the tool call and no prompt is issuedOptional SSRF guard on
base_urloverrides (NTFY_BLOCK_PRIVATE_HOSTS) — resolves the host and blocks every reserved destination it answers on (loopback, RFC 1918, RFC 6598 mesh space, link-local, and the IPv6 equivalents), then refuses redirects, with registered servers exemptBundled emoji-tag reference, regenerated from upstream
docs/ntfy/emojis.mdviascripts/build-emoji-tags.tsMutually-exclusive auth modes (bearer token or basic auth) validated at config-load time
Getting started
Add the following to your MCP client configuration file. Public ntfy.sh works out of the box without an account; for protected topics, generate an access token at https://ntfy.sh/account.
{
"mcpServers": {
"ntfy-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["ntfy-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"NTFY_DEFAULT_TOPIC": "your-topic-name"
}
}
}
}Or with Docker:
{
"mcpServers": {
"ntfy-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "NTFY_DEFAULT_TOPIC=your-topic-name",
"ghcr.io/cyanheads/ntfy-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 NTFY_DEFAULT_TOPIC=your-topic bun run start:http
# Server listens at http://127.0.0.1:3010/mcpPrerequisites
Bun v1.3.11 or higher (or Node.js v24+).
A topic name on an ntfy server. Public
ntfy.shrequires no account; self-hosted instances and protected topics may need a bearer token or basic-auth credentials.
Installation
Clone the repository:
git clone https://github.com/cyanheads/ntfy-mcp-server.gitNavigate into the directory:
cd ntfy-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env and set NTFY_DEFAULT_TOPIC (and auth, if needed)Configuration
Variable | Description | Default |
| JSON array of | — |
| Single-server shorthand — base URL of the ntfy server (no trailing slash). Used when |
|
| Topic used when a tool call omits | — |
| Bearer access token ( | — |
| Basic-auth username for the single-server shorthand — required together with | — |
| Basic-auth password for the single-server shorthand — required together with | — |
| Per-request HTTP timeout in milliseconds. |
|
| Max retry attempts for transient upstream failures (5xx, network, 429). |
|
| When |
|
| Transport: |
|
| HTTP session model: |
|
| HTTP host. |
|
| HTTP port. |
|
| HTTP endpoint path. |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for file-based logs (Node only; ignored on Workers). |
|
| Enable OpenTelemetry instrumentation (spans, metrics, completion logs). |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security, changelog sync bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t ntfy-mcp-server .
docker run --rm -e NTFY_DEFAULT_TOPIC=your-topic -p 3010:3010 ntfy-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/ntfy-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing ( |
| Tool definitions ( |
| Resource definitions ( |
| ntfy HTTP client, types, and error classifier. |
| Bundled emoji short-code reference and lookup service. |
| Mirrored upstream ntfy API docs (pinned commit in |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Per-tool
errors[]contracts stay inline — repetition is intended for locality
Contributing
Issues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that allows LLMs to execute shell commands with explicit user permission through desktop notifications.Last updated251MIT
- AlicenseAqualityCmaintenanceA 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.Last updated221969GPL 3.0
- AlicenseBqualityCmaintenanceA Model Context Protocol server that allows AI agents to play notification sounds when tasks are completed.Last updated11412Apache 2.0
- FlicenseBqualityBmaintenanceA Model Context Protocol server that allows displaying messages via polybar status bar and sending desktop notifications via notify-send/dunst.Last updated2
Related MCP Connectors
Push notifications for AI agents - send instant iPhone notifications from any MCP client.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP (Model Context Protocol) server for Appwrite
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/ntfy-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server