Skip to content

Commit f595c2e

Browse files
authored
[Feature]: added flag for advanced stealth (#70)
* added advanced stealth flag + upgrade to latest version of sdk * change to undef
1 parent f495f47 commit f595c2e

File tree

7 files changed

+42
-8
lines changed

7 files changed

+42
-8
lines changed

browserbase/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ The Browserbase MCP server accepts the following command-line flags:
103103
| `--browserbaseApiKey <key>` | Your Browserbase API key for authentication |
104104
| `--browserbaseProjectId <id>` | Your Browserbase project ID |
105105
| `--proxies` | Enable Browserbase proxies for the session |
106+
| `--advancedStealth` | Enable Browserbase Advanced Stealth (Only for Scale Plan Users) |
106107
| `--contextId <contextId>` | Specify a Browserbase Context ID to use |
107108
| `--persist [boolean]` | Whether to persist the Browserbase context (default: true) |
108109
| `--port <port>` | Port to listen on for HTTP/SSE transport |
@@ -141,6 +142,26 @@ To use proxies in STDIO, set the --proxies flag in your MCP Config:
141142
}
142143
}
143144
```
145+
### Advanced Stealth
146+
147+
Here are our docs on [Advanced Stealth](https://docs.browserbase.com/features/stealth-mode#advanced-stealth-mode).
148+
149+
To use proxies in STDIO, set the --advancedStealth flag in your MCP Config:
150+
151+
```json
152+
{
153+
"mcpServers": {
154+
"browserbase": {
155+
"command" : "npx",
156+
"args" : ["@browserbasehq/mcp", "--advancedStealth"],
157+
"env": {
158+
"BROWSERBASE_API_KEY": "",
159+
"BROWSERBASE_PROJECT_ID": ""
160+
}
161+
}
162+
}
163+
}
164+
```
144165

145166
### Contexts
146167

browserbase/config.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export type Config = {
1616
* @default false
1717
*/
1818
proxies?: boolean;
19+
/**
20+
* Use advanced stealth mode. Only available to Browserbase Scale Plan users.
21+
*
22+
* @default false
23+
*/
24+
advancedStealth?: boolean;
1925
/**
2026
* Potential Browserbase Context to use
2127
* Would be a context ID

browserbase/package-lock.json

+9-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

browserbase/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434
},
3535
"dependencies": {
36-
"@browserbasehq/sdk": "^2.0.0",
36+
"@browserbasehq/sdk": "^2.5.0",
3737
"@modelcontextprotocol/sdk": "^1.10.2",
3838
"@types/yaml": "^1.9.6",
3939
"commander": "^13.1.0",

browserbase/src/config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface Config {
1414
host?: string;
1515
};
1616
proxies?: boolean;
17+
advancedStealth?: boolean;
1718
context?: {
1819
contextId?: string;
1920
persist?: boolean;
@@ -30,6 +31,7 @@ export type CLIOptions = {
3031
browserbaseApiKey?: string;
3132
browserbaseProjectId?: string;
3233
proxies?: boolean;
34+
advancedStealth?: boolean;
3335
contextId?: string;
3436
persist?: boolean;
3537
port?: number;
@@ -100,6 +102,7 @@ export async function configFromCLIOptions(cliOptions: CLIOptions): Promise<Conf
100102
browserWidth: cliOptions.browserWidth,
101103
browserHeight: cliOptions.browserHeight,
102104
},
105+
advancedStealth: cliOptions.advancedStealth,
103106
cookies: cliOptions.cookies,
104107
};
105108
}

browserbase/src/program.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ program
1515
.option('--browserbaseApiKey <key>', 'The Browserbase API Key to use')
1616
.option('--browserbaseProjectId <id>', 'The Browserbase Project ID to use')
1717
.option('--proxies', 'Use Browserbase proxies.')
18+
.option('--advancedStealth', 'Use advanced stealth mode. Only available to Browserbase Scale Plan users.')
1819
.option('--contextId <contextId>', 'Browserbase Context ID to use.')
1920
.option('--persist [boolean]', 'Whether to persist the Browserbase context', true)
2021
.option('--port <port>', 'Port to listen on for SSE transport.')

browserbase/src/sessionManager.ts

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export async function createNewBrowserSession(
102102
id: config.context?.contextId,
103103
persist: config.context?.persist ?? true,
104104
} : undefined,
105+
advancedStealth: config.advancedStealth ?? undefined,
105106
}
106107
};
107108

0 commit comments

Comments
 (0)