{"slug": "show-hn-an-mcp-server-that-gives-your-ai-assistant-write-access-to-etc-hosts", "title": "Show HN: An MCP server that gives your AI assistant write access to /etc./hosts", "summary": "A developer released LockIn, an MCP server that gives AI assistants write access to the system hosts file to block websites natively, making distractions unbypassable. The tool offers timed unblocking and a background daemon for state persistence, aiming to help users maintain focus while using AI agents.", "body_md": "I was tired of how bad distraction blockers are so I built my own.\n\nLockIn lets AI assistants (Claude, ChatGPT, Cursor, etc.) block websites by editing the system hosts file directly via MCP tools (via a secure cloudflare bridge).\n\nWhy? Because chrome extensions don't work. Blocking it natively makes it unbypassable, and having your agent gatekeep your focus is the ultimate cheat code.\n\nSince 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.\n\nThe 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).\n\nInstall: npx -y lockin-mcp install\n\nWhat 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.\n\nHappy to get into the daemon architecture or the relay setup if anyone's curious.\n\nComments URL: [https://news.ycombinator.com/item?id=48784250](https://news.ycombinator.com/item?id=48784250)\n\nPoints: 1\n\n# Comments: 0", "url": "https://wpnews.pro/news/show-hn-an-mcp-server-that-gives-your-ai-assistant-write-access-to-etc-hosts", "canonical_source": "https://www.lockinmcp.com", "published_at": "2026-07-04 10:09:17+00:00", "updated_at": "2026-07-04 10:20:15.069298+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools"], "entities": ["LockIn", "Claude", "ChatGPT", "Cursor", "Copilot", "MCP", "Cloudflare"], "alternates": {"html": "https://wpnews.pro/news/show-hn-an-mcp-server-that-gives-your-ai-assistant-write-access-to-etc-hosts", "markdown": "https://wpnews.pro/news/show-hn-an-mcp-server-that-gives-your-ai-assistant-write-access-to-etc-hosts.md", "text": "https://wpnews.pro/news/show-hn-an-mcp-server-that-gives-your-ai-assistant-write-access-to-etc-hosts.txt", "jsonld": "https://wpnews.pro/news/show-hn-an-mcp-server-that-gives-your-ai-assistant-write-access-to-etc-hosts.jsonld"}}