
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
ntfy-mcp-server
Advanced tools
Send, manage, and replay ntfy push notifications via MCP. STDIO or Streamable HTTP.
Send, manage, and replay ntfy push notifications via MCP. STDIO or Streamable HTTP.
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 |
|---|---|
ntfy_publish_message | Send or update a push notification on an ntfy topic. |
ntfy_manage_message | Clear or delete a previously-sent notification by sequence_id. |
ntfy_fetch_messages | Poll cached messages from one or more topics with optional filters. |
ntfy_search_emoji_tags | Look up ntfy emoji tag short codes for use in tags. |
ntfy_publish_messageSend 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.
title, priority (1–5), tags, click, attach, icon, filename, markdown, delay, email, call, cache, firebaseview, broadcast, http, copy) per messagesequence_idbase_url override that forwards credentials only when the override matches a registered server (NTFY_BASE_URL or an NTFY_SERVERS entry); otherwise the request goes out unauthenticated, so credentials never leak to alternate hostsemail, call, or a broadcast / http action button ask the user to confirm the specific recipient or target first, on STDIO clients that support MCP elicitationntfy_manage_messageClear (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.
sequence_id, and operation before the event fires; declining fails the call with consent_declinedntfy_fetch_messagesPoll 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.
alerts,backups,phil_alerts)since (duration / timestamp / message ID / all / latest), priority, tags, id, title, message, scheduled-only10m, default limit 20 messages per response, hard cap 100 — over-limit windows keep the newest limit messages, listed oldest-firstmessageTruncated reporting the dropped count; refetch with a message id to read that one in fullntfy_search_emoji_tagsSubstring 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.
| Type | Name | Description |
|---|---|---|
| Resource | ntfy://{topic} | 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: ISO 8601 timestamps and ~500-char body truncation. |
ntfy_fetch_messages covers the same topic data with custom windows and filters when the resource's fixed defaults aren't enough.
Built on @cyanheads/mcp-ts-core:
ctx.fail(reason, …) plus framework error factories (forbidden, notFound, validationError, …)none, jwt, oauthin-memory, filesystem, Supabase, Cloudflare KV/R2/D1ntfy-specific:
withRetry + per-request timeout)NTFY_BASE_URL or per-entry under NTFY_SERVERS); per-call base_url overrides forward auth only when the override matches a registered server, and go out unauthenticated otherwiseemail, call, or a broadcast / http action 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 issuedbase_url overrides (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 exemptdocs/ntfy/emojis.md via scripts/build-emoji-tags.tsAdd 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/mcp
ntfy.sh requires no account; self-hosted instances and protected topics may need a bearer token or basic-auth credentials.git clone https://github.com/cyanheads/ntfy-mcp-server.git
cd ntfy-mcp-server
bun install
cp .env.example .env
# edit .env and set NTFY_DEFAULT_TOPIC (and auth, if needed)
| Variable | Description | Default |
|---|---|---|
NTFY_SERVERS | JSON array of { baseUrl, authToken? | authUsername?+authPassword? } entries — one per ntfy server. First entry is the default base. Auth is scoped to the entry's baseUrl; per-call base_url overrides that match a registered base forward that server's auth. Use this when you need more than one authenticated server in a single process; it takes precedence over the single-server vars below. | — |
NTFY_BASE_URL | Single-server shorthand — base URL of the ntfy server (no trailing slash). Used when NTFY_SERVERS is unset. | https://ntfy.sh |
NTFY_DEFAULT_TOPIC | Topic used when a tool call omits topic. | — |
NTFY_AUTH_TOKEN | Bearer access token (tk_…) for the single-server shorthand. Mutually exclusive with NTFY_AUTH_USERNAME / NTFY_AUTH_PASSWORD. | — |
NTFY_AUTH_USERNAME | Basic-auth username for the single-server shorthand — required together with NTFY_AUTH_PASSWORD. | — |
NTFY_AUTH_PASSWORD | Basic-auth password for the single-server shorthand — required together with NTFY_AUTH_USERNAME. | — |
NTFY_REQUEST_TIMEOUT_MS | Per-request HTTP timeout in milliseconds. | 15000 |
NTFY_MAX_RETRIES | Max retry attempts for transient upstream failures (5xx, network, 429). | 3 |
NTFY_BLOCK_PRIVATE_HOSTS | When true, a per-call base_url override must resolve to a public address, and its redirects are not followed. Servers registered under NTFY_SERVERS / NTFY_BASE_URL are exempt, so a deliberate LAN target still works. Turn it on where callers you don't control can reach the server. | false |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_SESSION_MODE | HTTP session model: stateless, stateful, or auto. | auto |
MCP_HTTP_HOST | HTTP host. | 127.0.0.1 |
MCP_HTTP_PORT | HTTP port. | 3010 |
MCP_HTTP_ENDPOINT_PATH | HTTP endpoint path. | /mcp |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for file-based logs (Node only; ignored on Workers). | ./logs |
OTEL_ENABLED | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | false |
See .env.example for the full list of optional overrides.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run 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 build -t ntfy-mcp-server .
docker run --rm -e NTFY_DEFAULT_TOPIC=your-topic -p 3010:3010 ntfy-mcp-server
The 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.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools and resources, initializes services. |
src/config | Server-specific environment variable parsing (NTFY_*) with Zod. |
src/mcp-server/tools | Tool definitions (*.tool.ts). |
src/mcp-server/resources | Resource definitions (*.resource.ts). |
src/services/ntfy | ntfy HTTP client, types, and error classifier. |
src/services/emoji-tags | Bundled emoji short-code reference and lookup service. |
docs/ntfy | Mirrored upstream ntfy API docs (pinned commit in SOURCES.md). |
tests/ | Unit and integration tests mirroring src/. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storageerrors[] contracts stay inline — repetition is intended for localityIssues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
FAQs
Send, manage, and replay ntfy push notifications via MCP. STDIO or Streamable HTTP.
The npm package ntfy-mcp-server receives a total of 523 weekly downloads. As such, ntfy-mcp-server popularity was classified as not popular.
We found that ntfy-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.