Use a Session Pool for Concurrent Clients
mainIf you need to run multiple MCP clients against the same Telegram account simultaneously (e.g., a desktop app and a terminal CLI), you must provide multiple authorized session strings. Telegram forbids using a single auth key from two different IPs/connections at once.
To solve this, provide a list of interchangeable session strings in the TELEGRAM_SESSION_STRINGS variable. The server uses an advisory file lock to ensure each process claims a unique session from the pool.
Configuration
TELEGRAM_SESSION_STRINGS=<session A> <session B> <session C>This pool takes precedence over the single TELEGRAM_SESSION_STRING variable for the default account.