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

Short answer: Trae offers two different ways to let an agent use a browser. Turn on Trae’s native browser control in Settings > Browser for the built-in browser, or add a browser MCP server under Settings > MCP and assign it to an agent that supports MCP tools. This guide shows both routes, a Playwright MCP configuration, connections to existing Chrome or Edge sessions, safety controls, troubleshooting, and a no-browser-setup alternative.

The documented controls come from TraeCode pages on docs.trae.cn. Names and availability can differ by Trae client version or region, so compare the labels in your installed app before following a step exactly.

What “Browser Tools MCP” means in Trae

Browser control and MCP are related but not interchangeable:

  • Native browser control: Trae’s agent operates Trae’s built-in browser, or an external Chrome browser connected through the TraeWork Browser Extension.
  • Browser MCP: Trae starts or connects to a separate Model Context Protocol server. The server exposes browser tools—such as Playwright’s navigation, form, screenshot, and tab actions—to an agent.

Trae’s documentation says its Chat agent cannot operate the browser. Use Builder or a custom agent that has the relevant browser tools enabled. Do not assume that installing an MCP server automatically gives every Trae agent access.

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

Choose the right route

Route Where it runs Best for Requirements
Built-in browser Trae’s embedded browser Quick page inspection and controlled interactions Enable browser control in Settings
External Chrome Chrome connected by TraeWork Browser Extension Workflows needing an existing Chrome profile or selected trusted domains Extension and optional trusted-domain allowlist
Playwright MCP Fresh or connected Chromium session controlled by an MCP server Structured browser automation, screenshots, forms, tabs, logs, and test workflows Trae MCP configuration and Node.js 20 or newer for the documented npx setup
Other Browser MCP server Depends on that server Vendor-specific tools or an existing extension workflow Verify the server’s current package, extension, and permissions

Enable Trae’s native built-in browser

  1. Open Trae Settings.
  2. Open Browser.
  3. Enable Allow AI to control built-in browser.
  4. Choose an agent that supports browser actions. The Chat agent is not suitable for browser operation.
  5. Ask the agent to open a harmless test page and report its title before allowing clicks or form submissions.

For a first request, use a local development page or a test site. Then ask for a screenshot or a read-only description. Keep destructive actions—publishing, deleting, purchasing, or submitting production forms—out of the initial test.

External Chrome through TraeWork

  1. Go to Settings > Browser > External Browser.
  2. Install the TraeWork Browser Extension from the documented flow.
  3. Enable Default use external browser.
  4. If you work with logged-in accounts, configure the documented trusted-domain allowlist before connecting.
  5. Open the required Chrome tab and let the compatible Trae agent connect.

External-browser control can expose the cookies and account state of the connected profile. Use a separate Chrome profile for automation when possible, and limit trusted domains to the sites the workflow actually needs. Trae also documents clearing built-in-browser cookies and local storage; use that cleanup when a test session should not persist.

Add Playwright MCP from Trae’s marketplace

  1. Open Settings > MCP.
  2. Select Add, then Add from Marketplace.
  3. Find Playwright and add it.
  4. Review the server configuration shown by Trae and confirm it.
  5. Open Builder or create a custom agent, then select Playwright in that agent’s MCP tools.

Trae’s tutorial describes tools for navigation, clicking, filling and selecting fields, screenshots, console logs, page text and HTML, keyboard and mouse input, drag operations, tabs, viewport changes, and HTTP methods including GET, POST, PUT, PATCH, and DELETE. Tool names can vary with the server version.

Configure Playwright MCP manually

Playwright’s documented baseline uses npx and requires Node.js 20 or newer:

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

In Trae, add this configuration through the MCP settings rather than pasting it into a chat message. Review every command and argument before confirming. The @latest tag follows the current package release; pin a tested version in a controlled team environment if your organization requires repeatable builds.

Importing a configuration link

Trae’s import-link flow supports stdio or HTTP servers. The link contains Base64-encoded JSON. When you open one, Trae presents the decoded configuration for review and confirmation. Treat an import link as configuration, not as proof that the server is trustworthy: inspect the command, package, arguments, environment variables, and endpoint before accepting it.

Connect Playwright to an existing browser

Playwright can start an isolated browser or connect to a browser you already have open. Use the connection method that matches your session and security needs:

Option Use Important detail
--cdp-endpoint=chrome Running Chrome or an Edge channel Connects through the supported browser channel.
CDP URL Chromium exposing a debugging endpoint Supply the endpoint URL provided by that browser.
--endpoint=ws://... Existing Playwright server Use the server’s WebSocket endpoint.
--extension Existing Chrome or Edge tabs Can reuse current cookies and logged-in sessions; use --profile-dir-name to select a profile when needed.

Use a fresh, isolated profile for untrusted sites. Reusing a logged-in profile is convenient, but it grants the agent the same access as that browser session.

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

Run a safe first task

  1. Start with a local page or a non-sensitive test page.
  2. Ask the agent to navigate and return the page title.
  3. Ask it to capture a screenshot without changing state.
  4. Try a harmless form on a test site, such as filling a field without submitting.
  5. Inspect the tool call and result before granting broader permissions.

