feat(integrations): use Pi's built-in MCP support
VI
11h ago+517+517+012345678901234567890123456789-894-894-012345678901234567890123456789
Why
Pi now supports MCP directly, making the custom bridge and native extension unnecessary.
What
Upgrade Pi to 1.4.0 and use built-in MCP for CLI and eval sessions. Preserve browser state, sequential calls, screenshot evidence, and cleanup. Update setup docs.
How
CLI/SDK → Pi MCP → Stagehand facade → persistent browser
59 tests, typechecks, formatting, and docs checks pass.
Summary by cubic
Replaces the custom Pi extension and MCP bridge with Pi 1.4.0's built-in MCP support for CLI and eval sessions, removing the @modelcontextprotocol/sdk dependency. Browser state, sequential calls, screenshot evidence, and cleanup behavior are preserved.
Migration
- Remove any previously installed native Stagehand Pi extension before enabling the MCP mount to avoid duplicate browser tools.
- Mount the server via a project
.pi/mcp.jsonorpi mcp addwithdirectexposure; the oldpi installsetup is no longer used.
Bug Fixes
- Eval trajectories now read browser output from the native MCP wire result instead of Pi's routing metadata.