Telegram MCP Server
by KiaroSama
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. | 127.0.0.1 |
| MCP_PORT | No | Port to bind for HTTP/SSE transports. | 8765 |
| MCP_TRANSPORT | No | MCP transport: stdio, http, or sse. | stdio |
| TELEGRAM_API_ID | Yes | Your Telegram API ID from my.telegram.org/apps. | |
| MCP_ALLOWED_HOSTS | No | Comma-separated allowed Host headers for DNS-rebinding protection. Replaces the default localhost allow-list. | |
| TELEGRAM_API_HASH | Yes | Your Telegram API hash from my.telegram.org/apps. | |
| MCP_ALLOWED_ORIGINS | No | Optional comma-separated allowed origins for HTTP/SSE transports. | |
| TELEGRAM_EVENT_FEED | No | Set '1' to auto-enable the incoming event feed. | |
| TELEGRAM_PROXY_HOST | No | Proxy host. | |
| TELEGRAM_PROXY_PORT | No | Proxy port. | |
| TELEGRAM_PROXY_RDNS | No | Optional remote DNS setting for SOCKS proxies. | |
| TELEGRAM_PROXY_TYPE | No | Proxy type: socks5, socks4, http, or mtproxy. | |
| TELEGRAM_APP_VERSION | No | App version shown in Telegram Settings > Devices. | |
| TELEGRAM_LINK_DOMAIN | No | Domain used to build Telegram message permalinks. | t.me |
| TELEGRAM_ALIASES_FILE | No | Path to the JSON file used to store contact aliases. | |
| 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 | Name or path of a file-based Telegram session. | |
| MCP_TRUSTED_PROXY_AUTH | No | Set '1' when a reverse proxy in front authenticates requests. | |
| TELEGRAM_CONTACT_FUZZY | No | Set '0' to disable fuzzy contact-name suggestions. | 1 |
| TELEGRAM_EXPOSED_TOOLS | No | Tool exposure: 'all', 'read-only', or 'read-only+<tool>,<tool>' to selectively expose write tools. | all |
| TELEGRAM_PROXY_PASSWORD | No | Optional proxy password. | |
| TELEGRAM_PROXY_USERNAME | No | Optional proxy username. | |
| TELEGRAM_SESSION_STRING | No | A Telegram session string for the account. Use this in single-account mode. | |
| TELEGRAM_SYSTEM_VERSION | No | System version shown in Telegram Settings > Devices. | |
| TELEGRAM_EVENT_FEED_FILE | No | Path to the incoming event feed JSONL file. | |
| TELEGRAM_SESSION_STRINGS | No | A whitespace-, comma-, or semicolon-separated list of session strings for a session pool, allowing multiple concurrent clients for the same account. | |
| TELEGRAM_MCP_LAUNCHER_LOG | No | Set 'off' to disable the Windows launcher's log file. | |
| TELEGRAM_EVENT_PENDING_MAX | No | Maximum chats held in the pending-burst map. | 500 |
| TELEGRAM_LOCK_GRACE_SECONDS | No | How long a second concurrent process waits for the session lock before giving up. | 20 |
| TELEGRAM_SESSION_STRING_WORK | No | Example of a suffixed session string for a named account. Replace 'WORK' with your label; any TELEGRAM_SESSION_STRING_<LABEL> variant can be used for multi-account setups. | |
| TELEGRAM_EVENT_FEED_MAX_BYTES | No | Maximum feed file size before rotation. | 8388608 |
| MCP_ALLOW_UNAUTHENTICATED_REMOTE | No | Set '1' to allow a non-loopback MCP_HOST without a proxy authenticating requests. | |
| TELEGRAM_EVENT_PENDING_TTL_SECONDS | No | Age at which an uncollected event burst is forgotten. | 3600 |
| TELEGRAM_EVENT_FEED_MAX_AGE_SECONDS | No | Age at which the rotated feed generation is deleted. | 604800 |
| TELEGRAM_ALLOW_SERVER_ROOTS_FALLBACK | No | Set '1' to fall back to server CLI roots when MCP 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 | |