Telegram MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Host to bind for http/sse transports (default 127.0.0.1). | |
| MCP_PORT | No | Port to bind for http/sse transports (default 8765). | |
| GROQ_API_KEY | No | Groq API key, required when TELEGRAM_TRANSCRIBE_ENGINE=groq. | |
| MCP_TRANSPORT | No | Transport: stdio (default), http, or sse. | |
| TELEGRAM_API_ID | Yes | Telegram API ID from my.telegram.org/apps. | |
| MCP_ALLOWED_HOSTS | No | Comma-separated Host headers to accept for http/sse. | |
| TELEGRAM_API_HASH | Yes | Telegram API hash from my.telegram.org/apps. | |
| TELEGRAM_AUDIT_LOG | No | Path for the append-only deletion audit log (JSONL). | |
| TELEGRAM_FLOODGATE | No | Set to 0 to disable the local flood-prevention gate (default on). | |
| TELEGRAM_LANG_CODE | No | Language code shown in Telegram Settings > Devices (default en). | |
| MCP_ALLOWED_ORIGINS | No | Comma-separated browser origins allowed to call http/sse. | |
| TELEGRAM_EVENT_FEED | No | Set to 1 to auto-enable the incoming event feed. | |
| TELEGRAM_PROXY_HOST | No | Proxy host. | |
| TELEGRAM_PROXY_PORT | No | Proxy port. | |
| TELEGRAM_PROXY_RDNS | No | Enable remote DNS for SOCKS proxies (true/false). | |
| TELEGRAM_PROXY_TYPE | No | Proxy type: socks5, socks4, http, or mtproxy. | |
| TELEGRAM_TRANSCRIBE | No | Transcription mode: 'off', 'on-demand' (default), or 'auto'. | |
| TELEGRAM_APP_VERSION | No | App version shown in Telegram Settings > Devices (default 1.0). | |
| TELEGRAM_ALIASES_FILE | No | Path to the contact aliases JSON file. | |
| TELEGRAM_DEVICE_MODEL | No | Device model shown in Telegram Settings > Devices (default Telegram MCP). | |
| TELEGRAM_PROXY_SECRET | No | MTProxy secret. | |
| TELEGRAM_SESSION_LOCK | No | Set to 'shared' to allow multiple instances on the same host to share one session; default is exclusive. | |
| TELEGRAM_SESSION_NAME | No | Path 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_ROOTS | No | Semicolon-, comma-, or colon-separated allowed filesystem roots for file tools. | |
| TELEGRAM_CONTACT_FUZZY | No | Set to 0 to disable fuzzy contact alias suggestions. | |
| TELEGRAM_EXPOSED_TOOLS | No | Tool surface: 'all' (default), 'read-only', or 'read-only+<tool>,<tool>', optionally followed by '-<tool>,<tool>'. | |
| TELEGRAM_EVENT_LOG_SIZE | No | Maximum number of per-message events kept in memory (default 2000; 0 disables). | |
| TELEGRAM_MEDIA_BASE_URL | No | Base URL for media download/upload links when serving clients on another machine. | |
| TELEGRAM_PROXY_PASSWORD | No | Proxy password (SOCKS/HTTP). | |
| TELEGRAM_PROXY_USERNAME | No | Proxy username (SOCKS/HTTP). | |
| TELEGRAM_SESSION_STRING | No | Telegram session string. For multiple accounts, use suffixed variants such as TELEGRAM_SESSION_STRING_WORK. | |
| TELEGRAM_SYSTEM_VERSION | No | System version shown in Telegram Settings > Devices (default 1.0). | |
| TELEGRAM_DOWNLOAD_SUBDIR | No | Subdirectory under the first allowed root for downloads. | |
| TELEGRAM_EVENT_FEED_FILE | No | Path to the incoming event feed JSONL file. | |
| TELEGRAM_FILE_EXTENSIONS | No | Per-tool file extension allowlists, e.g. 'send_file:.pdf,.png;upload_file:.pdf,.png'. | |
| TELEGRAM_SESSION_STRINGS | No | Whitespace-, comma-, or semicolon-separated list of interchangeable session strings for a session pool. | |
| TELEGRAM_ALLOWED_CHAT_IDS | No | Comma-separated allowlist of chat IDs or usernames; supports <chat>:<topic id> for forum topics. | |
| TELEGRAM_BLOCKED_CHAT_IDS | No | Comma-separated blocklist of chat IDs or usernames. | |
| TELEGRAM_SYSTEM_LANG_CODE | No | System language code shown in Telegram Settings > Devices (default en). | |
| TELEGRAM_CATCH_UP_INTERVAL | No | Seconds between catch-up requests for missed updates (minimum 30; default 0 = off). | |
| TELEGRAM_EXPECTED_USERNAME | No | Expected Telegram username for the session; the server refuses to start if it differs. Per-account overrides use TELEGRAM_EXPECTED_USERNAME_<LABEL>. | |
| TELEGRAM_SERVER_ROOTS_ONLY | No | Set to 1 to use server allowed roots directly and skip roots/list. | |
| TELEGRAM_TRANSCRIBE_ENGINE | No | Default transcription engine: 'groq' (default), 'telegram', 'openai', or 'whisper'. | |
| TELEGRAM_LOCK_GRACE_SECONDS | No | Seconds to wait for another process to release the session lock (default 20). | |
| TELEGRAM_TRANSCRIBE_TIMEOUT | No | Timeout in seconds for HTTP transcription engines (default 120). | |
| TELEGRAM_TRANSCRIBE_LANGUAGE | No | ISO-639-1 language hint for transcription engines except telegram. | |
| TELEGRAM_TOOL_TIMEOUT_SECONDS | No | Server-side tool call ceiling in seconds (default 55; 0 = unbounded). | |
| TELEGRAM_TRANSCRIPT_CACHE_DIR | No | Directory for the transcript SQLite cache (default data/transcripts). | |
| TELEGRAM_FLOOD_SLEEP_THRESHOLD | No | Max seconds Telethon sleeps silently on FloodWait (default 60; 0 disables). | |
| TELEGRAM_ROOTS_TIMEOUT_SECONDS | No | Timeout in seconds for roots/list (default 10). | |
| TELEGRAM_TRANSCRIBE_MAX_VOICES | No | Maximum number of voice messages to prefetch in auto mode (default 5). | |
| TELEGRAM_TRANSCRIBE_OPENAI_URL | No | OpenAI-compatible API base URL for the openai transcription engine (e.g. https://api.openai.com/v1). | |
| TELEGRAM_TRANSCRIBE_GROQ_MAX_MB | No | Size cap in MB for groq transcription uploads (default 25). | |
| TELEGRAM_TRANSCRIBE_MAX_SECONDS | No | Maximum total seconds to prefetch in auto mode (default 300). | |
| TELEGRAM_TRANSCRIBE_OPENAI_MODEL | No | Model for the openai transcription engine (default whisper-1). | |
| TELEGRAM_RESOLVE_PHONE_STATE_FILE | No | Path to persist phone lookup state across restarts. | |
| TELEGRAM_TRANSCRIBE_OPENAI_MAX_MB | No | Size cap in MB for openai transcription uploads (default 25). | |
| TELEGRAM_TRANSCRIBE_WHISPER_MODEL | No | faster-whisper model name (default small). | |
| TELEGRAM_RESOLVE_PHONE_MAX_PER_DAY | No | Maximum phone lookups per rolling 24 hours (0 or unset = no cap). | |
| TELEGRAM_TRANSCRIBE_OPENAI_API_KEY | No | Bearer token for the openai transcription engine (optional for keyless local servers). | |
| TELEGRAM_TRANSCRIBE_WHISPER_DEVICE | No | faster-whisper device: auto, cpu, or cuda. | |
| TELEGRAM_ALLOW_SERVER_ROOTS_FALLBACK | No | Set to 1 to fall back to server CLI roots when client MCP Roots are empty or fail. | |
| TELEGRAM_TRANSCRIBE_WHISPER_MODEL_DIR | No | Directory where faster-whisper models are downloaded. | |
| TELEGRAM_TRANSCRIBE_WHISPER_COMPUTE_TYPE | No | faster-whisper compute type, e.g. int8 on CPU. | |
| TELEGRAM_RESOLVE_PHONE_MIN_INTERVAL_SECONDS | No | Minimum 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
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues