MCP コミュニケーター(テレグラム)
Telegramを通じてユーザーとのコミュニケーションを可能にするMCPサーバー。このサーバーは、質問、通知の送信、ファイルの共有、プロジェクトアーカイブの作成など、Telegramボットを介してユーザーとやり取りするためのツールを提供します。
インストール
npm経由(グローバル)
npm install -g mcp-communicator-telegramnpx経由(オンデマンド)
npx mcptelegramTelegram チャット ID を取得するには:
npx mcptelegram-chatidRelated MCP server: Telegram MCP Server
特徴
Telegramを通じてユーザーに質問する
ユーザーに通知を送信する(応答は不要)
Telegram経由でユーザーにファイルを送信する
プロジェクトの zip ファイルを作成して送信します (.gitignore を尊重)
応答を非同期的に受信する(応答を無期限に待機する)
返信ベースのメッセージ追跡のサポート
安全なチャットID検証
エラー処理とログ記録
前提条件
Node.js (v14以上)
Telegram ボット トークン ( @BotFatherから取得)
Telegram チャット ID (付属のユーティリティを使用して取得できます)
インストール
リポジトリをクローンします。
git clone https://github.com/qpd-v/mcp-communicator-telegram.git
cd mcp-communicator-telegram依存関係をインストールします:
npm installTelegram ボットを作成します:
Telegramを開いて@BotFatherを検索します
/newbotを送信し、指示に従ってください受け取ったボットトークンを保存する
チャット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 ツール
This server cannot be installed
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.