Telegram MCP Server
by DeBia12
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Bind host for http/sse transports (default 127.0.0.1). | |
| MCP_PORT | No | Bind port for http/sse transports (default 8765). | |
| GROQ_API_KEY | No | Groq API key, required whenever engine=groq is used. | |
| MCP_TRANSPORT | No | MCP transport: stdio (default), http (streamable HTTP), or sse (legacy). | |
| TELEGRAM_API_ID | Yes | Telegram API ID from my.telegram.org/apps. Required. | |
| MCP_ALLOWED_HOSTS | No | Comma-separated Host headers accepted for http/sse. Supports a :* suffix for any port. | |
| TELEGRAM_API_HASH | Yes | Telegram API hash from my.telegram.org/apps. Required. | |
| TELEGRAM_AUDIT_LOG | No | Custom path for the deletion audit log (defaults to telegram_audit.log next to the server). | |
| TELEGRAM_FLOODGATE | No | Set to 0 to disable the local flood-prevention gate (default on). | |
| TELEGRAM_LANG_CODE | No | Language code reported to Telegram. | |
| MCP_ALLOWED_ORIGINS | No | Comma-separated browser origins allowed to call the http/sse server. | |
| TELEGRAM_EVENT_FEED | No | Set to 1 to auto-enable the incoming event feed (callback mode). | |
| TELEGRAM_PROXY_HOST | No | Proxy host. | |
| TELEGRAM_PROXY_PORT | No | Proxy port. | |
| 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 Settings > Devices. | |
| TELEGRAM_ALIASES_FILE | No | Override the path of the remembered-contact aliases file. | |
| TELEGRAM_DEVICE_MODEL | No | Device model shown in Telegram Settings > Devices. | |
| TELEGRAM_PROXY_SECRET | No | MTProxy secret (required when TELEGRAM_PROXY_TYPE=mtproxy). | |
| TELEGRAM_SESSION_NAME | No | File-based session name/path (Telethon SQLite session). | |
| TELEGRAM_ALLOWED_ROOTS | No | Semicolon-, comma- (or POSIX colon-) separated paths used as allowed roots for file-path/media tools. | |
| TELEGRAM_EXPOSED_TOOLS | No | Tool surface: all (default), read-only, or read-only+<tool>,<tool>, optionally followed by -<tool>,<tool> to hide tools. | |
| TELEGRAM_MCP_HTTP_TOKEN | No | Bearer token required for HTTP transport authentication and MCP Events webhooks. | |
| TELEGRAM_MEDIA_BASE_URL | No | Public base URL for serving downloaded files and upload PUT targets when clients are on another machine. | |
| TELEGRAM_PROXY_PASSWORD | No | Optional proxy password. | |
| TELEGRAM_PROXY_USERNAME | No | Optional proxy username. | |
| TELEGRAM_SESSION_STRING | No | Telegram session string generated by session_string_generator.py. | |
| TELEGRAM_SYSTEM_VERSION | No | System version shown in Telegram Settings > Devices. | |
| TELEGRAM_DOWNLOAD_SUBDIR | No | Subdirectory under the first allowed root where downloads are saved. | |
| TELEGRAM_EVENT_FEED_FILE | No | Path for the incoming event feed JSONL file. | |
| TELEGRAM_SESSION_STRINGS | No | Session pool: several interchangeable session strings separated by whitespace, comma or semicolon, used so multiple concurrent clients can each claim a distinct session. | |
| TELEGRAM_ALLOWED_CHAT_IDS | No | Comma-separated allowlist of chat IDs (marked form) or usernames to restrict chat access. Unset means unrestricted. | |
| TELEGRAM_BLOCKED_CHAT_IDS | No | Comma-separated list of chat IDs and/or usernames to exclude across all accounts. | |
| TELEGRAM_SYSTEM_LANG_CODE | No | System language code reported to Telegram. | |
| TELEGRAM_EXPECTED_USERNAME | No | Expected account username (case-insensitive, leading @ ignored). If set, the server refuses to start when the session belongs to a different account. | |
| TELEGRAM_SERVER_ROOTS_ONLY | No | When set to 1, uses server allowed roots directly and skips roots/list (client Roots are ignored). | |
| TELEGRAM_TRANSCRIBE_ENGINE | No | Default transcription engine: groq (default), telegram, openai, or whisper. | |
| TELEGRAM_SESSION_STRING_WORK | No | Session string for the labeled 'work' account. | |
| TELEGRAM_TRANSCRIBE_LANGUAGE | No | ISO-639-1 language hint passed to groq/openai/whisper engines. | |
| TELEGRAM_TOOL_TIMEOUT_SECONDS | No | Server-side ceiling for tool calls in seconds (default 55). Set 0 for unbounded. | |
| TELEGRAM_TRANSCRIPT_CACHE_DIR | No | Directory for the SQLite transcript cache (default data/transcripts). | |
| TELEGRAM_FLOOD_SLEEP_THRESHOLD | No | Max seconds Telethon sleeps silently on FloodWait (default 60). | |
| TELEGRAM_TRANSCRIBE_OPENAI_URL | No | OpenAI-compatible /audio/transcriptions base URL for engine=openai. | |
| TELEGRAM_SESSION_STRING_PERSONAL | No | Session string for the labeled 'personal' account. | |
| TELEGRAM_TRANSCRIBE_OPENAI_MODEL | No | Model name for engine=openai (default whisper-1). | |
| TELEGRAM_TRANSCRIBE_WHISPER_MODEL | No | Local faster-whisper model for engine=whisper (default small). | |
| TELEGRAM_TRANSCRIBE_OPENAI_API_KEY | No | Bearer token for the OpenAI-compatible transcription endpoint (optional for keyless local servers). | |
| TELEGRAM_ALLOW_SERVER_ROOTS_FALLBACK | No | When set to 1, falls back to server CLI roots when client Roots are empty or list_roots fails. |
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
ActivityActive
ResponsivenessNo recent community issues