Skip to content

Commit 4751c0f

Browse files
committed
readme updates + clean up
1 parent 3914d75 commit 4751c0f

File tree

2 files changed

+56
-7
lines changed

2 files changed

+56
-7
lines changed

browserbase/README.md

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ node dist/index.js
2828
```json
2929
{
3030
"mcpServers": {
31-
"playwright": {
31+
"browserbase": {
3232
"url": "http://localhost:8931/sse",
33-
"args" : ["--proxies"],
3433
"env": {
3534
"BROWSERBASE_API_KEY": "",
3635
"BROWSERBASE_PROJECT_ID": ""
@@ -59,20 +58,74 @@ ____
5958

6059
Here are our docs on [Proxies](https://docs.browserbase.com/features/proxies).
6160

61+
To use proxies in STDIO, set the --proxies flag in your MCP Config
6262

63+
```json
64+
{
65+
"mcpServers": {
66+
"playwright": {
67+
"command" : "npx",
68+
"args" : ["@browserbasehq/mcp-server-browserbase", "--proxies"],
69+
"env": {
70+
"BROWSERBASE_API_KEY": "",
71+
"BROWSERBASE_PROJECT_ID": ""
72+
}
73+
}
74+
}
75+
}
76+
77+
```
6378

6479
### Contexts
6580

6681
Here are our docs on [Contexts](https://docs.browserbase.com/features/contexts)
6782

83+
To use proxies in STDIO, set the --proxies flag in your MCP Config
84+
85+
```json
86+
{
87+
"mcpServers": {
88+
"playwright": {
89+
"command" : "npx",
90+
"args" : ["@browserbasehq/mcp-server-browserbase", "--contextId", "<YOUR_CONTEXT_ID>"],
91+
"env": {
92+
"BROWSERBASE_API_KEY": "",
93+
"BROWSERBASE_PROJECT_ID": ""
94+
}
95+
}
96+
}
97+
}
98+
99+
```
68100

69101
### Cookie Injection
70102

71103
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).
72104
73-
You can flag cookies into the MCP by adding
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)
74108
109+
```json
110+
{
111+
"mcpServers": {
112+
"playwright": {
113+
"command" : "npx",
114+
"args" : [
115+
"@browserbasehq/mcp-server-browserbase", "cookies",
116+
"{
117+
COOKIES JSON IN TYPE OF PLAYWRIGHT COOKIES
118+
}"
119+
],
120+
"env": {
121+
"BROWSERBASE_API_KEY": "",
122+
"BROWSERBASE_PROJECT_ID": ""
123+
}
124+
}
125+
}
126+
}
75127
128+
```
76129
77130
## Structure
78131

browserbase/src/sessionManager.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ export async function createNewBrowserSession(
115115
// Add context settings if provided
116116
if (config.context?.contextId) {
117117
sessionOptions.browserSettings = {
118-
viewport: { // better for snapshots
119-
width: 1024,
120-
height: 768,
121-
},
122118
context: {
123119
id: config.context.contextId,
124120
persist: config.context.persist || true, // Default to true if not specified

0 commit comments

Comments
 (0)