Repository navigation
Telegram MCP 0.5.0
- License: LicenseRef-ZAI-ONE 2.0 (source-available). Free install and use for yourself and your organisation, including commercial work; issues and pull requests welcome; copying code into other projects, redistribution, embedding and competing hosted services need written permission. Earlier releases keep their LicenseRef-ZAI-ONE 1.0 terms (see NOTICE). README first screen: one-line scope, why this MCP, maintenance and update check.
- Toolsets (
TELEGRAM_TOOLSETS,TELEGRAM_TOOLS,TELEGRAM_DISABLED_TOOLS,--toolsets), read-only mode (TELEGRAM_READ_ONLY,--read-only) and write categories fortelegram_write. Unset = previous surface. - Per-chat ACL:
TELEGRAM_ALLOWED_CHATS(deny-by-default when set) andTELEGRAM_DENIED_CHATS; listings are filtered. - Compact tool descriptions and titles; router
instructionsas intent → first tool → skill/guide, with a fallback totelegram://playbook; error envelopes gainhintanddocs; new codeschat_access_denied,tool_disabled. - Resources
telegram://toolsets,telegram://playbook,telegram://guide/{topic}; promptsinbox_digest,publish_post,chat_research. - Self-contained skills (
skills/, includingtelegram-channel-reportandtelegram-watch-replies), Claude Code plugin + marketplace (.claude-plugin/),server.json,scripts/token_budget.py(CI via tests). - Compact replies:
TELEGRAM_RESPONSE_DETAIL=summary(+TELEGRAM_MAX_TEXT_CHARS) drops empty fields and truncates long texts with explicit markers; defaultfullis unchanged. - New read tools (toolset
chat_insights):telegram_list_topics,telegram_get_admins,telegram_get_chat_stats(vendor patch over Telethonget_stats→stats.getBroadcastStats/stats.getMegagroupStats). - Opt-in toolset
advanced_read: generictelegram_read(tool, arguments)over 43 reviewed read-only Telethon tools (participants, pinned, reactions, read-by, message links/context, folders, drafts, contacts, profiles, admin log...). Never part ofall. Guidetelegram://guide/advanced-read. - Multi-account with labels: list-valued bindings (
{"actor": ["default", "work"]}, first = default) add an optional per-callaccountargument to every tool andtelegram_list_accounts; rate limits, poll cursors and outbox idempotency are per account, andtelegram_outbox_statusrecords carryaccount_label. String bindings keep the previous schema byte-for-byte. telegram_wait_for_new_message(toolsetevents): bounded long-poll (1–55 s) over 1–10 chats with a local baseline, paced reads andstatus=timeout; respects the chat ACL; no read receipts.telegram_wait_for_settled_message(toolsetevents): poll-based debounce — waits until watched chats go quiet forsettle_seconds(1–30, default 6) after new messages;status=settled,partialwith pending messages, ortimeout. Same ACL and read pacing astelegram_wait_for_new_message.- One-minute install:
uvx --from git+https://github.com/zai-one/telegram-mcp@v0.5.0 zai-telegram-mcp-setup; the wizard writes auvxclient entry pinned to the installed release tag when run from uvx (ZAI_TELEGRAM_UVX_FROMoverrides the source). The Claude Code plugin and README snippets pin the same tag. - Router eval (
tests/eval/router_cases.json, 26 colloquial EN/RU requests) checks router → skill/guide → first tool, and fails if any tool, skill or guide is unreachable from the router. Token budget now also caps the always-loaded context (instructions + tools/list + skill frontmatters, ≈3.9k tokens default). - Vendor fixes: GIF search uses the @gif inline bot (Telethon has no
messages.SearchGifsRequest);import_contactsusestypes.InputPhoneContact. - Security: under
TELEGRAM_ALLOWED_CHATSthe generictelegram_writefails closed — a call must name an allowed chat (or, without a chat, an alloweduser_id/channel), and account-wide or chat-creating writes (join by link, create group/channel, profile, privacy, folders, contacts import) are denied. Under any chat ACLtelegram_readneeds a named chat/user: account-wide reads (contacts, drafts, global search, folders) and chat-listing reads (get_common_chats,get_contact_chats) are denied. - Fix:
telegram_wait_for_settled_messageno longer acknowledges already-watched chats when a new chat joins the wait, so their unread messages are returned instead of dropped; its settle loop is paced liketelegram_wait_for_new_message(~24 reads/min).
Source: 5bc45ce · Changes: v0.4.0...v0.5.0