Inspect the page registry
Open the browser console and check the active context:Browser console
AbortSignal remains active. Duplicate names reject registration.
Use Chrome’s WebMCP DevTools
panel to inspect schemas, invoke
tools, and review invocation history. For agent-driven browser inspection, use the upstream Chrome
DevTools MCP WebMCP tool
reference.
Restore MCP-B initialization
Ifdocument.modelContext is undefined, import the runtime before code registers tools:
main.ts
main.ts
Browser console
@mcp-b/global replaces the polyfill context with BrowserMcpServer. To check that runtime, add
@mcp-b/webmcp-ts-sdk as a direct dependency and use its guard:
runtime-check.ts
Trace missing relay tools
Runwebmcp_list_sources before webmcp_list_tools. This separates a missing browser connection
from an empty page registry.
Keep the relay bound to loopback. Restrict
--widget-origin when a specific site should publish
tools. See Connect desktop agents with the local
relay for configuration and security boundaries.
Fix iframe and tab transport origins
For@mcp-b/transports, configure both sides of the connection:
- Set client
targetOriginto the exact origin of the receiving window. - Add the sending window’s exact origin to server
allowedOrigins. - Use the same
channelIdon both transports. - Confirm the iframe has loaded before the parent connects.
targetOrigin="*", which disables
parent-side origin validation; use it only with the additional controls described in Bridge tools
across iframes. See Transports and
bridges for the trust boundary.
Hand off browser and agent failures
- For invalid or lossy schemas, run the Lighthouse WebMCP schema validity audit, then check Use input schemas and structured output for MCP-B adapters.
- If a tool works in isolation but an agent selects it incorrectly, use Chrome’s WebMCP evals guidance.
- For current native browser requirements and limitations, use the Chrome WebMCP documentation instead of copying version or flag instructions into your project.
