Skip to main content
Glama
Telegram MCP Server

Telegram MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoHost to bind for http/sse transports (default 127.0.0.1).
MCP_PORTNoPort to bind for http/sse transports (default 8765).
GROQ_API_KEYNoGroq API key, required when TELEGRAM_TRANSCRIBE_ENGINE=groq.
MCP_TRANSPORTNoTransport: stdio (default), http, or sse.
TELEGRAM_API_IDYesTelegram API ID from my.telegram.org/apps.
MCP_ALLOWED_HOSTSNoComma-separated Host headers to accept for http/sse.
TELEGRAM_API_HASHYesTelegram API hash from my.telegram.org/apps.
TELEGRAM_AUDIT_LOGNoPath for the append-only deletion audit log (JSONL).
TELEGRAM_FLOODGATENoSet to 0 to disable the local flood-prevention gate (default on).
TELEGRAM_LANG_CODENoLanguage code shown in Telegram Settings > Devices (default en).
MCP_ALLOWED_ORIGINSNoComma-separated browser origins allowed to call http/sse.
TELEGRAM_EVENT_FEEDNoSet to 1 to auto-enable the incoming event feed.
TELEGRAM_PROXY_HOSTNoProxy host.
TELEGRAM_PROXY_PORTNoProxy port.
TELEGRAM_PROXY_RDNSNoEnable remote DNS for SOCKS proxies (true/false).
TELEGRAM_PROXY_TYPENoProxy type: socks5, socks4, http, or mtproxy.
TELEGRAM_TRANSCRIBENoTranscription mode: 'off', 'on-demand' (default), or 'auto'.
TELEGRAM_APP_VERSIONNoApp version shown in Telegram Settings > Devices (default 1.0).
TELEGRAM_ALIASES_FILENoPath to the contact aliases JSON file.
TELEGRAM_DEVICE_MODELNoDevice model shown in Telegram Settings > Devices (default Telegram MCP).
TELEGRAM_PROXY_SECRETNoMTProxy secret.
TELEGRAM_SESSION_LOCKNoSet to 'shared' to allow multiple instances on the same host to share one session; default is exclusive.
TELEGRAM_SESSION_NAMENoPath to a file-based Telegram session (e.g. /absolute/path/to/telegram_mcp_session). For multiple accounts, use suffixed variants such as TELEGRAM_SESSION_NAME_WORK.
TELEGRAM_ALLOWED_ROOTSNoSemicolon-, comma-, or colon-separated allowed filesystem roots for file tools.
TELEGRAM_CONTACT_FUZZYNoSet to 0 to disable fuzzy contact alias suggestions.
TELEGRAM_EXPOSED_TOOLSNoTool surface: 'all' (default), 'read-only', or 'read-only+<tool>,<tool>', optionally followed by '-<tool>,<tool>'.
TELEGRAM_EVENT_LOG_SIZENoMaximum number of per-message events kept in memory (default 2000; 0 disables).
TELEGRAM_MEDIA_BASE_URLNoBase URL for media download/upload links when serving clients on another machine.
TELEGRAM_PROXY_PASSWORDNoProxy password (SOCKS/HTTP).
TELEGRAM_PROXY_USERNAMENoProxy username (SOCKS/HTTP).
TELEGRAM_SESSION_STRINGNoTelegram session string. For multiple accounts, use suffixed variants such as TELEGRAM_SESSION_STRING_WORK.
TELEGRAM_SYSTEM_VERSIONNoSystem version shown in Telegram Settings > Devices (default 1.0).
TELEGRAM_DOWNLOAD_SUBDIRNoSubdirectory under the first allowed root for downloads.
TELEGRAM_EVENT_FEED_FILENoPath to the incoming event feed JSONL file.
TELEGRAM_FILE_EXTENSIONSNoPer-tool file extension allowlists, e.g. 'send_file:.pdf,.png;upload_file:.pdf,.png'.
TELEGRAM_SESSION_STRINGSNoWhitespace-, comma-, or semicolon-separated list of interchangeable session strings for a session pool.
TELEGRAM_ALLOWED_CHAT_IDSNoComma-separated allowlist of chat IDs or usernames; supports <chat>:<topic id> for forum topics.
TELEGRAM_BLOCKED_CHAT_IDSNoComma-separated blocklist of chat IDs or usernames.
TELEGRAM_SYSTEM_LANG_CODENoSystem language code shown in Telegram Settings > Devices (default en).
TELEGRAM_CATCH_UP_INTERVALNoSeconds between catch-up requests for missed updates (minimum 30; default 0 = off).
TELEGRAM_EXPECTED_USERNAMENoExpected Telegram username for the session; the server refuses to start if it differs. Per-account overrides use TELEGRAM_EXPECTED_USERNAME_<LABEL>.
TELEGRAM_SERVER_ROOTS_ONLYNoSet to 1 to use server allowed roots directly and skip roots/list.
TELEGRAM_TRANSCRIBE_ENGINENoDefault transcription engine: 'groq' (default), 'telegram', 'openai', or 'whisper'.
TELEGRAM_LOCK_GRACE_SECONDSNoSeconds to wait for another process to release the session lock (default 20).
TELEGRAM_TRANSCRIBE_TIMEOUTNoTimeout in seconds for HTTP transcription engines (default 120).
TELEGRAM_TRANSCRIBE_LANGUAGENoISO-639-1 language hint for transcription engines except telegram.
TELEGRAM_TOOL_TIMEOUT_SECONDSNoServer-side tool call ceiling in seconds (default 55; 0 = unbounded).
TELEGRAM_TRANSCRIPT_CACHE_DIRNoDirectory for the transcript SQLite cache (default data/transcripts).
TELEGRAM_FLOOD_SLEEP_THRESHOLDNoMax seconds Telethon sleeps silently on FloodWait (default 60; 0 disables).
TELEGRAM_ROOTS_TIMEOUT_SECONDSNoTimeout in seconds for roots/list (default 10).
TELEGRAM_TRANSCRIBE_MAX_VOICESNoMaximum number of voice messages to prefetch in auto mode (default 5).
TELEGRAM_TRANSCRIBE_OPENAI_URLNoOpenAI-compatible API base URL for the openai transcription engine (e.g. https://api.openai.com/v1).
TELEGRAM_TRANSCRIBE_GROQ_MAX_MBNoSize cap in MB for groq transcription uploads (default 25).
TELEGRAM_TRANSCRIBE_MAX_SECONDSNoMaximum total seconds to prefetch in auto mode (default 300).
TELEGRAM_TRANSCRIBE_OPENAI_MODELNoModel for the openai transcription engine (default whisper-1).
TELEGRAM_RESOLVE_PHONE_STATE_FILENoPath to persist phone lookup state across restarts.
TELEGRAM_TRANSCRIBE_OPENAI_MAX_MBNoSize cap in MB for openai transcription uploads (default 25).
TELEGRAM_TRANSCRIBE_WHISPER_MODELNofaster-whisper model name (default small).
TELEGRAM_RESOLVE_PHONE_MAX_PER_DAYNoMaximum phone lookups per rolling 24 hours (0 or unset = no cap).
TELEGRAM_TRANSCRIBE_OPENAI_API_KEYNoBearer token for the openai transcription engine (optional for keyless local servers).
TELEGRAM_TRANSCRIBE_WHISPER_DEVICENofaster-whisper device: auto, cpu, or cuda.
TELEGRAM_ALLOW_SERVER_ROOTS_FALLBACKNoSet to 1 to fall back to server CLI roots when client MCP Roots are empty or fail.
TELEGRAM_TRANSCRIBE_WHISPER_MODEL_DIRNoDirectory where faster-whisper models are downloaded.
TELEGRAM_TRANSCRIBE_WHISPER_COMPUTE_TYPENofaster-whisper compute type, e.g. int8 on CPU.
TELEGRAM_RESOLVE_PHONE_MIN_INTERVAL_SECONDSNoMinimum seconds between phone lookups (0 or unset = none).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources