Resources
What I actually use
Tools and guides I've tested myself. People ask me about these all the time — so here they are, in one place.
01
Connect your Telegram to Claude
I've connected my Telegram to Claude Code. Now I ask it to find a message in an old chat, summarise a conversation, draft a reply or transcribe voice messages — and it does that right in my account. Here's how to build the same thing in an evening, even if you don't code.
What you need
- Claude Code — in the terminal or in the Claude desktop app
- Python 3 (usually already installed on a Mac)
- An
api_idandapi_hash— free at my.telegram.org → API development tools
This isn't a bot — it logs in to your own account, like another device. That's why Claude can see all your chats, and why the safety rules below matter.
Step 1. Ask Claude to build it
Create an empty folder, open it in Claude Code and paste this prompt:
Build a Python project called tg_access: a Telethon client that logs in to MY Telegram account (a user client, not a bot). You will use it yourself when I ask.
- venv and requirements.txt
- .env with TG_API_ID and TG_API_HASH, plus a .env.example without values
- login.py — one-time login: Telegram code and 2FA password. Don't run it yourself, I'll do it in Terminal
- tg.py — commands: me, dialogs [N], history [chat] [N], draft [chat] [text] (saves a draft, does NOT send), drafts, send [chat] [text]
- a chat can be given as @username, a numeric id, or me (Saved Messages)
- add the .session file and .env to .gitignore
- a README with setup steps
Don't send or delete anything yet.
Step 2. Add your keys and log in
Put your api_id and api_hash into .env. Then open a regular Terminal in the project folder and log in — Telegram will send a code to your app:
.venv/bin/python login.py
Check that it works: .venv/bin/python tg.py me should print your name.
Step 3. Give Claude the rules
Add this block to ~/.claude/CLAUDE.md — Claude reads it in every session. Replace the folder path with yours:
## Telegram
You have access to my Telegram via ~/tg_access (Telethon, my personal account).
Run commands from that folder: .venv/bin/python tg.py ...
- Never delete anything: messages, chats, contacts.
- "Write to X" means save a draft (tg.py draft), not send.
Send (tg.py send) only when I explicitly say "send it".
- Reactions, joining chats, marking as read — only when I ask.
- The .session file is full access to my account. Never print or copy it.
Done. Now you can just ask Claude: “find what Anna said about Friday's meeting”, “summarise the last 50 messages in the work chat”, “draft a reply to Mark”.
Bonus: voice messages to text
On a Mac with Apple silicon (M1 or later) you can transcribe voice messages right on your computer, without sending anything to the cloud. Ask Claude: “add a hear [chat] [N] command that downloads the last N voice messages and transcribes them locally with mlx-whisper”.
Safety — please read
- The
.sessionfile is the key to your account. Anyone who has it gets full access. Never upload it to git, the cloud or a chat. - Drafts instead of sending, by default. You reread the text and send it yourself.
- No mass messaging and no pulling thousands of messages in a row: Telegram restricts accounts that behave like spam bots.
- If anything goes wrong, end the session in Telegram: Settings → Devices. The session file stops working immediately.
If my.telegram.org won't open (for example, from Russia), open it through a VPN — like the one I use.
02
The VPN I use
Know something useful?
If you have a tool or a guide worth sharing, message me. I'll add the best ones here and credit the author.
Message on Telegram