ntfy-me-mcp

by gitmotion
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows configuration of the server using environment variables stored in .env files, supporting settings for notification topics, server URLs, and authentication tokens.

  • Provides containerized deployment option with official Docker images available on Docker Hub and GitHub Container Registry for running the server in a containerized environment.

  • Supports rich text formatting in notifications, with automatic detection and rendering of markdown syntax for creating formatted lists, code blocks, links, tables, and other text styling.

📤 ntfy-me-mcp

ntfy サービス (パブリックまたはトークン サポート付きのセルフホスト) 経由で通知を送信するための、合理化されたモデル コンテキスト プロトコル (MCP) サーバー 📲

概要

ntfy-me-mcpは、AIアシスタントにntfyサービス(パブリックまたはトークンサポート付きのセルフホスト)を介してデバイスにリアルタイム通知を送信する機能を提供します。AIがタスクを完了したとき、エラーが発生したとき、重要なマイルストーンに到達したときに通知を受け取ることができます。これらはすべて、常時監視なしで行えます。

サーバーには、ビューアクションを作成するための自動 URL 検出や、スマートなマークダウン形式の検出などのインテリジェントな機能が含まれており、AI アシスタントが追加の構成なしでリッチでインタラクティブな通知を簡単に作成できるようになります。

入手可能:

名前リンク / バッジ
グラマ.ai
スミザリー.ai

目次

特徴

  • 🚀クイックセットアップ:npx または docker で実行します。
  • 🔔リアルタイム通知:タスクが完了すると、携帯電話/デスクトップで更新情報を受け取ることができます
  • 🎨豊富な通知:トピック、タイトル、優先度、絵文字タグ、詳細メッセージのサポート
  • 🔍通知の取得: ntfyトピックからキャッシュされたメッセージを取得してフィルタリングします
  • 🎯スマートアクションリンク: メッセージ内のURLを自動的に検出し、表示アクションを作成します
  • 📄インテリジェント マークダウン: マークダウン形式がある場合は自動検出して有効にします
  • 🔒安全: アクセストークンによるオプションの認証
  • 🔑入力マスキング: ntfy トークンを vs 構成に安全に保存します。
  • 🌐セルフホストサポート:ntfy.shとセルフホストntfyインスタンスの両方で動作します

(近日公開...)

  • 📨メール: メールで通知を送信します (ntfy メール サーバーの設定が必要です)
  • 🔗クリック URL : クリック URL をカスタマイズする機能
  • 🖼️画像 URL : インテリジェントな画像 URL 検出により、メッセージや通知に画像 URL を自動的に含めます
  • 🏁そしてさらに!

クイックスタート - MCP サーバーの構成

NPM / NPX(推奨方法)

  • システムに npm / npx がインストールされている必要があります。
  • この方法は、サーバーをセットアップするためのシンプルで軽量な方法を提供するため、ほとんどのユーザーに推奨されます。

MCP 互換アシスタントを使用した最も簡単なセットアップでは、以下を MCP 構成に追加します。

最小限の構成(ntfy.sh の公開トピック用)

{ "ntfy-me-mcp": { "command": "npx", "args": ["ntfy-me-mcp"], "env": { "NTFY_TOPIC": "your-topic-name" } } }

完全な構成(プライベートサーバーまたは保護されたトピックの場合)

オプション1: 構成内の直接トークン

{ "ntfy-me-mcp": { "command": "npx", "args": ["ntfy-me-mcp"], "env": { "NTFY_TOPIC": "your-topic-name", "NTFY_URL": "https://your-ntfy-server.com", "NTFY_TOKEN": "your-auth-token" // Use if using a protected topic/server } } }

オプション 2: 安全なトークン処理のために VS Code 入力を使用する (推奨)

VS Code のsettings.json ファイルに以下を追加します。

"mcp": { "inputs": [ { // Add this to your inputs array "type": "promptString", "id": "ntfy_token", "description": "Ntfy Token", "password": true } ], "servers": { // Other servers... "ntfy-me-mcp": { "command": "npx", "args": ["ntfy-me-mcp"], "env": { "NTFY_TOPIC": "your-topic-name", "NTFY_URL": "https://your-ntfy-server.com", "NTFY_TOKEN": "${input:ntfy_token}", // Use the input id variable for the token "PROTECTED_TOPIC": "true" // Prompts for token and masks it in your config } } } }

この設定により、VS Code はサーバーの起動時にトークンの入力を要求し、入力時にトークンはマスクされます。

ドッカー

DockerでMCPを使用する

  • システムに Docker がインストールされている必要があります。
  • この方法は、コンテナ化された環境でサーバーを実行する場合に便利です。
  • Docker Hub または GitHub Container Registry で利用可能な公式 Docker イメージを使用できます。

Docker イメージ:

  • gitmotion/ntfy-me-mcp:latest (Docker ハブ)
  • ghcr.io/gitmotion/ntfy-me-mcp:latest (GitHub コンテナ レジストリ)

MCP 構成 (例: VS Code の settings.json):

"mcp": { "servers": { "ntfy-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "NTFY_TOPIC", "-e", "NTFY_URL", "-e", "NTFY_TOKEN", "-e", "PROTECTED_TOPIC", "gitmotion/ntfy-me-mcp", // OR use ghcr.io/gitmotion/ntfy-me-mcp:latest ], "env": { "NTFY_TOPIC": "your-topic-name", "NTFY_URL": "https://your-ntfy-server.com", "NTFY_TOKEN": "${input:ntfy_token}", "PROTECTED_TOPIC": "true" } } } }

インストール

サーバーを直接インストールして実行する必要がある場合 (上記の MCP 構成の代替):

オプション1: グローバルにインストールする

npm install -g ntfy-me-mcp

オプション2: npxで実行

npx ntfy-me-mcp

オプション3: ローカルにインストールする

# Clone the repository git clone https://github.com/gitmotion/ntfy-me-mcp.git cd ntfy-me-mcp # Install dependencies npm install # Copy the example environment file and configure it cp .env.example .env # Edit .env with your preferred editor and update the variables # nano .env # or use your preferred editor # Build the project npm run build # Start the server npm start

オプション4: nodeコマンドでローカルにビルドして使用する

サーバーを開発またはカスタマイズしている場合は、node を使用して直接実行することをお勧めします。

# Clone the repository git clone https://github.com/gitmotion/ntfy-me-mcp.git cd ntfy-me-mcp # Install dependencies npm install # Copy the example environment file and configure it cp .env.example .env # Edit the .env file to set your NTFY_TOPIC and other optional settings # nano .env # or use your preferred editor # Build the project npm run build # Run using node directly npm start

MCPでローカルに構築されたサーバーを使用する

ローカルでビルドされたバージョンを使用するように MCP を構成する場合は、ビルドされた index.js ファイルへのノード コマンドとパスを指定します。

{ "ntfy-me": { "command": "node", "args": ["/path/to/ntfy-mcp/build/index.js"], "env": { "NTFY_TOPIC": "your-topic-name", //"NTFY_URL": "https://your-ntfy-server.com", // Use if using a self-hosted server //"NTFY_TOKEN": "your-auth-token" // Use if using a protected topic/server } } }

args 配列では、build/index.js ファイルへの絶対パスを使用することを忘れないでください。

オプション5: MCPマーケットプレイスのインストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の ntfy-me-mcp を自動的にインストールするには:

npx -y @smithery/cli install @gitmotion/ntfy-me-mcp --client claude

構成

環境変数

提供されている例をコピーして、プロジェクト ディレクトリに.envファイルを作成します。

# Copy the example file cp .env.example .env # Edit the file with your preferred editor nano .env # or vim, code, etc.

.envファイルには次の変数が含まれている必要があります。

# Required NTFY_TOPIC=your-topic-name # Optional - Configure these if using a private/protected ntfy server # NTFY_URL=https://ntfy.sh # Default is ntfy.sh, change to your self-hosted ntfy server URL if needed # Include port if needed, e.g., https://your-ntfy-server.com:8443 # NTFY_TOKEN=your-access-token # Required for authentication with protected topics/servers # PROTECTED_TOPIC=false # Set to "true" if your topic requires authentication (helps prevent auth errors)

PROTECTED_TOPICフラグは、アプリケーションがトピックに認証が必要かどうかを判断するのに役立ちます。「true」に設定され、トークンが提供されていない場合は、トークンの入力を求められます。これにより、保護されたトピックでの認証エラーを防止できます。

使用法

認証

このサーバーは、認証された ntfy エンドポイントと認証されていない ntfy エンドポイントの両方をサポートします。

  • パブリック トピック: ntfy.sh またはその他のパブリック サーバーでパブリック トピックを使用する場合、認証は必要ありません。
  • 保護されたトピック: 保護されたトピックまたはプライベート サーバーの場合は、アクセス トークンを提供する必要があります。

認証が必要なのに提供されていない場合は、トークンを追加する方法を説明する明確なエラー メッセージが表示されます。

通知受信者の設定

  1. デバイスにntfyアプリをインストールする
  2. 選択したトピックを購読する( NTFY_TOPIC設定と同じ)

通知の送信(ntfy_me ツール)

このセクションでは、ntfy_me ツールを使用して通知を送信することに関連するすべての機能について説明します。

自然言語の使用

AI アシスタントを操作するときは、次のような自然なフレーズを使用できます。

"Send me a notification when the build is complete" "Notify me when the task is done" "Alert me after generating the code" "Message me when the process finishes" "Send an alert with high priority"

メッセージパラメータ

このツールは次のパラメータを受け入れます:

パラメータ説明必須
タスクタイトル通知タイトルはい
タスクサマリー通知本文はい
優先度メッセージの優先度: 最小、低、デフォルト、高、最大いいえ
タグ通知タグの配列(絵文字ショートコードをサポート)いいえ
マークダウンマークダウンフォーマットを有効にするブール値(true/false)いいえ
アクションクリック可能なリンクのビューアクションオブジェクトの配列いいえ

例:

{ taskTitle: "Code Generation Complete", taskSummary: "Your React component has been created successfully with proper TypeScript typing.", priority: "high", tags: ["check", "code", "react"] }

これにより、チェックマークの絵文字が付いた優先度の高い通知が送信されます。

アクションリンク

actionsパラメータを使用して通知にクリック可能なアクション ボタンを追加したり、サーバーがメッセージ内の URL を自動的に検出できるようにしたりすることができます。

自動URL検出

メッセージ本文にURLが含まれている場合、サーバーは最初に検出されたURLから最大3つの表示アクション(ntfyの上限)を自動的に作成します。これにより、アクション配列を手動で指定することなく、クリック可能なリンクを簡単に含めることができます。

たとえば、次のメッセージ:

{ taskTitle: "Build Complete", taskSummary: "Your PR has been merged! View the changes at https://github.com/org/repo/pull/123 or check the deployment at https://staging.app.com" }

両方の URL の表示アクションが自動的に生成され、通知内で簡単にクリックできるようになります。

手動アクションの設定

さらに細かく制御するには、手動でアクションを指定できます。

財産説明必須
アクション「表示」である必要がありますはい
ラベル表示するボタンテキストはい
URLクリックすると開くURLはい
クリアクリック時に通知をクリアするかどうか(オプション)いいえ

アクションリンクの例:

{ taskTitle: "Pull Request Review", taskSummary: "Your code has been reviewed and is ready for final checks", priority: "high", tags: ["check", "code"], actions: [ { action: "view", label: "View PR", url: "https://github.com/org/repo/pull/123" }, { action: "view", label: "View Changes", url: "https://github.com/org/repo/pull/123/files", clear: true } ] }

絵文字ショートコード

視覚的なインジケーターとして、タグ内で絵文字ショートコードを使用できます。

  • warning → ⚠️
  • check →✅
  • rocket → 🚀
  • tada → 🎉

サポートされている絵文字ショートコードの完全なリストを参照してください。

Markdownフォーマット

通知は、インテリジェントなtaskSummary機能を備えた豊富なマークダウン形式をサポートします。taskSummary にマークダウン構文を含めると、サーバーはそれを自動的に検出し、マークダウン解析を有効にします。明示的にmarkdown: trueを設定する必要はありません。

自動検出

サーバーは次のような一般的なマークダウン パターンをチェックします。

  • ヘッダー (#、## など)
  • リスト(-、*、数字)
  • コードブロック (```)
  • リンク(テキスト
  • 太字/斜体(テキストテキスト

これらのパターンが検出されると、メッセージのマークダウン解析が自動的に有効になります。

手動オーバーライド

自動検出はほとんどの場合に機能しますが、マークダウン解析を明示的に制御することもできます。

{ taskTitle: "Task Complete", taskSummary: "Regular plain text message", markdown: false // Force disable markdown parsing }

メッセージの取得(ntfy_me_fetch ツール)

このセクションでは、ntfy_me_fetch ツールを使用してメッセージを取得およびフィルタリングすることに関連するすべての機能について説明します。

自然言語の使用

AI アシスタントは、メッセージの取得を要求するさまざまな方法を理解します。

"Show me my recent notifications" "Get messages from the last hour" "Find notifications with title 'Build Complete'" "Search for messages with the test_tube tag" "Show notifications from the updates topic from the last 24hr" "Check my latest alerts"

メッセージパラメータ

このツールは次のパラメータを受け入れます:

パラメータ説明必須
ntfyトピックメッセージの取得元トピック(デフォルトは NTFY_TOPIC 環境変数)いいえ
以来どのくらいさかのぼってメッセージを取得するか(「10 分」、「1 時間」、「1 日」、タイムスタンプ、メッセージ ID、または「すべて」)いいえ
メッセージIDIDで特定のメッセージを検索するいいえ
メッセージテキスト正確なテキスト内容を含むメッセージを検索するいいえ
メッセージタイトル正確なタイトル/件名を持つメッセージを検索するいいえ
優先事項特定の優先度のメッセージを検索するいいえ
タグ特定のタグが付いたメッセージを検索するいいえ

  1. 最近のメッセージを取得
{ since: "30m" // Get messages from last 30 minutes }
  1. タイトルと優先度でフィルタリング
{ messageTitle: "Build Complete", priorities: "high", since: "1d" }
  1. タグで異なるトピックを検索
{ ntfyTopic: "updates", tags: ["error", "warning"], since: "all" }
  1. 特定のメッセージを検索
{ messageId: "xxxxXXXXxxxx" }

メッセージは、以下の詳細情報とともに返されます:

  • メッセージIDとタイムスタンプ
  • トピックとタイトル
  • 内容と優先順位
  • タグと添付ファイル
  • アクションリンクと有効期限

:メッセージ履歴の可用性は、ntfyサーバーのキャッシュ設定によって異なります。パブリックntfy.shサーバーは通常、メッセージを12時間キャッシュします。

発達

ソースから構築

git clone https://github.com/gitmotion/ntfy-me-mcp.git cd ntfy-me-mcp npm install npm run build

ライセンス

このプロジェクトは、GNU General Public License v3.0 に基づいてライセンスされています。詳細については、 LICENSEファイルを参照してください。

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。


Gitmotionによって ❤️ で作成されました

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

AI アシスタントが ntfy サービスを通じてデバイスにリアルタイム通知を送信できるようにする合理化された MCP サーバー。これにより、タスクが完了したときや重要なイベントが発生したときにアラートを受信できるようになります。

  1. Overview
    1. Available via:
  2. Table of Contents
    1. Features
      1. (Coming soon...)
    2. Quickstart - MCP Server Configuration
      1. NPM / NPX (Recommended Method)
    3. Docker
      1. Using with MCP in Docker
    4. Installation
      1. Option 1: Install globally
      2. Option 2: Run with npx
      3. Option 3: Install locally
      4. Option 4: Build and use locally with node command
      5. Option 5: MCP Marketplace installations
    5. Configuration
      1. Environment Variables
    6. Usage
      1. Authentication
      2. Setting Up the Notification Receiver
      3. Sending Notifications (ntfy_me tool)
      4. Retrieving Messages (ntfy_me_fetch tool)
    7. Development
      1. Building from Source
    8. License
      1. Contributing
        ID: fmis2ffviw