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
- AdLock for Windows 2.2.1.2 or newerWindows 7 SP1 or later. MCP support is in beta.
- 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.
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.


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.


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.
Open Settings → MCP → Add new MCP server, or edit %USERPROFILE%\.cursor\mcp.json:
{
"mcpServers": {
"adlock": {
"url": "http://127.0.0.1:23176/mcp",
"headers": { "Authorization": "Bearer <YOUR_TOKEN>" }
}
}
}In Copilot agent mode, run MCP: Open User Configuration and edit mcp.json. VS Code asks for the token on start and does not keep it in the file:
{
"inputs": [
{ "type": "promptString", "id": "adlock-token", "description": "AdLock MCP token", "password": true }
],
"servers": {
"adlock": {
"type": "http",
"url": "http://127.0.0.1:23176/mcp",
"headers": { "Authorization": "Bearer ${input:adlock-token}" }
}
}
}Any client with Streamable HTTP support needs two things:
URL: http://127.0.0.1:23176/mcp
Header: Authorization: Bearer <YOUR_TOKEN>Check the connection
Ask your assistant something about AdLock:
AdLock’s Connected client block now shows the app and its publisher. Do not recognize it? Press Revoke and regenerate the token.

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.

| Permission | The assistant can | Default |
|---|---|---|
| View traffic | See statistics, explain blocks and check rules. | On |
| View page content | Read fragments of open pages to find ads. | Off |
| Change rules and lists | Add its own rules, allow or block domains. | On |
| Change settings and stop filtering | Switch filters on and off, change DNS mode, turn AdLock off. | Off |
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.


If it does not work
http:// and ends with /mcp. Restart the assistant.Bearer, one space, then the token.Ready to ask?
See what an assistant can do with AdLock.
About AdLock MCP









