Principle:A9T9 RPA Extension Connection
Appearance
| Knowledge Sources | |
|---|---|
| Domains | MCP, WebSocket |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Mechanism for establishing and maintaining a WebSocket connection from a browser extension to a local MCP bridge process, with reconnection and settings-driven lifecycle.
Description
Extension Connection is the browser-side management of the WebSocket link to the MCP bridge. The `McpBridgeClient` class handles:
- Connection establishment: opens a WebSocket to `ws://127.0.0.1:{port}`, with optional pairing token for regular installs (dev/test browsers connect without a token)
- Reconnection: exponential backoff reconnection when the bridge is unreachable or the connection drops; the reconnect interval resets on successful connection
- Settings-driven lifecycle: subscribes to the Redux store so enabling/disabling MCP or changing the port in Settings takes effect immediately without a panel reload
- Dev browser detection: dev/test browsers (unpacked extensions, Firefox Developer Edition) are detected and skip the token requirement
- State logging: connection state changes are logged to the Logs tab with an `[MCP]` marker
Usage
Use this principle when a browser extension needs a persistent, self-healing connection to a local process via WebSocket, driven by user settings.
Theoretical Basis
Related Pages
Implemented By
Uses Heuristic
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment