feat: publish the Stagehand code-mode MCP - #2644
Draft
shrey150 wants to merge 2 commits into
Draft
Conversation
🦋 Changeset detectedLatest commit: 54302fc The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The code-mode MCP needs one stable distribution contract before sandbox and framework integrations can stop cloning the monorepo or depending on internal build paths.
Public contract
@browserbasehq/stagehand-codemodestagehand-codemodeSKILL.mdandREFERENCE.mdThe executable exposes exactly one stateful MCP tool,
code_execute, and reserves stdout for MCP protocol frames.Release wiring
changeset publishpublint, a shebang/executable-mode check, and a package-specific clean-install smokemainChangesets workflow; this PR does not perform an ad hoc publishThe package is already versioned 4.0.0 alongside the unpublished Stagehand V4 packages. There is no changeset in this PR: once the V4 stack reaches
main, the normal release workflow can publish the previously unpublished 4.0.0 artifacts together.Security
stagehand-codemodeexecutes arbitrary JavaScript with its process permissions. It is not a sandbox. The README puts this warning before the installation examples and requires a separate isolation boundary for model-generated or otherwise untrusted code.Verification
publintcode_executenpm publish --dry-run --jsonpnpm checkThe configured registry returned 404 for both
@browserbasehq/stagehand-codemodeand@browserbasehq/stagehand@4.0.0before this PR was opened.Summary by cubic
Publish the Stagehand code‑mode MCP as a public npm package
@browserbasehq/stagehand-codemodewith thestagehand-codemodeexecutable and a stable distribution contract. This unblocks STG‑2765 by giving agent integrations a versioned MCP tool they can run without cloning the repo.New Features
@browserbasehq/stagehand-codemodewith executablestagehand-codemode(stdio MCP server exposing one tool:code_execute; stdout reserved for MCP frames).SKILL.mdandREFERENCE.mdas package assets; internal JS APIs and the in‑process executor are not public.publint; package smoke tests in CI (local Chrome and Browserbase).Migration
npx -y @browserbasehq/stagehand-codemode@4.0.0; setSTAGEHAND_BROWSER=browserbase|localand relevant env (BROWSERBASE_API_KEY,BROWSERBASE_PROJECT_ID,CHROME_PATH).@browserbasehq/stagehand-integrations/codemode; run the executable instead. Asset paths:@browserbasehq/stagehand-codemode/SKILL.mdand@browserbasehq/stagehand-codemode/REFERENCE.md.Written for commit 54302fc. Summary will update on new commits.