Blog
How to install LockIn MCP and connect it to your AI assistant
Install LockIn MCP in five minutes: one terminal command, background service setup, AI connector configuration, and troubleshooting for hosts-file blocking.

You already use Claude or ChatGPT for drafting, research, and planning. The missing piece is enforcement: your assistant can tell you to stay focused, but it cannot stop your browser from loading Reddit unless something on your machine is wired up to act on its instructions.
That gap is what LockIn MCP closes. Setup takes about five minutes, requires no manual config-file editing, and turns your existing AI workflow into a system that can actually block distracting sites while you work. This guide walks through installation, connecting your assistant, starting your first session, and fixing the issues people hit most often.
If you want the architecture overview before you install, read how LockIn MCP works first. When you are ready to go, follow the steps below.
What you need before you start
LockIn MCP runs on macOS, Linux, and Windows. You need:
- A terminal (Terminal on Mac, PowerShell or Command Prompt on Windows, any shell on Linux)
- Node.js installed (the installer uses
npx, which ships with Node) - Admin permissions for hosts-file edits — this is what makes blocking work across every browser, not just one
- An AI assistant that supports MCP connectors: Claude, ChatGPT, Perplexity, Gemini, or Poke
You do not need to be a developer. The installer is a single command; it writes the local config for you.
Step 1: Run the installer
Open a terminal and run:
npx -y lockin-mcp installThis command does three things at once:
- Edits your system hosts file so distracting domains redirect to a dead address — blocking Reddit, YouTube, X, and your custom list across Chrome, Firefox, Safari, and Edge simultaneously
- Starts the local MCP server that your AI assistant will call
- Generates and saves the MCP server URL and API key on your machine
For a deeper explanation of why hosts-file blocking matters, see best system-level website blockers in 2026.
Step 2: Enable the background service
The background service keeps the MCP server running and maintains active unblock timers even when you close your AI chat window or restart your machine.
Skipping this step is the most common reason blocks appear to "reset." Without the background service, a reboot or app restart can silently drop your active session — and suddenly YouTube loads again even though you thought you were still in a focus block.
During install, follow the prompts to enable the service. On macOS and Linux this typically means approving a launch agent; on Windows, a scheduled task or service registration.
Step 3: Connect your AI assistant
After installation, your MCP server URL and API key are saved locally. The exact UI differs by assistant, but the pattern is the same:
- Open your assistant's MCP or connector settings (see connector docs for per-assistant steps)
- Add a new MCP server using the URL from your local install
- Paste the API key exactly — no extra spaces or line breaks
- Save and restart the assistant app if prompted
Supported assistants: Claude, ChatGPT, Perplexity, Gemini, and Poke. ChatGPT users specifically should read can ChatGPT block websites for what changes once the MCP connection is live.
Common mistake: copying the key from a notification that truncated it. Open the local config file the installer created and copy from there if the connection fails on first try.
Step 4: Create a focus task and start a session
Tell your connected assistant what you are working on. Be specific about duration:
"I'm writing the Q3 client report for the next 90 minutes. Block my usual distractions."
The assistant calls LockIn's MCP tools to start a session. That activates the hosts-file block for your configured distraction list. The Chrome extension (installed as part of setup) adds a second layer: it evaluates whether pages you visit relate to your stated task.
This is the AI productivity distraction blocking model — enforcement triggered by conversation, not a separate settings panel you have to remember to open.
Step 5: Test that blocking is active
Open your browser and navigate to a domain on your blocklist — for example, reddit.com or youtube.com. The page should not load.
If it does load, work through the troubleshooting section below before assuming installation failed. DNS caching and DNS-over-HTTPS can delay the first block by a few seconds; give it a moment, then hard-refresh.
Troubleshooting common setup issues
Site still loads after starting a session
- Confirm the background service is running
- Check whether your browser uses DNS-over-HTTPS (DoH). DoH can bypass local hosts-file entries for some domains. Disable DoH in browser settings or use system DNS during focus sessions
- Verify the session actually started — ask your assistant "what is my active focus task?"
- Try a different browser to rule out extension-only blocking
A different browser profile is not blocked
Hosts-file blocking is system-wide. If one profile seems unblocked, you may be hitting a DoH or VPN bypass. The Chrome extension's task-aware layer is profile-specific — install or enable it in whichever profile you use for work.
AI assistant does not see the MCP connection
- Re-copy the server URL and API key from the local install output
- Confirm connector settings were saved (some assistants require an app restart)
- Start a fresh chat — cached sessions sometimes do not pick up new tools immediately
- Check connector docs for assistant-specific quirks
Blocks disappear after restart
The background service was not enabled or did not survive reboot. Re-run the service setup step from the installer output.
What you get once it is connected
With LockIn MCP connected, your AI assistant can:
- Start and end focus sessions from natural language
- Check your active task mid-session
- Grant time-boxed, logged temporary unblocks when you have a legitimate reason
- Keep enforcement running independently of the chat window
You manage focus from the tool you already have open for work — not a separate blocker app sitting in the background.
Pricing: 3-day free trial, then $2.99/month or a one-time $59.99 lifetime option. Full details on the get started page.
Frequently asked questions
Do I need to be a developer to install this?
No. One terminal command handles setup. You will need to paste a URL and API key into your AI assistant's connector settings, but you do not edit JSON config files by hand.
Which AI assistants does LockIn MCP support?
Claude, ChatGPT, Perplexity, Gemini, and Poke — connected through the Model Context Protocol (MCP). Pick whichever you already use daily.
Does installation modify my system permanently?
The hosts file is edited during active sessions. When a session ends or you disable blocking, entries are removed. The background service persists so you do not have to reinstall after every reboot.
What if I only want blocking during work hours?
Sessions are triggered by telling your assistant what you are working on — blocking is scoped to active sessions, not running 24/7 by default. You control when sessions start and end.
Can I customize which sites are blocked?
Yes. Your distraction list is configurable. Be specific: "social media" is vague; reddit.com, youtube.com, and x.com are enforceable.
Is there a free trial?
Yes — three days, then $2.99/month or $59.99 lifetime. Start at /get-started.
