Skip to content

Commit b7ec6f6

Browse files
refactor: remove multisession tools, remove prompts sampling, simplif… (#123)
* refactor: remove multisession tools, remove prompts sampling, simplify tool descriptions for better context, add support if google apikey set, latest version of stagehand, remove custom availmodelschema to use stagehand * change all modelnames to just gemini * auto publish to mcp directory + changelog * publish workflow * fix session manager bugs * Update config.d.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fully remove prompts + rebase --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 63b14b0 commit b7ec6f6

32 files changed

+754
-1587
lines changed

.github/workflows/publish-mcp.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish to MCP Registry
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write # Required for OIDC authentication
12+
contents: read
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v5
17+
18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v3
20+
with:
21+
version: 10.12.4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v5
25+
with:
26+
node-version: "lts/*"
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Run tests
32+
run: pnpm test --if-present
33+
34+
- name: Build package
35+
run: pnpm build --if-present
36+
37+
- name: Publish to npm
38+
run: pnpm publish
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
42+
- name: Install MCP Publisher
43+
run: |
44+
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/latest/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
45+
46+
- name: Login to MCP Registry
47+
run: ./mcp-publisher login github-oidc
48+
49+
- name: Publish to MCP Registry
50+
run: ./mcp-publisher publish

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @browserbasehq/mcp-server-browserbase
22

3+
## 2.2.0
4+
5+
### Minor Changes
6+
7+
- Remove multisession tools, remove prompts sampling, simplify tool descriptions for better context, add support if google apikey set, latest version of stagehand, remove custom availmodelschema to use stagehand model type instead.
8+
39
## 2.1.3
410

511
### Patch Changes

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![smithery badge](https://smithery.ai/badge/@browserbasehq/mcp-browserbase)](https://smithery.ai/server/@browserbasehq/mcp-browserbase)
44

5-
![cover](assets/cover-mcp.png)
5+
![cover](assets/cover.png)
66

77
[The Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
88

@@ -19,7 +19,6 @@ This server provides cloud browser automation capabilities using [Browserbase](h
1919
| Model Flexibility | Supports multiple models (OpenAI, Claude, Gemini, and more) |
2020
| Vision Support | Use annotated screenshots for complex DOMs |
2121
| Session Management | Create, manage, and close browser sessions |
22-
| Multi-Session | Run multiple browser sessions in parallel |
2322

2423
## How to Setup
2524

@@ -194,7 +193,7 @@ The Browserbase MCP server accepts the following command-line flags:
194193
| `--cookies [json]` | JSON array of cookies to inject into the browser |
195194
| `--browserWidth <width>` | Browser viewport width (default: 1024) |
196195
| `--browserHeight <height>` | Browser viewport height (default: 768) |
197-
| `--modelName <model>` | The model to use for Stagehand (default: google/gemini-2.0-flash) |
196+
| `--modelName <model>` | The model to use for Stagehand (default: gemini-2.0-flash) |
198197
| `--modelApiKey <key>` | API key for the custom model provider (required when using custom models) |
199198
| `--experimental` | Enable experimental features (default: false) |
200199

@@ -386,13 +385,11 @@ The server provides access to screenshot resources:
386385

387386
- **AI-Powered Automation**: Natural language commands for web interactions
388387
- **Multi-Model Support**: Works with OpenAI, Claude, Gemini, and more
389-
- **Advanced Session Management**: Single and multi-session support for parallel browser automation
390388
- **Screenshot Capture**: Full-page and element-specific screenshots
391389
- **Data Extraction**: Intelligent content extraction from web pages
392390
- **Proxy Support**: Enterprise-grade proxy capabilities
393391
- **Stealth Mode**: Advanced anti-detection features
394392
- **Context Persistence**: Maintain authentication and state across sessions
395-
- **Parallel Workflows**: Run multiple browser sessions simultaneously for complex automation tasks
396393

397394
For more information about the Model Context Protocol, visit:
398395

assets/browserbase-demo.png

-471 KB
Binary file not shown.

assets/cover-mcp.png

-572 KB
Binary file not shown.

assets/session.png

-471 KB
Binary file not shown.

config.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Cookie } from "playwright-core";
2-
import type { AvailableModelSchema } from "./src/types/models.js";
2+
import type { AvailableModelSchema } from "@browserbasehq/stagehand";
33

44
export type Config = {
55
/**
@@ -96,12 +96,12 @@ export type Config = {
9696
* The Model that Stagehand uses
9797
* Available models: OpenAI, Claude, Gemini, Cerebras, Groq, and other providers
9898
*
99-
* @default "google/gemini-2.0-flash"
99+
* @default "gemini-2.0-flash"
100100
*/
101-
modelName?: AvailableModelSchema;
101+
modelName?: z.infer<typeof AvailableModelSchema>;
102102
/**
103103
* API key for the custom model provider
104-
* Required when using a model other than the default google/gemini-2.0-flash
104+
* Required when using a model other than the default gemini-2.0-flash
105105
*/
106106
modelApiKey?: string;
107107
/**

evals/mcp-eval-basic.config.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,6 @@
7676
"browserbase_session_close"
7777
]
7878
},
79-
{
80-
"name": "multi-session-test",
81-
"description": "Test multi-session browser management",
82-
"steps": [
83-
{
84-
"user": "Create a multi-session browser named 'test-session', list all sessions, navigate to https://example.com in that session, and close the session",
85-
"expectedState": "closed"
86-
}
87-
],
88-
"expectTools": [
89-
"multi_browserbase_stagehand_session_create",
90-
"multi_browserbase_stagehand_session_list",
91-
"multi_browserbase_stagehand_navigate_session",
92-
"multi_browserbase_stagehand_session_close"
93-
]
94-
},
9579
{
9680
"name": "form-interaction-test",
9781
"description": "Test form filling and submission capabilities",

evals/mcp-eval-minimal.config.json

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,6 @@
5252
"browserbase_session_close"
5353
]
5454
},
55-
{
56-
"name": "smoke-test-multi-session",
57-
"description": "Quick test to verify multi-session functionality",
58-
"steps": [
59-
{
60-
"user": "Create a browser session named 'test-session'",
61-
"expectedState": "session created"
62-
},
63-
{
64-
"user": "List active sessions",
65-
"expectedState": "test-session"
66-
},
67-
{
68-
"user": "Close the test session",
69-
"expectedState": "closed session"
70-
}
71-
],
72-
"expectTools": [
73-
"multi_browserbase_stagehand_session_create",
74-
"multi_browserbase_stagehand_session_list",
75-
"multi_browserbase_stagehand_session_close"
76-
]
77-
},
7855
{
7956
"name": "smoke-test-url-tools",
8057
"description": "Quick test to verify URL retrieval tools work",

evals/mcp-eval.config.json

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,6 @@
7676
"browserbase_session_close"
7777
]
7878
},
79-
{
80-
"name": "multi-session-test",
81-
"description": "Test multi-session browser management",
82-
"steps": [
83-
{
84-
"user": "Create a multi-session browser named 'test-session', list all sessions, navigate to https://example.com in that session, and close the session",
85-
"expectedState": "closed"
86-
}
87-
],
88-
"expectTools": [
89-
"multi_browserbase_stagehand_session_create",
90-
"multi_browserbase_stagehand_session_list",
91-
"multi_browserbase_stagehand_navigate_session",
92-
"multi_browserbase_stagehand_session_close"
93-
]
94-
},
9579
{
9680
"name": "form-interaction-test",
9781
"description": "Test form filling and submission capabilities",
@@ -121,22 +105,6 @@
121105
"browserbase_session_create",
122106
"browserbase_stagehand_navigate"
123107
]
124-
},
125-
{
126-
"name": "url-retrieval-test",
127-
"description": "Test URL retrieval functionality",
128-
"steps": [
129-
{
130-
"user": "Create a browser session, navigate to https://example.com, get the current URL to verify navigation, and close the session",
131-
"expectedState": "https://example.com"
132-
}
133-
],
134-
"expectTools": [
135-
"browserbase_session_create",
136-
"browserbase_stagehand_navigate",
137-
"browserbase_stagehand_get_url",
138-
"browserbase_session_close"
139-
]
140108
}
141109
]
142110
}

0 commit comments

Comments
 (0)