Playwright’s examples use a TodoMVC page, adding items after navigation. Trae’s tutorial examples include opening a page, taking a screenshot, and clicking a link. Treat these as patterns for your own test environment, not as permission to automate a production account.

Permissions, JavaScript, and safety

Ordinary browser actions

Navigation, clicks, typing, selecting, screenshots, page text, and tab management are narrower than arbitrary code execution, but they can still alter account data. Require confirmation before submissions, purchases, account changes, or deletion.

Arbitrary JavaScript

Playwright documents an arbitrary-JavaScript tool for complex interactions and labels it RCE-equivalent. Enable it only for a trusted MCP client and a server you understand. Do not enable it merely because a page is difficult to automate; first try normal navigation and form tools.

Credentials and session state

  • Prefer a dedicated browser profile with test credentials.
  • Keep trusted domains narrow.
  • Never paste API keys or passwords into an agent prompt when a supported environment-variable or secret mechanism is available.
  • Review screenshots and page text for personal or confidential data before saving or sharing them.

Common problems and fixes

The agent says it cannot use a browser

Cause: You are using Trae’s Chat agent or an agent without the browser tool selected.

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

Fix: Use Builder or create a custom agent, then enable the native browser control or select Playwright under that agent’s MCP tools.

Playwright does not appear in MCP

Cause: The marketplace entry was not added, the configuration was not confirmed, or the client version uses different labels.

Fix: Reopen Settings > MCP > Add > Add from Marketplace, review the configuration, confirm it, and restart the agent. If the marketplace is unavailable in your region, use the documented manual JSON and verify Node.js 20 or newer.

The server exits immediately

Cause: Node.js is missing or too old, npx cannot resolve the package, or the command/arguments are malformed.

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.

Fix: Check node --version, install Node.js 20 or newer, run the command in a terminal to observe its error, and recheck JSON quoting. Review the configuration Trae shows before importing.

The agent opens a blank or wrong page

Cause: The requested URL redirects, requires authentication, or the wrong profile or tab is connected.

Fix: Navigate manually in the same profile, verify the final URL, select the intended profile with --profile-dir-name where applicable, and use a fresh session if the existing tab has stale state.

Logged-in pages are inaccessible

Cause: A fresh Playwright context has no cookies, or the extension is attached to a different profile.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Fix: Use the extension route or an approved CDP connection to the intended profile, then confirm the domain and account before allowing actions. Do not copy session cookies into prompts.

Actions fail on a dynamic page

Cause: The control has not rendered, an overlay blocks it, or the page uses a custom widget.

Fix: Wait for the relevant selector, inspect the accessibility snapshot or page text, resize the viewport if the responsive layout hides the control, and close consent or modal overlays only when that is part of the test. Avoid arbitrary JavaScript unless the MCP client and server are trusted.

The Browser MCP vendor setup differs

An indexed Trae Browser MCP page references an npx-based server named browser-mcp and a Chrome extension, but its current instructions could not be independently confirmed. Verify the vendor’s live package name, import link, extension, permissions, and compatibility before installing it. The Playwright path above is the independently documented baseline.

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

Performance, reliability, and operating practice

  • Use isolated sessions for repeatability: fixed profiles and test data reduce failures caused by old cookies or open tabs.
  • Wait on state, not arbitrary sleeps: wait for a selector or meaningful page condition when your tool supports it.
  • Keep tasks narrow: one navigation-and-verification objective is easier to audit than a long chain of production actions.
  • Capture evidence: save the URL, screenshot, and relevant console or page text when diagnosing a failure.
  • Expect regional UI differences: TraeCode documentation is from China documentation pages; your client may translate, rename, or omit controls.

Or skip the browser setup

If your goal is simply to obtain a clean website image or PDF—not to let Trae click through a live session—ScreenshotNeo provides a one-call screenshot API and an MCP server for Claude, Cursor, and other MCP clients. It accepts cookie and consent banners before capture, removes more than 60 known consent platforms plus newsletter popups and chat widgets, and bills only clean shots. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers report the page verdict and billing status.

Use the API documentation at screenshotneo.com/docs/ for the full option set, including full-page lazy-image capture, CSS-selector element shots, device and retina settings, dark mode, PDF paper and page controls, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification.

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}`);

The free plan includes 1,000 screenshots each month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account to get started.

Frequently Asked Questions

Can I use Trae’s built-in browser and Playwright MCP together?

Yes. They are separate routes. Enable native browser control for built-in or external-browser actions, and add Playwright under MCP when an agent needs the server’s tool set. Select only the tools required for the task.

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

Does Playwright MCP automatically reuse my Chrome login?

No. A fresh browser context is separate. Reuse requires an approved connection to an existing browser or profile, such as the extension or CDP routes, with the associated security implications.

What should I do if Trae’s labels do not match this guide?

Check the Browser and MCP settings for equivalent controls, then consult the documentation for your client region and version. The documented pages are for TraeCode and may not map one-for-one to every Trae-branded client.

Is a screenshot API a replacement for browser automation?

Only when you need a rendered image or PDF. It does not replace interactive tasks such as filling a form, inspecting a logged-in session, or clicking through a workflow.

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.

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