LockIn lets AI assistants (Claude, ChatGPT, Cursor, etc.) block websites by editing the system hosts file directly via MCP tools (via a secure cloudflare bridge).
Why? Because chrome extensions don't work. Blocking it natively makes it unbypassable, and having your agent gatekeep your focus is the ultimate cheat code.
Since everyone is using AI agents nowadays, but most people start scrolling or Reddit while waiting for Claude Code to finish, giving them control over your focus solves that.
The MCP server exposes four tools: block_site, unblock_temp, focus_session, get_status. A background daemon keeps the state synced and persists across restarts. There's a relay URL for hosted MCP connections (ChatGPT, Copilot).
Install: npx -y lockin-mcp install
What makes it so good for me is the timed unblock: it gives the flexibility most tools miss. If you're studying for school you don't want to be distracted by yt, but perhaps you have to watch a 5 minute video FOR school, in that case you can now ask your agent to 'unblock yt for 5 minutes' and it does it.
Happy to get into the daemon architecture or the relay setup if anyone's curious.
opptybiz•50m ago
One thing worth calling out: the Cloudflare relay for hosted connections (ChatGPT, Copilot) means a third party sees your block/unblock tool calls before they reach the daemon. For a distraction blocker that's probably low-stakes, but it's worth documenting the trust boundary explicitly — /etc/hosts write access proxied through a relay isn't the same trust model as local-only. If that relay is ever misconfigured or compromised, you're one injected tool call away from arbitrary host redirection.
For Claude Code specifically, the local daemon is already on-machine — does the MCP config support a local transport mode that bypasses the relay entirely?