From c7c5cee0cf0ea85bbe7b897e2be8490e816f43fe Mon Sep 17 00:00:00 2001 From: anonim <70073044+l1v0n1@users.noreply.github.com> Date: Mon, 31 Mar 2025 18:48:20 +0300 Subject: [PATCH] docs: update README to reflect changes in session string generation and installation steps - Renamed section "Set Up Your Environment" to "Generate Session String" and moved it up in the order. - Added detailed instructions for generating a session string using Telethon's StringSession. - Updated the environment setup instructions to include the new session string variable. --- README.md | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 4856a61..12e913b 100644 --- a/README.md +++ b/README.md @@ -45,27 +45,7 @@ git clone https://github.com/l1v0n1/telegram-mcp-server cd telegram-mcp-server ``` -### 2. Set Up Your Environment - -Create a `.env` file with your Telegram credentials: - -``` -TELEGRAM_API_ID=your_api_id_here -TELEGRAM_API_HASH=your_api_hash_here -TELEGRAM_SESSION_NAME=anon -``` - -You can obtain API credentials at [my.telegram.org/apps](https://my.telegram.org/apps). - -### 3. Install Dependencies - -```bash -uv venv -source .venv/bin/activate # On Windows: .venv\Scripts\activate -uv add "mcp[cli]" telethon python-dotenv nest_asyncio -``` - -### 4. Generate Session String +### 2. Generate Session String For better security and portability, this project uses Telethon's StringSession. Generate your session string: @@ -80,6 +60,27 @@ This will: The session string allows authentication without storing SQLite session files, which helps avoid database lock issues and improves portability. +### 3. Set Up Your Environment + +Create a `.env` file with your Telegram credentials: + +``` +TELEGRAM_API_ID=your_api_id_here +TELEGRAM_API_HASH=your_api_hash_here +TELEGRAM_SESSION_NAME=anon +TELEGRAM_SESSION_STRING=your_session_string_here +``` + +You can obtain API credentials at [my.telegram.org/apps](https://my.telegram.org/apps). + +### 4. Install Dependencies + +```bash +uv venv +source .venv/bin/activate # On Windows: .venv\Scripts\activate +uv add "mcp[cli]" telethon python-dotenv nest_asyncio +``` + ### 5. Configure Claude Desktop #### On macOS/Linux: