You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why would you need to inject cookies? Our context API currently works on persistent cookies, but not session cookies. So sometimes our persistent auth might not work (we're working hard to add this functionality).
104
+
105
+
You can flag cookies into the MCP by adding the cookies.json to your MCP Config.
106
+
107
+
To use proxies in STDIO, set the --proxies flag in your MCP Config. Your cookies JSON must be in the type of [Playwright Cookies](https://playwright.dev/docs/api/class-browsercontext#browser-context-cookies)
Copy file name to clipboardExpand all lines: browserbase/src/program.ts
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,16 @@ import packageJSON from '../package.json' with { type: 'json' };
12
12
program
13
13
.version('Version '+packageJSON.version)
14
14
.name(packageJSON.name)
15
+
.option('--browserbaseApiKey <key>','The Browserbase API Key to use')
16
+
.option('--browserbaseProjectId <id>','The Browserbase Project ID to use')
15
17
.option('--proxies','Use Browserbase proxies.')
16
-
.option('--context <contextId>','Browserbase Context to use.')
18
+
.option('--contextId <contextId>','Browserbase Context ID to use.')
19
+
.option('--persist [boolean]','Whether to persist the Browserbase context',true)
17
20
.option('--port <port>','Port to listen on for SSE transport.')
18
21
.option('--host <host>','Host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.')
22
+
.option('--cookies [json]','JSON array of cookies to inject into the browser. Format: [{"name":"cookie1","value":"val1","domain":"example.com"}, ...]')
23
+
.option('--browserWidth <width>','Browser width to use for the browser.')
24
+
.option('--browserHeight <height>','Browser height to use for the browser.')
0 commit comments