Conversation
|
There was a problem hiding this comment.
4 issues found and verified against the latest diff
Confidence score: 3/5
packages/docs/v4/integrations/fx.mdxno longer explains thatmcp_stagehand_runexecutes model-authored JavaScript in the browser, which could cause users to miss the local-browser security boundary; restore the Browserbase warning and security-boundary link.packages/docs/v4/integrations/fx.mdxleads with fx’s integration mechanism rather than the user workflow, making the Stagehand setup harder to follow; start with connecting fx to a persistent Stagehand browser before describing the built-in MCP client.- The unreleased source-build instructions in
packages/docs/v4/integrations/fx.mdxinvokepnpmwithout establishing it as a prerequisite, which can block users following that path; require the repository-pinnedpnpm 11.10.0. packages/docs/v4/integrations/fx.mdxdoes not identify the launched process as the Stagehand facade MCP server, making its stdio tools and diagnostics harder to match; add that process name.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/docs/v4/integrations/fx.mdx">
<violation number="1" location="packages/docs/v4/integrations/fx.mdx:6">
P3: Name the launched process the Stagehand facade MCP server so users can match this stdio runtime to its tools and diagnostics.</violation>
<violation number="2" location="packages/docs/v4/integrations/fx.mdx:6">
P2: Custom agent: **Stagehand docs prose guide**
Lead with what the reader can do before explaining fx's integration mechanism. Start with connecting fx to a persistent Stagehand browser, then describe the built-in MCP client and `/mcp add` setup.</violation>
<violation number="3" location="packages/docs/v4/integrations/fx.mdx:40">
P2: When fx uses `mcp_stagehand_run`, model-authored JavaScript runs in the browser, but this guide no longer warns about the local-browser security boundary. Restore the Browserbase warning and security-boundary link before users apply this setup to untrusted tasks.</violation>
<violation number="4" location="packages/docs/v4/integrations/fx.mdx:92">
P2: When users choose the unreleased source build, this section invokes `pnpm` without requiring or installing it. Add the repository-pinned `pnpm 11.10.0` prerequisite for the source path.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| ```bash | ||
| git clone https://github.com/browserbase/stagehand.git | ||
| cd stagehand | ||
| pnpm install --frozen-lockfile |
There was a problem hiding this comment.
P2: When users choose the unreleased source build, this section invokes pnpm without requiring or installing it. Add the repository-pinned pnpm 11.10.0 prerequisite for the source path.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/docs/v4/integrations/fx.mdx, line 92:
<comment>When users choose the unreleased source build, this section invokes `pnpm` without requiring or installing it. Add the repository-pinned `pnpm 11.10.0` prerequisite for the source path.</comment>
<file context>
@@ -1,162 +1,110 @@
+```bash
+git clone https://github.com/browserbase/stagehand.git
+cd stagehand
+pnpm install --frozen-lockfile
+pnpm exec turbo run build --filter @browserbasehq/stagehand-integrations
</file context>
</details>
| </Steps> | ||
|
|
||
| ## Tool discovery | ||
| The browser launches on the first tool call and persists across subsequent calls. fx can discover the tools through `capability_search`; direct tool selection remains available for the exact names `mcp_stagehand_run`, `mcp_stagehand_snapshot`, and `mcp_stagehand_screenshot`. |
There was a problem hiding this comment.
P2: When fx uses mcp_stagehand_run, model-authored JavaScript runs in the browser, but this guide no longer warns about the local-browser security boundary. Restore the Browserbase warning and security-boundary link before users apply this setup to untrusted tasks.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/docs/v4/integrations/fx.mdx, line 40:
<comment>When fx uses `mcp_stagehand_run`, model-authored JavaScript runs in the browser, but this guide no longer warns about the local-browser security boundary. Restore the Browserbase warning and security-boundary link before users apply this setup to untrusted tasks.</comment>
<file context>
@@ -1,162 +1,110 @@
-</Steps>
-## Tool discovery
+The browser launches on the first tool call and persists across subsequent calls. fx can discover the tools through `capability_search`; direct tool selection remains available for the exact names `mcp_stagehand_run`, `mcp_stagehand_snapshot`, and `mcp_stagehand_screenshot`.
-fx prefixes MCP tool names with the server name. The Stagehand tools appear as:
</file context>
| The browser launches on the first tool call and persists across subsequent calls. fx can discover the tools through `capability_search`; direct tool selection remains available for the exact names `mcp_stagehand_run`, `mcp_stagehand_snapshot`, and `mcp_stagehand_screenshot`. | |
| The browser launches on the first tool call and persists across subsequent calls. fx can discover the tools through `capability_search`; direct tool selection remains available for the exact names `mcp_stagehand_run`, `mcp_stagehand_snapshot`, and `mcp_stagehand_screenshot`. | |
| <Warning> | |
| `mcp_stagehand_run` executes model-authored JavaScript in the browser. Use Browserbase for untrusted tasks and review the [integration security boundary](/v4/integrations/overview#security-boundary). | |
| </Warning> |
| --- | ||
|
|
||
| The fx integration connects the [fx coding agent](https://fx.sh) to the Stagehand facade MCP server over MCP/stdio. One MCP server process owns the browser, so navigation, authentication, and page state survive across tool calls. | ||
| fx’s supported integration mechanism is its [built-in MCP client](https://fx.sh/docs/capabilities/mcp). Register the Stagehand server with `/mcp add`; no separate fx marketplace plugin is needed. |
There was a problem hiding this comment.
P2: Custom agent: Stagehand docs prose guide
Lead with what the reader can do before explaining fx's integration mechanism. Start with connecting fx to a persistent Stagehand browser, then describe the built-in MCP client and /mcp add setup.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/docs/v4/integrations/fx.mdx, line 6:
<comment>Lead with what the reader can do before explaining fx's integration mechanism. Start with connecting fx to a persistent Stagehand browser, then describe the built-in MCP client and `/mcp add` setup.</comment>
<file context>
@@ -1,162 +1,110 @@
---
-The fx integration connects the [fx coding agent](https://fx.sh) to the Stagehand facade MCP server over MCP/stdio. One MCP server process owns the browser, so navigation, authentication, and page state survive across tool calls.
+fx’s supported integration mechanism is its [built-in MCP client](https://fx.sh/docs/capabilities/mcp). Register the Stagehand server with `/mcp add`; no separate fx marketplace plugin is needed.
<Note>
</file context>
| fx’s supported integration mechanism is its [built-in MCP client](https://fx.sh/docs/capabilities/mcp). Register the Stagehand server with `/mcp add`; no separate fx marketplace plugin is needed. | |
| Connect fx to a persistent Stagehand browser through its [built-in MCP client](https://fx.sh/docs/capabilities/mcp). Register the Stagehand server with `/mcp add`; no separate fx marketplace plugin is needed. |
| --- | ||
|
|
||
| The fx integration connects the [fx coding agent](https://fx.sh) to the Stagehand facade MCP server over MCP/stdio. One MCP server process owns the browser, so navigation, authentication, and page state survive across tool calls. | ||
| fx’s supported integration mechanism is its [built-in MCP client](https://fx.sh/docs/capabilities/mcp). Register the Stagehand server with `/mcp add`; no separate fx marketplace plugin is needed. |
There was a problem hiding this comment.
P3: Name the launched process the Stagehand facade MCP server so users can match this stdio runtime to its tools and diagnostics.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/docs/v4/integrations/fx.mdx, line 6:
<comment>Name the launched process the Stagehand facade MCP server so users can match this stdio runtime to its tools and diagnostics.</comment>
<file context>
@@ -1,162 +1,110 @@
---
-The fx integration connects the [fx coding agent](https://fx.sh) to the Stagehand facade MCP server over MCP/stdio. One MCP server process owns the browser, so navigation, authentication, and page state survive across tool calls.
+fx’s supported integration mechanism is its [built-in MCP client](https://fx.sh/docs/capabilities/mcp). Register the Stagehand server with `/mcp add`; no separate fx marketplace plugin is needed.
<Note>
</file context>
| fx’s supported integration mechanism is its [built-in MCP client](https://fx.sh/docs/capabilities/mcp). Register the Stagehand server with `/mcp add`; no separate fx marketplace plugin is needed. | |
| fx’s supported integration mechanism is its [built-in MCP client](https://fx.sh/docs/capabilities/mcp). Register the Stagehand facade MCP server over stdio with `/mcp add`; no separate fx marketplace plugin is needed. |
There was a problem hiding this comment.
3 existing issues remain and 1 new issue found across 3 files
Confidence score: 4/5
packages/docs/v4/integrations/fx.mdxhas several documentation correctness and onboarding gaps: the integration’s capability is not led with clearly, the local-Chrome default is wrong whenBROWSERBASE_API_KEYis set, and the source fallback omits the pnpm prerequisite, which could mislead users or make setup fail—clarify the selection logic and add the pinned pnpm install prerequisite.packages/integrations/fx/README.mdcalls the launched processStagehand, which could blur the distinction between the stdio facade and the Stagehand SDK—rename it toStagehand facade MCP server.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/docs/v4/integrations/fx.mdx">
<violation number="1" location="packages/docs/v4/integrations/fx.mdx:44">
P2: When `BROWSERBASE_API_KEY` is exported without `STAGEHAND_BROWSER`, the facade selects Browserbase, so this default statement is incorrect. Describe local Chrome as the default only when the Browserbase key is unset.</violation>
</file>
Architecture diagram
sequenceDiagram
participant User as User
participant FX as fx CLI
participant MCPMgr as fx MCP Manager
participant Profile as ~/.fx/mcp.json
participant NPM as npm registry
participant SMMCP as @browserbasehq/stagehand-mcp
participant Chrome as Chrome/Browserbase
Note over User,MCPMgr: Current fx MCP setup flow
User->>FX: /mcp add stagehand npx -y @browserbasehq/stagehand-mcp@0.1.0
FX->>MCPMgr: addMCP (admin command)
MCPMgr->>Profile: Write server config with startup_timeout_ms and operation_timeout_ms
MCPMgr-->>FX: Confirm server added and reloading
FX->>MCPMgr: Load MCP profile
MCPMgr->>NPM: Fetch @browserbasehq/stagehand-mcp@0.1.0
NPM-->>MCPMgr: Package binary
MCPMgr->>SMMCP: Spawn MCP server (stdio)
Note over FX,SMMCP: Browser session persistence
User->>FX: Ask to browse https://example.com
FX->>SMMCP: mcp_stagehand_run (page.goto)
SMMCP->>Chrome: Launch browser (first tool call)
Chrome-->>SMMCP: Page content
SMMCP-->>FX: Result with snapshot ID
Note over User,FX: Environment and trust flow
alt Current fx (env merge)
FX->>FX: Inherit parent env + merge environment object
FX-->>User: Prompt for project .mcp.json trust
else Legacy v0.0.3 (env replace)
FX->>FX: Replace env entirely (omit environment object)
end
Note over User,FX: Screenshot size constraint
User->>FX: Request screenshot
FX->>SMMCP: mcp_stagehand_screenshot
SMMCP->>SMMCP: Apply max-screenshot-base64-bytes=60000
alt Image fits frame limit
SMMCP-->>FX: JPEG at quality 40
else Too large (progressive retries)
SMMCP->>SMMCP: Retry with smaller viewport JPEG
alt Still too large
SMMCP-->>FX: Tool error (session preserved)
end
end
FX-->>User: Display result
Requires human review: Auto-approval blocked because this review re-detected 3 unresolved issues already reported by Cubic.
Re-trigger cubic
| - `mcp_stagehand_run` | ||
| - `mcp_stagehand_snapshot` | ||
| - `mcp_stagehand_screenshot` | ||
| Local Chrome is the default. To use Browserbase, export its credential before starting fx: |
There was a problem hiding this comment.
P2: When BROWSERBASE_API_KEY is exported without STAGEHAND_BROWSER, the facade selects Browserbase, so this default statement is incorrect. Describe local Chrome as the default only when the Browserbase key is unset.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/docs/v4/integrations/fx.mdx, line 44:
<comment>When `BROWSERBASE_API_KEY` is exported without `STAGEHAND_BROWSER`, the facade selects Browserbase, so this default statement is incorrect. Describe local Chrome as the default only when the Browserbase key is unset.</comment>
<file context>
@@ -1,162 +1,110 @@
-- `mcp_stagehand_run`
-- `mcp_stagehand_snapshot`
-- `mcp_stagehand_screenshot`
+Local Chrome is the default. To use Browserbase, export its credential before starting fx:
-fx v0.0.3 may return no matches for this server from `mcp_search_tools`. The integration's `AGENTS.md` and Stagehand skill tell fx to select these exact names directly. Run fx from `packages/integrations/fx` so it loads that guidance.
</file context>
| Local Chrome is the default. To use Browserbase, export its credential before starting fx: | |
| Local Chrome is used when `BROWSERBASE_API_KEY` is unset. To use Browserbase, export its credential before starting fx: |
The fx integration already has a supported host tool API: built-in MCP management. Lead the public guide with that integration route and a portable configuration for an existing application, instead of requiring a full Stagehand checkout.
This is an SDK/MCP integration, not a separate marketplace plugin. The source example remains available. Update the profile template and document the current
/mcp addcommand, environment merging, project trust, and the legacy v0.0.3 differences.Stacked on #2971 for the shared
@browserbasehq/stagehand-mcppackage. The first 0.1.0 release is required before the portable npm command is available; the guide explicitly identifies this prerequisite.E2E Test Matrix
Documentation validation: a combined snapshot of all nine updated integration guides passed
mint validateandmint broken-links --check-anchors --check-redirects --check-snippets.