-
Notifications
You must be signed in to change notification settings - Fork 309
Expand file tree
/
Copy path.env.example
More file actions
56 lines (50 loc) · 2.48 KB
/
Copy path.env.example
File metadata and controls
56 lines (50 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Telegram API Credentials (Required - get from https://my.telegram.org/apps)
TELEGRAM_API_ID=123456
TELEGRAM_API_HASH=0123456789abcdef0123456789abcdef
# --- Single account (backward-compatible) ---
# Option 1: File-based session (a .session file will be created)
TELEGRAM_SESSION_NAME=telegram_session
# Option 2: String-based session
# TELEGRAM_SESSION_STRING=1231231232erfdfdffd
# --- Multiple accounts ---
# Add _<LABEL> suffix to session variables. Labels become account identifiers.
# Shared API_ID and API_HASH are used for all accounts.
# TELEGRAM_SESSION_STRING_WORK=<session string for work account>
# TELEGRAM_SESSION_STRING_PERSONAL=<session string for personal account>
# --- Device identity (optional) ---
# Controls how this client appears in Telegram > Settings > Devices. If unset,
# Telethon falls back to the host platform (e.g. "arm64"). Set these so the
# session keeps a stable, recognisable name across reconnects. Applied both
# when generating a session string and when the server connects.
# TELEGRAM_DEVICE_MODEL=Telegram MCP
# TELEGRAM_SYSTEM_VERSION=1.0
# TELEGRAM_APP_VERSION=1.0
# --- MCP tool exposure (optional) ---
# Default is all. Set to read-only to expose only tools annotated with
# readOnlyHint=True through MCP. This does not reduce Telegram session authority
# inside the server process.
# TELEGRAM_EXPOSED_TOOLS=read-only
# --- File-path tools / allowed roots (optional) ---
# When the MCP client implements Roots but advertises an empty list, file-path
# tools (download_media, send_file, ...) are disabled (deny-all) even if server
# CLI roots are configured. Set this to 1/true to fall back to the server CLI
# roots in that case. Default is deny-all.
# TELEGRAM_ALLOW_SERVER_ROOTS_FALLBACK=1
# --- Proxy (optional) ---
# Route Telegram traffic through a proxy. Set TELEGRAM_PROXY_TYPE to enable.
# Supported types: socks5, socks4, http, mtproxy.
# SOCKS/HTTP proxies require the 'python-socks' package (install via
# `uv sync --extra proxy` or `pip install python-socks`).
# Per-account overrides use the same _<LABEL> suffix as session variables.
# TELEGRAM_PROXY_TYPE=socks5
# TELEGRAM_PROXY_HOST=127.0.0.1
# TELEGRAM_PROXY_PORT=1080
# TELEGRAM_PROXY_USERNAME=<optional>
# TELEGRAM_PROXY_PASSWORD=<optional>
# TELEGRAM_PROXY_RDNS=true
# For MTProxy, set TELEGRAM_PROXY_TYPE=mtproxy and provide the secret:
# TELEGRAM_PROXY_SECRET=<hex secret>
# Per-account override example:
# TELEGRAM_PROXY_TYPE_WORK=http
# TELEGRAM_PROXY_HOST_WORK=proxy.work.example
# TELEGRAM_PROXY_PORT_WORK=3128