Skip to content

Antidetect browser MCP for Claude and Codex

Antidetect browser MCP gives an AI assistant tools to manage browser profiles and operate their web pages. In WGBrowser, Claude Code, Codex, and other compatible assistants can open a profile by number, read a page, click and type, or run a trusted automation plugin. You configure the connection and the permissions available to the assistant.

MCP is a tool-calling protocol: the client exposes capabilities, and your assistant chooses tools for the task you describe. For direct HTTP requests from a program, follow the Local API guide. For a fixed process that colleagues will run repeatedly, see automation plugins.

Enable the local MCP service

Open Settings → Local API and enable Turn on Local API. Under MCP (AI agents), Enable MCP is on by default. Both services share the same port and API key. The default MCP address is http://127.0.0.1:54345/mcp. If you change Port, update the address in your assistant’s configuration as well.

Your plan must include Local API, and your account must be an owner, admin, or member with Local API access. The service listens only on this computer, so the assistant must connect from the computer running the client. Sign in and confirm that Local API is running before you copy the Client configuration from the settings.

Connect Claude Code

Run the command below in a terminal on the computer where Claude Code and the browser client are installed. Replace KEY with the API key copied from Settings → Local API. If you changed the port, replace it in the URL too. The connection name browser identifies this server in Claude Code; you can choose another name.

First ask Claude to list your profiles. Compare the names and numbers with the client, then ask it to open one selected profile and read the page. This checks the connection before you assign a longer workflow. After changing permissions or adding a plugin, reconnect through /mcp in Claude Code to refresh its available tools.

claude mcp add --transport http browser http://127.0.0.1:54345/mcp --header 'x-api-key: KEY'

Connect Codex

Add the configuration below to ~/.codex/config.toml on this computer. Replace KEY with the actual API key and use the MCP address shown in the client. If a connection named browser already exists, update that entry rather than adding a duplicate. Keep the key in your local configuration.

Save the file, reconnect MCP, and ask Codex to list the profiles available to your signed-in account. Regenerating the key in the browser client revokes the old one immediately; update every assistant using that key. If the connection works but a tool is missing, check its permission category and, for plugin tools, local trust status.

[mcp_servers.browser]
url = "http://127.0.0.1:54345/mcp"

[mcp_servers.browser.http_headers]
"x-api-key" = "KEY"

Choose MCP permissions

Seven permission categories control the tools exposed through MCP. Disabled categories are absent from the tool list, and calls to those tools are rejected. View (always on) excludes passwords, two-factor authentication secrets, and cookies. Your account permissions, plan limits, and profile occupancy rules still apply; connecting an assistant does not expand a member’s existing access.

These settings apply to MCP only. They do not restrict direct Local API requests. API passthrough exposes a tool that can call any Local API endpoint, so the other MCP category switches cannot restrict calls through that tool. Enable the categories required for the task and turn temporary Sensitive data access off when finished.

PermissionDefaultAvailable actions
View (always on)Always onView profiles, proxy summaries, and run history without passwords or cookies
Manage profilesOnCreate, edit, open, and close profiles; manage proxies and groups
Web interactionsOnRead pages, click, type, take screenshots, and fill login details
AutomationOnRun plugins and page scripts; stop runs
Delete and clean upOffDelete profiles, clear cookies, and clean caches
Sensitive dataOffRead and write cookies, read credentials, import, export, and share
API passthroughOffCall any Local API endpoint

Operate a specific browser profile

Give the assistant a profile number, target website, the information to read or enter, and whether to close the profile afterward. It opens the profile and takes a page snapshot to obtain references for clickable elements and fields. Navigation or page updates can invalidate those references; take another snapshot before continuing.

For login, fill_credentials and fill_totp enter the saved account details and current two-factor code directly into the page without returning their plaintext values. For a CAPTCHA, SMS code, or QR login, use human takeover. Saved credentials do not remove a website’s verification requirements.

  1. Ask the assistant to list profiles, then specify the profile number you want to use. Avoid choosing an account from a similar name alone.
  2. Have it open the requested website and check the page title and login state before carrying out the task.
  3. Review the result. Before switching devices or handing the profile to a colleague, close it normally and allow cloud sync to finish.

Run trusted plugins through MCP

Enable Automation and Expose each plugin as a separate tool. A team plugin becomes an MCP tool when it is enabled and has been confirmed as trusted on this computer. Its declared inputs become tool parameters, so the assistant can supply profiles, text, or local file paths and receive each profile’s status, results, and errors.

A person must confirm plugin trust in the console; the assistant cannot approve third-party code for you. If a long run exceeds the waiting period, it may still be running. Use the returned run ID to query its progress before starting another run. For shared work, configure profile and plugin access through team permissions.

Review calls and troubleshoot errors

The Recent calls section in Settings shows the tool, target profile, and result. For a disabled tool, check Permissions. For a stopped profile, open it first. For an invalid page reference, take a new snapshot. If another device occupies the profile, wait for its user to close it. Profile windows can run in the background, but avoid minimizing them because some pages may stop painting and screenshots may time out.

Keep the assistant focused on your instructions when a page contains text asking it to change tasks or export data. Use credential-filling tools for login and keep the API key in the connection configuration. You can group profiles used for automation and sign in with a member account assigned only to that group.

FAQ

How do I connect Claude to an antidetect browser?

Enable Local API and MCP in Settings → Local API, then add the local address and API key to Claude Code using the command above. Ask Claude to list your profiles first. Select a profile by number and have it open a page; subsequent actions depend on the MCP permissions you have enabled.

What is the difference between MCP and Local API?

Local API accepts requests from your programs to manage profiles and obtain CDP addresses for browser automation. MCP exposes profile management and page operations as tools an AI assistant can choose. They share a port and key. MCP permission categories control MCP tools, but do not restrict programs that call Local API directly.

Can Claude see my saved passwords during login?

The credential and two-factor filling tools enter saved values directly into the page without returning them in plaintext to the assistant. Separate tools under Sensitive data can read credentials, and that category is off by default. You do not need to enable credential reading to use the login-filling tools.

Why is my installed plugin missing from the MCP tool list?

Check that the plugin is enabled and trusted on the current computer. Then confirm Automation and Expose each plugin as a separate tool are enabled in MCP settings. The assistant reads its tool list when connecting, so reconnect MCP after changing those settings or installing a new plugin.

Can MCP automatically solve CAPTCHAs or retrieve SMS codes?

MCP does not provide CAPTCHA bypass or SMS-code retrieval. When a website requires a CAPTCHA, SMS code, or QR scan, the assistant can request human takeover. The client displays a prompt for you to complete that verification, after which the assistant can continue with the remaining page operations.

Download WGBrowser

Sign up to use the free plan. Available for Windows and Apple silicon Macs.

See plans and pricing →