-
Notifications
You must be signed in to change notification settings - Fork 235
[Refactor]: Stagehand MCP becoming the Browserbase MCP #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…and init issues fixed
…tom models in config, session manager migrated to only use stagehand, rm browserbase SDK, remove unnecessary functions
…ics + multi-sessions update in readme
… uses datenow for extra uniqueness
* fix session url bugs * readme small updates + add github workflows to publish + ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the MCP server by removing the old Stagehand-only implementation and introducing a unified Browserbase MCP powered by Stagehand.
- Fully deletes the
stagehand
directory (old MCP implementation). - Adds a new TypeScript-based
src/
directory with updated tool definitions, server setup, and CLI. - Updates branding to “Browserbase MCP” across resources, prompts, and documentation.
Reviewed Changes
Copilot reviewed 66 out of 77 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
stagehand/src/tools.ts | Removed old Stagehand tool definitions. |
stagehand/src/server.ts | Removed legacy Stagehand MCP server logic. |
src/utils.ts | Updated sanitizeMessage signature and added sanitizeForFilePath . |
src/tools/index.ts | Newly exports Browserbase Stagehand tools and multi-session tools. |
src/index.ts | Main MCP server entrypoint using Browserbase and Stagehand. |
src/program.ts | CLI program to start the new MCP server via Stdio or HTTP transports. |
Files not reviewed (2)
- browserbase/package-lock.json: Language not supported
- stagehand/package-lock.json: Language not supported
src/config.ts
Outdated
@@ -55,6 +33,7 @@ const defaultConfig: Config = { | |||
browserHeight: 768, | |||
}, | |||
cookies: undefined, | |||
modelName: "gemini-2.0-flash", // Default Model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to google/gemini-2.0-flash
src/stagehandStore.ts
Outdated
projectId, | ||
modelName: (params.modelName || | ||
config.modelName || | ||
"gemini-2.0-flash") as AvailableModel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
google/gemini-2.0-flash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i had to change it for it to deploy properly since i'm using the AvailableModel enum from the stagehand package.
should i just make a new type file in here for this?
'key in the action template. For example: {"action": "Fill in the password", "variables": {"password": "123456"}}', | ||
), | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we don't call act explicitly because it calls observe under the hood for inference, let me revisit
"author, and publication date from this blog post'. The more specific your instruction, " + | ||
"the better the extraction results will be. Avoid vague instructions like 'get everything' " + | ||
"or 'extract the data'. Instead, be explicit about the exact elements, text, or information you need.", | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: should we add custom schemas as another parameter eventually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted
What
Switching the Browserbase MCP to be purely stagehand based.
To be hosted by smithery.
Stagehand Primitives as tool calls + new tools to run stagehand sessions in parallel.