Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The most direct way to connect an MCP browser server to an existing browser extension session is Playwright MCP in extension mode. Install the Playwright Extension in Chrome or Edge, add npx @playwright/mcp@latest --extension to your MCP client configuration, then approve the connection to the browser profile you want the agent to use. This preserves open tabs, logged-in sessions, cookies and installed extensions.

Use Chrome DevTools MCP instead when you need DevTools inspection or a remote-debugging connection, and use Mozilla’s Firefox DevTools MCP for Firefox. Whichever bridge you choose, treat the selected browser profile as sensitive: an attached agent may be able to act as you.

What you need before connecting

  • Node.js with npx available on the machine running your MCP client.
  • An MCP client that lets you register a server, such as an AI desktop application or coding tool.
  • Chrome or Edge for Playwright Extension mode, or the browser and server required by an alternative path.
  • A separate browser profile if you do not want the agent to see unrelated accounts, tabs or stored session data.

Install the Playwright Extension in the Chrome Web Store or Edge Add-ons using the browser profile you intend to attach. The extension connects to that profile’s existing tabs; it does not create a clean, isolated browser automatically.

Connect Chrome or Edge with Playwright MCP Extension mode

1. Install and select the browser profile

Open Chrome or Edge, switch to the profile that contains the tabs and extensions you want to reuse, and install the Playwright Extension there. If you use multiple profiles, note the exact profile directory name. The extension normally attaches to the last-used profile that has it installed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Add the MCP server entry

Open your MCP client’s server configuration and add this entry:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest", "--extension"]
    }
  }
}

The @latest tag asks npx to use the current published Playwright MCP package. If your client uses a different configuration filename, add the same object to the place where it defines MCP servers; the command and arguments remain the same.

3. Reload the client and approve the connection

  1. Save the configuration.
  2. Restart or reload the MCP client so it starts the Playwright server.
  3. When the extension or browser asks to allow the connection, verify that the request came from your trusted MCP client and agent.
  4. Choose the intended profile if the browser presents more than one eligible profile.
  5. Ask the agent to list or inspect a tab as a harmless first operation before allowing navigation, form submission or downloads.

Once connected, the agent can work with tabs that were already open, including pages behind SSO or two-factor authentication. It can also use capabilities supplied by extensions installed in that profile. A login is not copied into the MCP client; the agent is operating through the attached browser context.

4. Target a specific profile when necessary

If the extension is installed in more than one profile, add --profile-dir-name and the exact directory name:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest",
        "--extension",
        "--profile-dir-name=Profile 1"
      ]
    }
  }
}

Replace Profile 1 with the profile directory shown by your browser. The visible profile label and the directory name are not always identical, so confirm the value rather than guessing.

Connect an existing Chrome session with Chrome DevTools MCP

Chrome DevTools MCP is a separate route. It connects an AI agent to a live Chrome instance and is a better fit when you need DevTools-oriented inspection, debugging or an explicit remote-debugging endpoint.

Automatic connection

Chrome’s automatic connection instructions require Chrome 144 or later. In Chrome, enable remote debugging at chrome://inspect/#remote-debugging, then register:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["chrome-devtools-mcp@latest", "--autoConnect"]
    }
  }
}

Approve the browser permission prompt only after checking that the MCP client and agent are trusted. Automatic connection can expose the open browser context to the agent.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Manual connection with a debugging port

For a predictable, isolated session, start Chrome with a dedicated user-data directory and debugging port:

google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-profile-stable

Then point the MCP server at that instance:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--browser-url=http://127.0.0.1:9222"
      ]
    }
  }
}

Use a different temporary directory for concurrent sessions. Chrome also documents a WebSocket endpoint option, --ws-endpoint, for clients that accept a browser WebSocket URL. A manually launched profile avoids accidentally attaching your everyday Chrome window, but you must sign in again inside that profile.

Firefox: use a different MCP server

Firefox does not use the Playwright Extension setup described above. Mozilla documents firefox-devtools-mcp, which automates and interacts with Firefox through WebDriver BiDi and Classic protocols.

That distinction matters when planning a workflow:

Path Browser/session target Connection method Best fit
Playwright MCP + Extension Existing Chrome or Edge tabs and profile Install extension; run @playwright/mcp@latest --extension Reuse logged-in tabs, SSO/2FA and installed extensions
Chrome DevTools MCP Existing or newly launched Chrome --autoConnect or --browser-url with remote debugging DevTools inspection, debugging and live Chrome sessions
Firefox DevTools MCP Firefox WebDriver BiDi or Classic Firefox-specific automation and debugging

Security and privacy checklist

