MCP channel server crashes when receiving inbound Telegram notification
Description
The Telegram channel plugin's MCP server crashes immediately upon receiving an inbound message. The server process exits when it writes a notifications/claude/channel JSON-RPC notification to stdout, suggesting Claude Code closes the server's stdin (or sends a signal) in response.
Environment
- Claude Code: 2.1.80
- macOS Darwin 24.6.0 (Apple Silicon)
- Bun: 1.3.11
- Plugin:
telegram@claude-plugins-officialv0.0.1
Steps to Reproduce
- Install telegram plugin:
/plugin install telegram@claude-plugins-official - Configure token:
/telegram:configure <token> - Pair and approve a user via
/telegram:access pair <code> - Set policy to allowlist:
/telegram:access policy allowlist /reload-plugins- DM the bot from Telegram
Expected Behavior
The inbound message should appear as a <channel source="telegram" ...> notification in the Claude Code session, and the MCP server should remain running.
Actual Behavior
The MCP server process exits immediately after writing the notifications/claude/channel JSON-RPC message to stdout. The server does not crash — Claude Code appears to terminate it.
Evidence
- Outbound works:
mcp__plugin_telegram_telegram__replysuccessfully sends messages to Telegram. - Server is stable standalone: Running
bun server.tsdirectly (not via MCP) keeps the server alive and correctly outputs the notification JSON to stdout:
``json``
{"method":"notifications/claude/channel","params":{"content":"we","meta":{"chat_id":"8036446914","message_id":"24","user":"8036446914","user_id":"8036446914","ts":"2026-03-20T14:00:16.000Z"}},"jsonrpc":"2.0"}
- Server crashes under MCP: When spawned by Claude Code as an MCP server, the
bun server.tsprocess disappears within seconds of receiving a Telegram DM.getUpdatesreturns empty (message was consumed) but no notification reaches the session. - Confirmed no webhook conflict, no multiple polling sessions, token is valid (
getMesucceeds).
Additional Context
- Multiple Claude Code sessions each spawn their own instance of the Telegram MCP server, causing Telegram polling conflicts (409). This is a secondary issue — the primary bug occurs even with a single session.
- The
experimental: { 'claude/channel': {} }capability is declared in the server's MCP capabilities.
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