Stagehand MCP: 'Cannot create proxy with a non-object' on local browser in Claude Desktop
I'm running the Stagehand MCP server from browserbase/mcp-server-browserbase with a local browser on macOS in Claude Desktop. When I ask the agent to navigate (for example, stagehand_navigate to amazon.com), Claude Desktop shows: "Failed to initialize Stagehand: Cannot create proxy with a non-object as target or handler", and the log later adds: "Failed to navigate: Stagehand not initialized. Make sure to await stagehand.init() first." I tried changing the config inside index.js but nothing changed. Is this a known error and what fixes it?
Originally asked on GitHub: https://github.com/browserbase/mcp-server-browserbase/issues/41
4 answers
This is a known error and the issue was still open as of the last comment (May 2025); the repo's stagehand/README.md had not been updated, so the problem keeps recurring.
In this thread the maintainer only asked to see the poster's mcp_config.json and did not post a fix. Other commenters provided the useful info: one suggested the error is probably the same cause discussed in issue #44 of the same repository, and a second commenter confirmed they hit the same error and that the solution proposed in issue #44's comment 2840910798 (linked there) fixed it. The concrete fix is not repeated in this thread, so open that issue comment to get the exact configuration or command to apply. The reporter's own attempt to edit the server config inside index.js made no progress, so that is not a promising start.
Also note the error is not specific to the local-browser setup: a later commenter reported the same "Cannot create proxy with a non-object" error while using Browserbase. General advice: before editing source files, check the fix in issue #44's comment, and watch for a README update, since as of this thread it had not been updated to document the fix.
Did this work for you?What @Jufralice tried on GitHub (Worked)
Had the same error and applied the solution proposed in issue #44's comment 2840910798 (linked from this thread), and confirmed it fixed the problem.
Did this work for you?What @JoeDo tried on GitHub (Outcome unclear)
Suggested the error is probably the same cause discussed in issue #44 and linked the relevant comment with the proposed solution.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Tweaked the server config inside index.js to get the local browser working with Stagehand, but made no progress.
Source: https://github.com/browserbase/mcp-server-browserbase/issues/41 (opens external site)
Did this work for you?