Skip to main content
Glama
qpd-v

MCP-Communicator-Telegram

by qpd-v

MCP コミュニケーター(テレグラム)

Telegramを通じてユーザーとのコミュニケーションを可能にするMCPサーバー。このサーバーは、質問、通知の送信、ファイルの共有、プロジェクトアーカイブの作成など、Telegramボットを介してユーザーとやり取りするためのツールを提供します。

インストール

npm経由(グローバル)

npm install -g mcp-communicator-telegram

npx経由(オンデマンド)

npx mcptelegram

Telegram チャット ID を取得するには:

npx mcptelegram-chatid

Related MCP server: Telegram MCP Server

特徴

  • Telegramを通じてユーザーに質問する

  • ユーザーに通知を送信する(応答は不要)

  • Telegram経由でユーザーにファイルを送信する

  • プロジェクトの zip ファイルを作成して送信します (.gitignore を尊重)

  • 応答を非同期的に受信する(応答を無期限に待機する)

  • 返信ベースのメッセージ追跡のサポート

  • 安全なチャットID検証

  • エラー処理とログ記録

前提条件

  • Node.js (v14以上)

  • Telegram ボット トークン ( @BotFatherから取得)

  • Telegram チャット ID (付属のユーティリティを使用して取得できます)

インストール

  1. リポジトリをクローンします。

git clone https://github.com/qpd-v/mcp-communicator-telegram.git
cd mcp-communicator-telegram
  1. 依存関係をインストールします:

npm install
  1. Telegram ボットを作成します:

    • Telegramを開いて@BotFatherを検索します

    • /newbotを送信し、指示に従ってください

    • 受け取ったボットトークンを保存する

  2. チャットIDを取得します:

    • .env.example.envにコピーする

    • ボット トークンを.envファイルに追加します。

      TELEGRAM_TOKEN=your_bot_token_here
    • チャット ID ユーティリティを実行します。

      npm run build
      node build/get-chat-id.js
    • ボットにメッセージを送信する

    • コンソールに表示されるチャットIDをコピーします

    • チャット ID を.envファイルに追加します。

      TELEGRAM_TOKEN=your_bot_token_here
      CHAT_ID=your_chat_id_here

構成

サーバーを MCP 設定ファイル (通常、Windows では%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.jsonにあります) に追加します。

{
  "mcpServers": {
    "mcp-communicator-telegram": {
      "command": "node",
      "args": ["path/to/mcp-communicator-telegram/build/index.js"],
      "env": {
        "TELEGRAM_TOKEN": "your_bot_token_here",
        "CHAT_ID": "your_chat_id_here"
      }
    }
  }
}

利用可能なツール

ask_user

Telegram 経由でユーザーに質問し、返答を待ちます。

入力スキーマ:

{
  "type": "object",
  "properties": {
    "question": {
      "type": "string",
      "description": "The question to ask the user"
    }
  },
  "required": ["question"]
}

使用例:

const response = await use_mcp_tool({
  server_name: "mcp-communicator-telegram",
  tool_name: "ask_user",
  arguments: {
    question: "What is your favorite color?"
  }
});

通知ユーザー

Telegram 経由でユーザーに通知メッセージを送信します (応答は不要です)。

入力スキーマ:

{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "The message to send to the user"
    }
  },
  "required": ["message"]
}

使用例:

await use_mcp_tool({
  server_name: "mcp-communicator-telegram",
  tool_name: "notify_user",
  arguments: {
    message: "Task completed successfully!"
  }
});

ファイル送信

Telegram 経由でユーザーにファイルを送信します。

入力スキーマ:

{
  "type": "object",
  "properties": {
    "filePath": {
      "type": "string",
      "description": "The path to the file to send"
    }
  },
  "required": ["filePath"]
}

使用例:

await use_mcp_tool({
  server_name: "mcp-communicator-telegram",
  tool_name: "send_file",
  arguments: {
    filePath: "path/to/file.txt"
  }
});

zip_プロジェクト

プロジェクト ディレクトリの zip ファイル (.gitignore パターンを尊重) を作成し、Telegram 経由でユーザーに送信します。

入力スキーマ:

{
  "type": "object",
  "properties": {
    "directory": {
      "type": "string",
      "description": "Directory to zip (defaults to current working directory)"
    }
  },
  "required": []
}

デフォルトディレクトリ(現在の作業ディレクトリ)での使用例:

await use_mcp_tool({
  server_name: "mcp-communicator-telegram",
  tool_name: "zip_project",
  arguments: {}
});

特定のディレクトリでの使用例:

await use_mcp_tool({
  server_name: "mcp-communicator-telegram",
  tool_name: "zip_project",
  arguments: {
    directory: "/path/to/your/project"
  }
});

特徴:

  • ディレクトリ名に基づいて[project-name]-project.zipという名前のzipファイルを作成します。

  • 指定したディレクトリまたは現在の作業ディレクトリを圧縮できます

  • .gitignore パターンを尊重

  • アーカイブ内の正しいファイルパスを維持する

  • 送信後にZIPファイルを自動的にクリーンアップします

  • 最大2GBのファイルを処理します

発達

プロジェクトをビルドします。

npm run build

開発モードで実行:

npm run dev

変更に注意してください:

npm run watch

クリーンビルドディレクトリ:

npm run clean

安全

  • サーバーは設定されたチャットIDからのメッセージにのみ応答します

  • 環境変数は機密性の高い設定に使用されます

  • メッセージIDは質問と回答のペアを追跡するために使用されます

  • ボットは適切な文脈のないメッセージを無視します

ライセンス

ISC

著者

qpd-v

バージョン

0.2.1 # 新機能のメジャーバージョンアップ:notify_user、send_file、zip_project ツール

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

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/qpd-v/mcp-communicator-telegram'

If you have feedback or need assistance with the MCP directory API, please join our Discord server