Telegram plugin: inbound messages not delivered (grammy polling inactive under MCP stdio)

Resolved 💬 4 comments Opened Mar 20, 2026 by Fanjun2121 Closed Apr 17, 2026

Bug Description

The Telegram plugin (v0.0.1) can send messages to Telegram (reply tool works), but never receives inbound messages from Telegram users. Messages sent to the bot are silently lost.

Environment

  • Claude Code: v2.1.80
  • Platform: macOS (Darwin 24.6.0, arm64)
  • Runtime: Bun v1.3.11
  • MCP SDK: v1.27.1
  • Plugin: telegram@claude-plugins-official v0.0.1

Steps to Reproduce

  1. Install the Telegram plugin, configure bot token and pair a user
  2. Send a message from Telegram to the bot
  3. The message never appears in the Claude Code conversation

Diagnosis

Extensive debugging revealed:

  1. Bot token is validgetMe and getWebhookInfo return correct results
  2. No webhook conflict — webhook URL is empty
  3. Access config is correct — user ID is in allowFrom allowlist
  4. Outbound works — calling the reply tool successfully sends messages to Telegram
  5. Bot process is alive — the MCP server process (bun) is running
  6. But grammy is NOT actively polling — calling getUpdates from an external script returns ok: true with no conflict error, which should not happen if grammy's long polling is active
  7. Telegram API works fine — calling getUpdates directly from a separate script successfully receives messages from the user

Root Cause

When server.ts is spawned by Claude Code as an MCP server (stdin/stdout used for JSON-RPC), void bot.start() (grammy's long polling) appears to become inactive while the process stays alive (kept running by the MCP stdio transport). The polling either never starts properly or silently stops shortly after startup.

The void prefix on bot.start() (line 594 of server.ts) means any rejection is silently swallowed, making this failure invisible.

Evidence

  • getUpdates from external script: returns successfully (no "Conflict" error) → proves grammy is not polling
  • Direct getUpdates with 30s timeout: successfully receives user messages → proves Telegram API works
  • pending_update_count in getWebhookInfo: 0 (expected, no webhook set)
  • Debug logs: zero entries related to telegram/channel/MCP notifications

Expected Behavior

Messages sent to the Telegram bot should be delivered to the Claude Code conversation via notifications/claude/channel.

Workaround

None currently available.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