Browser MCP gives AI agents a browser-level Chrome control plane through MCP. It changes Chrome state with extension APIs—never by dragging tabs, stealing focus, or simulating mouse and keyboard input.
The MVP exposes four tools:
tabs_list: list tabs in one or all Chrome windowswindows_list: list Chrome windowstabs_move: move one tab within or between windowstabs_reorder: set a window's complete tab order while preserving the active tab and tab groups
AI client → stdio MCP server → local Unix socket → Chrome native host → extension → chrome.* APIs
The Unix socket is local to the current OS user. There is no localhost TCP/HTTP server, page automation, DevTools session, new Chrome profile, or generic chrome.call escape hatch.
- Bun 1.2+
- Chrome 105+ on macOS or Linux
bun install
bun run check
bun run build- Open
chrome://extensions. - Enable Developer mode.
- Click Load unpacked and choose this repository's
extensiondirectory. - Copy the extension ID shown by Chrome.
- Register the native messaging host:
bun run register-host --extension-id <extension-id>- Reload the extension. Its popup should say Native host connected.
- Print the MCP client configuration:
bun run print-mcp-configAdd the resulting browser server entry to any stdio-compatible MCP client and restart that client.
The registration command also supports --browser chrome-beta|chromium|brave|edge. Run it from the final repository location because the native-host registration contains absolute paths.
tabs_reorder accepts an exact permutation of every tab ID in one window. It validates the entire request before changing Chrome:
- pinned tabs must remain before unpinned tabs;
- members of an existing tab group must remain contiguous;
- group membership is preserved by moving groups as units;
- the active tab is checked before and after the operation;
- no call activates a tab or focuses a window.
Moving an active tab to another window with tabs_move can still cause Chrome itself to select a replacement in the source window. Browser MCP never calls tabs.update({ active: true }) or windows.update({ focused: true }) implicitly.
nativeMessaging: private extension ↔ native-host transporttabs: tab URLs/titles and tab operationstabGroups: preserve and move existing groups as units during reorder
Additional Chrome surfaces such as bookmarks, history, sessions, downloads, cookies, or extension management are intentionally not exposed yet. They should be added as explicit, validated MCP tools with their own permissions and risk classification.
bun run build # bundle extension scripts
bun run typecheck # strict TypeScript
bun test # Bun testsAfter rebuilding, click Reload for Browser MCP on chrome://extensions.
Native-host installation is implemented for macOS and Linux. Windows needs a small installer addition because Chrome registers native hosts there through the registry rather than only a manifest directory.