Beta Setup guide · Windows

Connect an AI assistant to AdLock in a few minutes.

AdLock for Windows has a built-in MCP server. Turn it on, add its address and token to your assistant, and you are done. Nothing else to install.

What you need

  1. AdLock for Windows 2.2.1.2 or newerWindows 7 SP1 or later. MCP support is in beta.
  2. An MCP-capable assistantClaude Code, Cursor, VS Code with Copilot and others. It must run on this computer: web versions such as chatgpt.com cannot reach AdLock.
Step 1

Turn on the MCP server

Open Settings → MCP Server and switch on Enable MCP server. The status changes to “MCP is on”.

You can also use the tray icon: MCP Server → Enable. The server is off by default and listens only on 127.0.0.1.

AdLock Settings screen with the MCP Server item highlighted
Settings → MCP Server
The Enable MCP server switch is off, status MCP is off The Enable MCP server switch is on, status MCP is on
Before and after switching on Enable MCP server
Step 2

Copy the address and the token

In the Connection block, press Regenerate token. Then copy the address and the token: click a field and press Ctrl+C, or use the copy icon.

The token is shown once. If you leave the screen, it is hidden. Press Regenerate token again.

Keep it private. Paste it only into your assistant’s MCP settings, never into a chat, an email or a screenshot.

The Connection block with the address and the Regenerate token button highlighted
Press Regenerate token
The Connection block showing the address and the token, each with a copy icon. The token is hidden in this screenshot.
The address and the token, each with a copy icon. The token is hidden here.
Step 3

Connect your assistant

Add the address and the token to your assistant. In the examples, replace <YOUR_TOKEN> with the token from step 2.

The URL is your address with http:// in front and /mcp at the end, for example http://127.0.0.1:23176/mcp. If AdLock shows another port, use that one.

A token binds to the first app that connects, so connect one assistant.

Run this in a terminal:

claude mcp add --transport http adlock http://127.0.0.1:23176/mcp --header "Authorization: Bearer <YOUR_TOKEN>"

Restart Claude Code and run /mcp. adlock should be connected.

Step 4

Check the connection

Ask your assistant something about AdLock:

Try“Which AdLock version is this, and is filtering on?”
Or“What did AdLock block in the last hour?”

AdLock’s Connected client block now shows the app and its publisher. Do not recognize it? Press Revoke and regenerate the token.

The Connected client block showing claude.exe by Anthropic, PBC with a Revoke button
Connected client, for example claude.exe by Anthropic, PBC
Step 5

Choose what the assistant may do

Each permission unlocks a group of tools. Without it, the assistant cannot use them.

Change settings and stop filtering can weaken your protection. Turn it on only for a specific task.

The Permissions block: View traffic and Change rules and lists are on, View page content and Change settings and stop filtering are off
Permissions with the default settings
PermissionThe assistant canDefault
View trafficSee statistics, explain blocks and check rules.On
View page contentRead fragments of open pages to find ads.Off
Change rules and listsAdd its own rules, allow or block domains.On
Change settings and stop filteringSwitch filters on and off, change DNS mode, turn AdLock off.Off
Manage and stay safe

You stay in control

Everything it does is visible in AdLock, and you can stop it at any time.

  • AI summaryCounts the rules and domains the assistant added. They live in their own lists, apart from yours. Switch a list off to cancel its changes at once.
  • Recent changesEvery action with the assistant’s reason. Logging can be switched off.
  • UndoAsk the assistant to roll rules back to the previous version.
  • Revoke and regenerateRevoke disconnects the app. Regenerate token cancels the old one. Enter the new token in your assistant.
  • Keep approvals onAdLock does not ask for confirmation itself. Keep your assistant’s approval for each call on.
  • Keep it localNever expose the server to the internet (ngrok and similar tunnels). Anyone with the address and token could control filtering.
  • Not using AI?Switch the server off in settings or from the tray.
The AI summary block with counters for rules, allowed domains, denied domains and exceptions
AI summary
The Recent changes block with the Disable MCP events logging switch
Recent changes
Troubleshooting

If it does not work

The assistant cannot see AdLock
Check that the status reads “MCP is on” and the address starts with http:// and ends with /mcp. Restart the assistant.
Error 401 or “unauthorized”
The token is incomplete or was regenerated. Regenerate it and enter it again: Bearer, one space, then the token.
“token is bound to another client”
Another app already holds the token. Press Revoke, then Regenerate token.
It stopped working after the assistant updated
Close the assistant completely and start it again. No new token needed.
The assistant cannot change rules or settings
The permission is off in Permissions. This is expected.
A rule was added, but the site did not change
Check that the AI rules list is on, then reload the page with Ctrl+F5.

Ready to ask?

See what an assistant can do with AdLock.

About AdLock MCP
GET ADLOCK FOR YOUR DEVICE