Telegram MCP Server
Telegram MCP Server
Gemini Spark や Claude Desktop などの MCP(Model Context Protocol)クライアントから、Telegram メッセージの送受信を行えるようにするための MCP サーバーです。
前提条件
動作には Node.js が必要です。
Node.js のインストール:
まだインストールされていない場合は、Node.js 公式サイト から LTS 版をダウンロードしてインストールしてください。
インストール完了後、コマンドプロンプトや PowerShell を再起動し、
node -vおよびnpm -vが動作することを確認してください。
Telegram Bot の作成:
Telegram アプリ内で @BotFather を検索し、
/newbotコマンドを使用して新しい Bot を作成します。作成後に表示される HTTP API Token(例:
123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ)を控えておきます。
Related MCP server: telegram-mcp
セットアップ手順
リポジトリディレクトリに移動し、依存関係をインストールします:
npm install環境変数の設定:
ディレクトリ内の
.env.exampleを.envにコピーします。
copy .env.example .env.envファイルを開き、控えておいたTELEGRAM_BOT_TOKENを設定します。
TELEGRAM_BOT_TOKEN=ここにBotのトークンを貼り付け TELEGRAM_DEFAULT_CHAT_ID=(任意)デフォルトの宛先チャットID※
TELEGRAM_DEFAULT_CHAT_IDを指定しておくと、ツール呼び出し時にチャットIDを省略した場合に自動的にそのチャットに送信されます。ビルドの実行: TypeScript を JavaScript にコンパイルします。
npm run build
サーバーの起動とMCPクライアントへの登録方法
1. サーバーの起動
ローカルで起動する場合は、依存関係をインストール、ビルドした後に以下のように起動します。
npm startデフォルトではポート 3000 でサーバーが起動し、以下のエンドポイントが利用可能になります。
SSEエンドポイント:
http://localhost:3000/sse
ポート番号を変更したい場合は、環境変数 PORT を指定して起動するか、.env ファイルに PORT=8080 のように追記してください。
2. MCP クライアントへの登録
Claude Desktop の場合
設定ファイル(例: AppData\Roaming\Claude\claude_desktop_config.json)に以下のように SSE サーバーを追加します。
{
"mcpServers": {
"telegram-mcp": {
"type": "sse",
"url": "http://localhost:3000/sse"
}
}
}Gemini Spark 等のクライアントの場合
クライアントの設定画面で SSE トランスポートを選択し、URL に http://localhost:3000/sse を指定して登録します。
提供ツール
1. telegram_get_me
概要: Bot自身のアカウント情報を取得します。接続確認テストに便利です。
パラメータ: なし
2. telegram_send_message
概要: 指定した
chat_idにメッセージを送信します。パラメータ:
text(string, 必須): 送信するメッセージ。chat_id(string, 任意): 送信先チャットIDまたはユーザー名(例:@my_channel)。指定しない場合は.envのデフォルトIDが使用されます。parse_mode(string, 任意): 書式設定モード(Markdown,HTML,MarkdownV2から選択)。
3. telegram_get_updates
概要: Bot宛ての最新メッセージ(アップデート)を取得します。
パラメータ:
offset(number, 任意): 取得開始位置となるアップデートID。limit(number, 任意): 一度に取得する最大件数(1〜100、デフォルト100)。timeout(number, 任意): ロングポーリングのタイムアウト秒数。
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
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with Telegram accounts through MCP, supporting messaging, contacts, groups, media, and admin functions.4Apache 2.0
- AlicenseNot gradedqualityCmaintenanceConnects AI tools to Telegram via MCP, enabling reading chats, sending messages, managing groups, and more using your own account.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Telegram accounts, chats, messages, media, and more via MCP, using Telethon.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants like Claude to read, search, and send messages through your personal Telegram account via MCP tools.MIT
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Give AI agents real phone numbers, messages, and voice calls via MCP.
Phone, SMS & email for AI agents — one remote MCP endpoint, OAuth login, zero install.
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/griffon190/TelegramMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server