Modified version of chrome-devtools-mcp without telemetry data and adapted to work with brave. Plug and play as it is just a Chromium browser.
Fork of chrome-devtools-mcp, adapted for Brave Browser.
brave-devtools-mcp exposes content of the browser instance to the MCP clients
allowing them to inspect, debug, and modify any data in the browser or DevTools.
Avoid sharing sensitive or personal information that you don't want to share with
MCP clients.
- Node.js v20.19 or a newer latest maintenance LTS version.
- Brave Browser current stable version or newer.
- npm.
Since brave-devtools-mcp is not published to the public npm registry, you need to install it manually from this repository.
git clone https://github.com/381sm016/brave-devtools-mcp.git
cd brave-devtools-mcpnpm installIf the project uses a build step (e.g. TypeScript), run it here. If not, you can skip this.
npm run buildYou have two main options:
- Use a local path directly (recommended for development)
- Use a global install from the cloned repo
Most MCP clients let you point command at a local node or npm and then pass a relative path to the repo’s entry point.
Example (generic):
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": [
"/absolute/path/to/brave-devtools-mcp/dist/index.js"
]
}
}
}Adjust the path to whatever the actual entry file is (e.g. bin/brave-devtools-mcp.js, dist/index.js, etc).
From inside the cloned repo:
npm install -g .This will make a brave-devtools-mcp binary available on your PATH (assuming the project exposes one). You can then use just brave-devtools-mcp as the command in your MCP clients.
brave-devtools-mcp --helpAfter manual installation, configure your MCP client to use the locally installed brave-devtools-mcp rather than npx / npm.
Below are per–agent examples using manual/local installation.
Replace
/absolute/path/to/brave-devtools-mcpand any script paths with the actual location on your system. If you installed globally withnpm install -g .and have abrave-devtools-mcpbinary, you can use"command": "brave-devtools-mcp"and omit the path.
Claude Code
Use the Claude Code CLI to add the Brave DevTools MCP server (guide).If you installed globally and have a brave-devtools-mcp binary:
claude mcp add brave-devtools --scope user brave-devtools-mcpIf you prefer calling the local script directly:
claude mcp add brave-devtools --scope user node /absolute/path/to/brave-devtools-mcp/dist/index.jsAdjust the entry file path as needed.
Cursor
Go to Cursor Settings -> MCP -> New MCP Server and configure it to use the locally installed server.
If installed globally:
{
"mcpServers": {
"brave-devtools": {
"command": "brave-devtools-mcp",
"args": []
}
}
}If using a local script:
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": ["/absolute/path/to/brave-devtools-mcp/dist/index.js"]
}
}
}Copilot / VS Code
Follow the MCP install guide,
but reference the local brave-devtools-mcp instead of npx.
In your mcpServers configuration:
Global binary:
{
"mcpServers": {
"brave-devtools": {
"command": "brave-devtools-mcp",
"args": []
}
}
}Local script:
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": ["/absolute/path/to/brave-devtools-mcp/dist/index.js"]
}
}
}Windsurf
Follow the configure MCP guide using a local command instead of `npx`.Example using a global binary:
{
"mcpServers": {
"brave-devtools": {
"command": "brave-devtools-mcp",
"args": []
}
}
}Or using a local script:
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": ["/absolute/path/to/brave-devtools-mcp/dist/index.js"]
}
}
}Cline
Follow https://docs.cline.bot/mcp/configuring-mcp-servers, but instead of using `npx`, reference the local installation.Global binary:
{
"mcpServers": {
"brave-devtools": {
"command": "brave-devtools-mcp",
"args": []
}
}
}Local script:
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": ["/absolute/path/to/brave-devtools-mcp/dist/index.js"]
}
}
}Gemini CLI
Install the Brave DevTools MCP server manually, then point Gemini at your local command instead of using the npm registry.Project wide (global binary):
gemini mcp add brave-devtools brave-devtools-mcpProject wide (local script):
gemini mcp add brave-devtools node /absolute/path/to/brave-devtools-mcp/dist/index.jsGlobally (global binary):
gemini mcp add -s user brave-devtools brave-devtools-mcpGlobally (local script):
gemini mcp add -s user brave-devtools node /absolute/path/to/brave-devtools-mcp/dist/index.jsCodex
Follow the configure MCP guide using the local `brave-devtools-mcp` command instead of `npx`. You can also register it via the Codex CLI.Global binary:
codex mcp add brave-devtools -- brave-devtools-mcpLocal script:
codex mcp add brave-devtools -- node /absolute/path/to/brave-devtools-mcp/dist/index.jsOn Windows 11
Configure the Brave install location and increase the startup timeout by updating .codex/config.toml and adding the following env and startup_timeout_ms parameters:
[mcp_servers.brave-devtools]
command = "cmd"
args = [
"/c",
"node",
"C:\\path\\to\\brave-devtools-mcp\\dist\\index.js",
]
env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" }
startup_timeout_ms = 20_000
Adjust the path to match your local checkout.
Enter the following prompt in your MCP Client to check if everything is working:
Check the performance of https://search.brave.com
Your MCP client should open the browser and record a performance trace.
Note
The MCP server will start the browser automatically once the MCP client uses a tool that requires a running browser instance. Connecting to the Brave DevTools MCP server on its own will not automatically launch Brave.
If you run into any issues, checkout our troubleshooting guide.
- Input automation (8 tools)
- Navigation automation (6 tools)
- Emulation (2 tools)
- Performance (3 tools)
- Network (2 tools)
- Debugging (5 tools)
The Brave DevTools MCP server supports the following configuration options:
-
--autoConnect/--auto-connectIf specified, automatically connects to a running Brave instance using the user data directory identified by the channel param. Requires the remote debugging server to be started in the Brave instan[...]- Type: boolean
- Default:
false
-
--browserUrl/--browser-url,-uConnect to a running, debuggable Brave instance (e.g.http://127.0.0.1:9222).- Type: string
-
--wsEndpoint/--ws-endpoint,-wWebSocket endpoint to connect to a running Brave instance (e.g., ws://127.0.0.1:9222/devtools/browser/). Alternative to --browserUrl.- Type: string
-
--wsHeaders/--ws-headersCustom headers for WebSocket connection in JSON format (e.g., '{"Authorization":"Bearer token"}'). Only works with --wsEndpoint.- Type: string
-
--headlessWhether to run in headless (no UI) mode.- Type: boolean
- Default:
false
-
--executablePath/--executable-path,-ePath to custom Brave executable.- Type: string
-
--isolatedIf specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. Defaults to false.- Type: boolean
-
--userDataDir/--user-data-dirPath to the user data directory for Brave. Default is $HOME/.cache/brave-devtools-mcp/brave-profile$CHANNEL_SUFFIX_IF_NON_STABLE- Type: string
-
--channelSpecify a different Brave channel that should be used. The default is the stable channel version.- Type: string
- Choices:
stable,beta,dev,nightly
-
--logFile/--log-filePath to a file to write debug logs to. Set the env variableDEBUGto*to enable verbose logs. Useful for submitting bug reports.- Type: string
-
--viewportInitial viewport size for the Brave instances started by the server. For example,1280x720. In headless mode, max size is 3840x2160px.- Type: string
-
--proxyServer/--proxy-serverProxy server configuration for Brave passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.- Type: string
-
--acceptInsecureCerts/--accept-insecure-certsIf enabled, ignores errors relative to self-signed and expired certificates. Use with caution.- Type: boolean
-
--braveArg/--brave-argAdditional arguments for Brave. Only applies when Brave is launched by brave-devtools-mcp.- Type: array
-
--ignoreDefaultBraveArg/--ignore-default-brave-argExplicitly disable default arguments for Brave. Only applies when Brave is launched by brave-devtools-mcp.- Type: array
-
--categoryEmulation/--category-emulationSet to false to exclude tools related to emulation.- Type: boolean
- Default:
true
-
--categoryPerformance/--category-performanceSet to false to exclude tools related to performance.- Type: boolean
- Default:
true
-
--categoryNetwork/--category-networkSet to false to exclude tools related to network.- Type: boolean
- Default:
true
Pass them via the args property in the JSON configuration. For example:
{
"mcpServers": {
"brave-devtools": {
"command": "brave-devtools-mcp",
"args": [
"--channel=nightly",
"--headless=true",
"--isolated=true"
]
}
}
}Or, if using a local script:
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": [
"/absolute/path/to/brave-devtools-mcp/dist/index.js",
"--channel=nightly",
"--headless=true",
"--isolated=true"
]
}
}
}You can connect directly to a Brave WebSocket endpoint and include custom headers (e.g., for authentication):
{
"mcpServers": {
"brave-devtools": {
"command": "brave-devtools-mcp",
"args": [
"--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/<id>",
"--wsHeaders={\"Authorization\":\"Bearer YOUR_TOKEN\"}"
]
}
}
}Or with a local script:
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": [
"/absolute/path/to/brave-devtools-mcp/dist/index.js",
"--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/<id>",
"--wsHeaders={\"Authorization\":\"Bearer YOUR_TOKEN\"}"
]
}
}
}To get the WebSocket endpoint from a running Brave instance, visit http://127.0.0.1:9222/json/version and look for the webSocketDebuggerUrl field.
You can also run brave-devtools-mcp --help (or node /absolute/path/to/brave-devtools-mcp/dist/index.js --help) to see all available configuration options.
brave-devtools-mcp starts a Brave stable channel instance using the following user
data directory:
- Linux / macOS:
$HOME/.cache/brave-devtools-mcp/brave-profile-$CHANNEL - Windows:
%HOMEPATH%/.cache/brave-devtools-mcp/brave-profile-$CHANNEL
The user data directory is not cleared between runs and shared across
all instances of brave-devtools-mcp. Set the isolated option to true
to use a temporary user data dir instead which will be cleared automatically after
the browser is closed.
By default, the Brave DevTools MCP server will start a new Brave instance with a dedicated profile. This might not be ideal in all situations:
- If you would like to maintain the same application state when alternating between manual site testing and agent-driven testing.
- When the MCP needs to sign into a website. Some accounts may prevent sign-in when the browser is controlled via WebDriver (the default launch mechanism for the Brave DevTools MCP server).
- If you're running your LLM inside a sandboxed environment, but you would like to connect to a Brave instance that runs outside the sandbox.
In these cases, start Brave first and let the Brave DevTools MCP server connect to it. There are two ways to do so:
- Automatic connection: best for sharing state between manual and agent-driven testing.
- Manual connection via remote debugging port: best when running inside a sandboxed environment.
Step 1: Set up remote debugging in Brave
In Brave, do the following to set up remote debugging:
- Navigate to
brave://inspect/#remote-debuggingto enable remote debugging. - Follow the dialog UI to allow or disallow incoming debugging connections.
Step 2: Configure Brave DevTools MCP server to automatically connect to a running Brave instance
To connect the brave-devtools-mcp server to the running Brave instance, use
--autoConnect command line argument for the MCP server.
The following code snippet is an example configuration:
{
"mcpServers": {
"brave-devtools": {
"command": "brave-devtools-mcp",
"args": ["--autoConnect", "--channel=stable"]
}
}
}Or, with a local script:
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": [
"/absolute/path/to/brave-devtools-mcp/dist/index.js",
"--autoConnect",
"--channel=stable"
]
}
}
}Step 3: Test your setup
Make sure your browser is running. Open your MCP client and run the following prompt:
Check the performance of https://search.brave.com
Note
The autoConnect option requires the user to start Brave. If the user has multiple active profiles, the MCP server will connect to the default profile (as determined by Brave). The MCP s[...]
The Brave DevTools MCP server will try to connect to your running Brave instance.
You can connect to a running Brave instance by using the --browser-url option. This is useful if you are running the MCP server in a sandboxed environment that does not allow starting a new Brave in[...]
Here is a step-by-step guide on how to connect to a running Brave instance:
Step 1: Configure the MCP client
Add the --browser-url option to your MCP client configuration. The value of this option should be the URL of the running Brave instance. http://127.0.0.1:9222 is a common default.
{
"mcpServers": {
"brave-devtools": {
"command": "brave-devtools-mcp",
"args": [
"--browser-url=http://127.0.0.1:9222"
]
}
}
}Or, with a local script:
{
"mcpServers": {
"brave-devtools": {
"command": "node",
"args": [
"/absolute/path/to/brave-devtools-mcp/dist/index.js",
"--browser-url=http://127.0.0.1:9222"
]
}
}
}Step 2: Start the Brave browser
Warning
Enabling the remote debugging port opens up a debugging port on the running browser instance. Any application on your machine can connect to this port and control the browser. Make sure that you are[...]
Start the Brave browser with the remote debugging port enabled. Make sure to close any running Brave instances before starting a new one with the debugging port enabled. The port number you choose mus[...]
macOS
/Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser --remote-debugging-port=9222 --user-data-dir=/tmp/brave-profile-stableLinux
/usr/bin/brave-browser --remote-debugging-port=9222 --user-data-dir=/tmp/brave-profile-stableWindows
"C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" --remote-debugging-port=9222 --user-data-dir="%TEMP%\brave-profile-stable"Step 3: Test your setup
After configuring the MCP client and starting the Brave browser, you can test your setup by running a simple prompt in your MCP client:
Check the performance of https://search.brave.com
Your MCP client should connect to the running Brave instance and receive a performance report.
If you hit VM-to-host port forwarding issues, see the "Remote debugging between virtual machine (VM) and host fails" section in [docs/troubleshooting.md](./docs/troubleshooting.md#remote-debugging-b[...]
Some MCP clients allow sandboxing the MCP server using macOS Seatbelt or Linux
containers. If sandboxes are enabled, brave-devtools-mcp is not able to start
Brave that requires permissions to create its own sandboxes. As a workaround,
either disable sandboxing for brave-devtools-mcp in your MCP client or use
--browser-url to connect to a Brave instance that you start manually outside
of the MCP client sandbox.