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 and sse transports. Default 127.0.0.1. | |
| MCP_PORT | No | Port to bind for http and sse transports. Default 8765. | |
| GROQ_API_KEY | No | Groq API key required when using the groq transcription engine. | |
| MCP_TRANSPORT | No | MCP transport: stdio (default), http, or sse. | |
| TELEGRAM_API_ID | Yes | Telegram API ID from my.telegram.org/apps. | |
| MCP_ALLOWED_HOSTS | No | Comma-separated allowed Host headers for DNS-rebinding protection. | |
| TELEGRAM_API_HASH | Yes | Telegram API hash from my.telegram.org/apps. | |
| MCP_ALLOWED_ORIGINS | No | Comma-separated allowed Origin headers. | |
| 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 | Whether to use remote DNS for SOCKS proxies, e.g. true or false. | |
| TELEGRAM_PROXY_TYPE | No | Proxy type: socks5, socks4, http, or mtproxy. | |
| TELEGRAM_TRANSCRIBE | No | Voice transcription mode: off, on-demand (default), or auto. | |
| TELEGRAM_APP_VERSION | No | App version shown in Telegram active sessions. Default 1.0. | |
| TELEGRAM_ALIASES_FILE | No | Override path for the contact aliases JSON file. | |
| TELEGRAM_DEVICE_MODEL | No | Device model shown in Telegram active sessions. Default Telegram MCP. | |
| TELEGRAM_PROXY_SECRET | No | MTProxy secret. | |
| TELEGRAM_SESSION_LOCK | No | Session lock mode: exclusive by default, or shared to allow multiple instances on one host to share a session. | |
| TELEGRAM_SESSION_NAME | No | Path to a persistent Telegram SQLite session file. | |
| TELEGRAM_ALLOWED_ROOTS | No | Semicolon- or comma-separated allowed root paths for file-path and media tools. | |
| TELEGRAM_CONTACT_FUZZY | No | Set to 0 to disable fuzzy contact alias suggestions. | |
| TELEGRAM_EXPOSED_TOOLS | No | Controls which MCP tools are exposed: all, read-only, or read-only+<tool>,<tool>, optionally followed by -<tool>,<tool>. | |
| TELEGRAM_EVENT_LOG_SIZE | No | Size of the in-memory per-message event log. Default 2000; 0 disables it. | |
| TELEGRAM_PROXY_PASSWORD | No | Optional proxy password. | |
| TELEGRAM_PROXY_USERNAME | No | Optional proxy username. | |
| TELEGRAM_SESSION_STRING | No | Telegram session string for the default account. | |
| TELEGRAM_SYSTEM_VERSION | No | System version shown in Telegram active sessions. Default 1.0. | |
| TELEGRAM_DOWNLOAD_SUBDIR | No | Subdirectory under the first allowed root for downloads. Default downloads. | |
| TELEGRAM_EVENT_FEED_FILE | No | Override path for the incoming event feed JSONL file. | |
| TELEGRAM_FILE_EXTENSIONS | No | Semicolon-separated tool extension allowlists in tool:.ext,.ext form. | |
| 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, supergroup IDs, or usernames. When set, only those chats are accessible. | |
| TELEGRAM_EXPECTED_USERNAME | No | Expected Telegram username for the default account; startup fails if the session belongs to a different account. | |
| TELEGRAM_SERVER_ROOTS_ONLY | No | Set to 1 to use server 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 a second instance waits for the session lock before exiting. Default 20. | |
| TELEGRAM_TRANSCRIBE_TIMEOUT | No | Timeout in seconds for a single HTTP transcription request. Default 120. | |
| TELEGRAM_TRANSCRIBE_LANGUAGE | No | ISO-639-1 language hint passed to HTTP transcription engines. | |
| TELEGRAM_TOOL_TIMEOUT_SECONDS | No | Server-side ceiling for every tool call. Default 55; set 0 only for an unbounded operator session. | |
| TELEGRAM_TRANSCRIPT_CACHE_DIR | No | Directory for the transcription SQLite cache. Default data/transcripts. | |
| TELEGRAM_FLOOD_SLEEP_THRESHOLD | No | Maximum seconds Telethon may silently sleep on FloodWait. Default 60; set 0 to disable silent sleeping. | |
| TELEGRAM_ROOTS_TIMEOUT_SECONDS | No | Timeout in seconds for roots/list. Default 10. | |
| TELEGRAM_TRANSCRIBE_MAX_VOICES | No | Maximum number of voice messages auto-prefetched per listing call. Default 5. | |
| TELEGRAM_TRANSCRIBE_OPENAI_URL | No | OpenAI-compatible transcription API base URL for the openai engine. | |
| TELEGRAM_TRANSCRIBE_GROQ_MAX_MB | No | Maximum recording size for the groq engine in MB. Default 25. | |
| TELEGRAM_TRANSCRIBE_MAX_SECONDS | No | Maximum total voice duration auto-prefetched per listing call. Default 300. | |
| TELEGRAM_TRANSCRIBE_OPENAI_MODEL | No | Model for the openai transcription engine. Default whisper-1. | |
| TELEGRAM_TRANSCRIBE_OPENAI_MAX_MB | No | Maximum recording size for the openai engine in MB. Default 25. | |
| TELEGRAM_TRANSCRIBE_WHISPER_MODEL | No | Local faster-whisper model name. Default small. | |
| TELEGRAM_TRANSCRIBE_OPENAI_API_KEY | No | Bearer token for the OpenAI-compatible transcription endpoint. | |
| TELEGRAM_TRANSCRIBE_WHISPER_DEVICE | No | Whisper device: auto, cpu, or cuda. | |
| TELEGRAM_ALLOW_SERVER_ROOTS_FALLBACK | No | Set to 1 to fall back to server CLI roots when MCP client Roots are empty or listing fails. | |
| TELEGRAM_TRANSCRIBE_WHISPER_MODEL_DIR | No | Directory where local whisper models are downloaded. | |
| TELEGRAM_TRANSCRIBE_WHISPER_COMPUTE_TYPE | No | Whisper compute type, e.g. int8 on CPU. |
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 issues