An MCP connection is more than a screenshot or read-only integration. Depending on the tools exposed by the server, an agent can navigate, click, type, download files and submit forms inside the selected context.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use a trusted client and agent. Chrome warns that an auto-connected session may expose open tabs, cookies, session storage, local storage and other data available through JavaScript APIs.
  • Prefer a dedicated profile. Keep personal banking, work administration and unrelated accounts out of the profile used for automation.
  • Review every permission prompt. Confirm the browser, profile and MCP client before approving an attachment.
  • Limit the agent’s task. Start with a read-only inspection and require confirmation before purchases, account changes, messages or downloads.
  • Protect the server process. Playwright’s documentation notes that the server can run arbitrary JavaScript in its process and should be treated as remote-code-execution-capable tooling for a trusted client.
  • Close or disconnect when finished. Do not leave an authenticated automation profile attached to an unattended agent.

Common connection problems and fixes

The MCP client says the server failed to start

Confirm that Node.js and npx work in the same environment used by the client. Run npx --version in a terminal, then check the client’s server log for a path or permission error. If the client runs in a sandbox, container or service account, install Node.js there or use an absolute command path supported by that client.

The extension is installed but no tabs appear

Switch to the profile where the extension is installed, make sure the extension is enabled, and reload the MCP client. The default behavior targets the last-used eligible profile. Add --profile-dir-name=... when several profiles qualify, then restart the server.

The agent attached to the wrong account

Disconnect immediately, close the MCP session and remove the server’s access to that profile. Reopen the intended profile, verify its active account and tabs, then reconnect with the explicit profile-directory option or a dedicated profile.

Chrome DevTools MCP cannot connect automatically

Check that the browser meets the documented Chrome 144-or-later requirement, that remote debugging is enabled at chrome://inspect/#remote-debugging, and that you approved the permission prompt. If automatic discovery still fails, launch a separate instance on port 9222 and use --browser-url=http://127.0.0.1:9222.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The remote-debugging port is already in use

Choose another unused port and use the same port in the MCP server URL. Also choose a separate --user-data-dir; two Chrome processes cannot safely share a live profile directory.

Firefox instructions do not match Chrome instructions

They are different integrations. Use Mozilla’s firefox-devtools-mcp for Firefox rather than trying to install the Playwright Extension workflow in Firefox.

The agent can see a page but actions fail

Check whether the page is still loading, whether an overlay blocks clicks, and whether the site requires a user gesture or extension permission. Ask the agent to inspect the current tab and visible controls before retrying. For sensitive actions, perform the final click yourself.

WebMCP is not the extension bridge

WebMCP is a browser-focused way for websites to expose capabilities to browser agents. Chrome’s comparison explicitly says WebMCP is not an extension or a replacement for MCP. It does not replace Playwright Extension mode, Chrome DevTools MCP or Firefox DevTools MCP when your goal is to attach an MCP server to an existing browser session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your actual goal is automated website screenshots rather than interactive control of an already-open browser, ScreenshotNeo provides a direct API and an MCP server. A single request returns a PNG, JPEG, WebP or PDF without maintaining a local browser bridge.

Use the API documentation alongside these examples: ScreenshotNeo API and MCP documentation.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo accepts cookie and consent banners before capture, then removes more than 60 known consent platforms along with newsletter popups and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info and capture_pdf tools to Claude, Cursor and other MCP clients.

For authenticated or highly interactive workflows, keep the browser-attachment methods above. For repeatable captures, ScreenshotNeo also supports full-page screenshots with lazy images loaded, CSS-selector element capture, dark mode, device presets or custom viewports, retina scale, PDF paper settings and page ranges, custom CSS and JavaScript, clicks before capture, waits, request blocking, headers, cookies, user agents, Authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Plan Allowance Price
Free 1,000 shots/month $0, no card
Starter 3,000 shots $5
Growth 15,000 shots $15
Pro 60,000 shots $39
Scale 250,000 shots $99
Business 1,000,000 shots $249

Every feature is included on every plan, and yearly billing provides two months free. Start with 1,000 free screenshots a month—no card required.

Frequently Asked Questions

Can I connect an MCP server to a browser profile that is already signed in?

Yes. Playwright Extension mode is specifically designed to reuse existing Chrome or Edge tabs, cookies, logged-in sessions and installed extensions. Use a dedicated profile when those credentials should not be exposed to an agent.

Do I need remote debugging for Playwright Extension mode?

No. The extension workflow uses the installed Playwright Extension and the --extension server argument. Remote debugging is the connection mechanism for Chrome DevTools MCP.

Can one MCP server control both Chrome and Firefox?

Not through these documented paths. Chrome and Edge use the Playwright Extension workflow, while Firefox uses Mozilla’s separate firefox-devtools-mcp server and WebDriver protocols.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is WebMCP the same thing as installing a browser extension?

No. WebMCP lets websites expose capabilities to browser agents; it is not an extension and does not replace an MCP server-to-browser bridge.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.