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.
This commit is contained in:
anonim 2025-03-31 18:48:20 +03:00
parent 726fef23f3
commit c7c5cee0cf

View file

@ -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: