Skip to content

[STG-1837] Document MCP start sessionId support#2017

Merged
monadoid merged 1 commit intomainfrom
STG-1837
Apr 24, 2026
Merged

[STG-1837] Document MCP start sessionId support#2017
monadoid merged 1 commit intomainfrom
STG-1837

Conversation

@monadoid
Copy link
Copy Markdown
Contributor

@monadoid monadoid commented Apr 21, 2026

why

The v3 MCP docs now need to describe the hosted server behavior where start can attach to an existing Browserbase session via an optional sessionId.

what changed

  • Updated the MCP setup and tools docs to document optional start.sessionId.
  • Clarified that omitting sessionId creates a new Browserbase session.
  • Added a patch changeset for @browserbasehq/stagehand-docs.

test plan

  • pnpm exec prettier --check packages/docs/v3/integrations/mcp/setup.mdx packages/docs/v3/integrations/mcp/tools.mdx

Summary by cubic

Added docs for optional sessionId on MCP start to attach to an existing Browserbase session; omitting it creates a new session. Addresses STG-1837 and publishes a patch to @browserbasehq/stagehand-docs.

Written for commit edc7cbd. Summary will update on new commits. Review in cubic

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 21, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
stagehand 🟢 Ready View Preview Apr 21, 2026, 8:21 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

🦋 Changeset detected

Latest commit: edc7cbd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@browserbasehq/stagehand-docs Patch

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

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant Host as MCP Host (e.g. Claude)
    participant MCP as Stagehand MCP Server
    participant BB as Browserbase Platform

    Note over Host, BB: MCP Session Initialization Flow

    Host->>MCP: callTool("start", { sessionId? })
    
    alt NEW: sessionId is provided
        MCP->>BB: CHANGED: Attach to existing session (sessionId)
        BB-->>MCP: Session Context
    else sessionId is omitted
        MCP->>BB: Create new session
        BB-->>MCP: New Session ID & Context
    end

    MCP->>MCP: Set session as active for current transport
    
    Note right of MCP: Active session is used for<br/>future calls (navigate, act, etc.)

    MCP-->>Host: return { sessionId }
Loading

@monadoid monadoid closed this Apr 22, 2026
@monadoid monadoid reopened this Apr 23, 2026
@monadoid monadoid merged commit 6b9b46d into main Apr 24, 2026
45 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants