Telegram channel plugin: MCP server should only start in --channels mode

Resolved 💬 3 comments Opened Mar 23, 2026 by 7vf7gcpwsy-create Closed Mar 26, 2026

Problem

The Telegram channel plugin (telegram@claude-plugins-official) registers its bot polling loop inside the MCP server entry point (.mcp.jsonbun run start). Since the plugin is globally enabled via settings.json, every new Claude Code session spawns the MCP server, which starts Telegram getUpdates polling.

This means opening a regular session (CLI or desktop app) — without --channels — steals the polling slot from the session that is actually serving as the Telegram channel. Telegram's API only allows one active getUpdates consumer per bot token, so the original session stops receiving messages with no warning.

Steps to reproduce

  1. Install the Telegram plugin and configure a bot token
  2. Start a session with claude --channels plugin:telegram@claude-plugins-official — works fine
  3. Open another session (e.g., Claude desktop app, or claude in a different directory) — this session also spawns the Telegram MCP server and starts polling
  4. Send a message via Telegram → the first session no longer receives it

Current workaround

Disable the plugin globally ("telegram@claude-plugins-official": false in ~/.claude/settings.json) and enable it only at the project level via .claude/settings.json. This prevents other sessions from loading the plugin.

Proposed solution

Channel-type MCP servers should only be spawned when the session is started with the --channels flag. Two possible approaches:

  1. Plugin manifest flag — add a "channel": true field in plugin.json or .mcp.json so Claude Code knows this MCP server is a channel server and should only be started in --channels mode. Skills (like /telegram:access) would still load in all sessions.
  1. Environment variable gate — Claude Code passes an env var (e.g., CLAUDE_CHANNEL_MODE=true) when spawning channel servers. The server can check this and skip bot polling if absent, while still registering tools.

Either approach would let the plugin's skills remain available everywhere while restricting the bot polling to the intended session.

Environment

  • Claude Code 2.1.81
  • Plugin: telegram@claude-plugins-official v0.0.1
  • macOS

View original on GitHub ↗

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