Original Reddit post

Multiple Claude accounts, multiple devices, sessions expiring constantly. Wait for the email, find it, open the link in the right browser, confirm. It adds up. So I built a tool that does everything except the final confirmation click. That one stays, deliberately, as the human-in-the-loop boundary. How it works: Connects to your mailbox via IMAP IDLE (push-based, no polling). When an Anthropic login email arrives, the magic link is extracted within seconds and opened in the correct browser. Multiple accounts? Each link goes to its assigned browser automatically. The tab opens on the confirmation page: Tab + Space, done. Security: Every link passes 6 independent checks before opening: sender domain, HTTPS, exact host, exact path, recipient match against the address encoded in the link, and DMARC/DKIM verification against your provider’s Authentication-Results header. The checks come with a test suite covering the attack cases: subdomain tricks, lookalike DKIM domains, spoofed auth headers. The fun part: Zero external dependencies. The tool is built directly on the IMAP IDLE API that landed in Python 3.14’s standard library (IMAP4.idle()); before 3.14, push-based IMAP meant a third-party library or hand-rolling the protocol. MIT-licensed, macOS + Linux. Install: pipx install claude-magic-link (needs Python 3.14+). GitHub: github.com/fidpa/claude-magic-link submitted by /u/fi-dpa

Originally posted by u/fi-dpa on r/ClaudeCode