TT

timoncool/telegram-api-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

38 stars 13 forks 品質 83 トレンド 21MIT

究極のテレグラムボットAPI MCPサーバー — フルv9.6カバレッジ、メタモード、レート制限、遮断器。 タイプスクリプト.

概要

185/185 Zod バリデーション、トークンマスク、ツールアノテーション、ゼロ ブラート (依存関係) によるボット API メソッド。 - — メッセージ、メディア、投票、チャット、フォーラム、ステッカー、支払い、ビジネス、ストーリー、ギフト、ゲーム、インライン、マネージドボット - — 見出し、テーブル、リスト、コラージュ、スライドショー、フットノート、および最大で32768文字まで投稿 1024文字のキャプションの天井ではなく、最大 50 インラインメディア、 - (7月 2026) - 豊富なメッセージ、エピヘムアルメッセージ、ライブ写真、ゲストモード、参加方法、メモ、メモ、および最大 50 のインラインメディア、つまり、メッセージ、メールが送信されるまで - 正確なメッセージ、メール、およびテキストの送信、およびテキストの送信、およびテキストの送信、およびテキストの送信、およびテキストの送信、およびテキストの送信、またはテキストの送信、またはテキストの送信、テキストの送信、テキストの送信、またはテキストの送信、またはテキストの送信、またはテキストの送信、またはテキストの送信、またはテキストの送信、テキストの送信、またはテキストの送信、テキストの送信、テキストの送信、またはテキストのテキストの送信、またはテキストのテキストの送信、テキストの送信、テキストの送信、テキストのテキストの送信、テキストの送信、またはテキストの送信、

概要(AI 翻訳)

Telegram Bot API 用の MCP サーバー — 185 メソッド、完全な v10.2 のカバレッジ、リッチ メッセージ、メタモード、レートの制限、回路ブレーカ。

185/185 Zod バリデーション、トークンマスク、ツールアノテーション、ゼロ ブラート (依存関係) によるボット API メソッド。

##特徴

-185 / 185ボットAPIメソッドメッセージ、メディア、投票、チャット、フォーラム、ステッカー、支払い、ビジネス、ストーリー、ギフト、ゲーム、インライン、管理されたボット -リッチメッセージ — 見出し、テーブル、リスト、コラージュ、スライドショー、脚注、および最大50のインラインメディアの代わりに、1024文字のキャプションの天井で最大32768文字を投稿

  • Bot API 10.2 (7月2026) — リッチメッセージ、エピヘムアルメッセージ、ライブ写真、ゲストモード、参加リクエストの問い合わせ、投票メディア -[telegram_format]ツール — サーバはrich_message、 [media]、 [reply_markup]、 [poll]の正確な形状を記述し、送信する beforeが増えるので、エージェントは構文([[[T5]のMCPリソースとして公開)を推測する必要はありません)
  • Meta-mode — 185の代わりに2つのツールは、~99%のコンテキストトークンを保存します -Rate Limiting - グローバル(30 req/sec) + チャット毎(20 msg/min)、非同期ミューテックス付きトークンバケット

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

185/185 Bot API methods with Zod validation, token masking, tool annotations, and zero bloat (2 dependencies).

Features

  • 185/185 Bot API methods — messages, media, polls, chats, forums, stickers, payments, business, stories, gifts, games, inline, managed bots
  • Rich messages — post up to 32768 characters with headings, tables, lists, collages, slideshows, footnotes and up to 50 inline media, instead of the 1024-character caption ceiling
  • Bot API 10.2 (July 2026) — rich messages, ephemeral messages, live photos, guest mode, join-request queries, poll media
  • telegram_format tool — the server explains the exact shape of rich_message, media, reply_markup, poll and more before you send, so an agent never has to guess the syntax (also exposed as MCP resources under telegram://format/…)
  • Meta-mode — 2 tools instead of 185, saves ~99% context tokens
  • Rate limiting — global (30 req/sec) + per-chat (20 msg/min), token bucket with async mutex
  • Circuit breaker — 3-state (closed/open/half-open), auto-recovery
  • Retry with backoff — respects Telegram 429 retry_after, exponential backoff on 5xx
  • Zod validation — every parameter validated before hitting Telegram API
  • Token masking — bot token never appears in responses, logs, or error messages
  • File upload security — path traversal protection, configurable allowed directories
  • Tool annotations — all 185 methods annotated (readOnly, destructive, idempotent, openWorld)
  • Docs mirror + audit — npm run docs:refresh re-downloads the official spec, npm run audit fails if any method or parameter drifts from it
  • Response truncation — 100K char limit to prevent context overflow
  • Zero bloat — only 2 dependencies: @modelcontextprotocol/sdk + zod

Quick Start

Claude Code

claude mcp add telegram -- npx telegram-api-mcp -e TELEGRAM_BOT_TOKEN=your_token

With meta-mode (recommended for large conversations):

claude mcp add telegram -- npx telegram-api-mcp \
  -e TELEGRAM_BOT_TOKEN=your_token \
  -e TELEGRAM_META_MODE=true

Claude Desktop

Add to claude_desktop_config.json:

GitHub で README 全文を見る

インストール

npx telegram-api-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "telegram": { "command": "npx", "args": ["telegram-api-mcp"], "env": { "TELEGRAM_BOT_TOKEN": "your_token_from_botfather" } } } }