
让任何AI代理通过MCP驱动一个真实的、已登录的浏览器。没有扩展,任何浏览器,任何代理。
概览
让任何AI代理驱动已经登录的真实浏览器。不要用浏览器扩展,任何浏览器,任何会说MCP的代理。 客服很擅长使用网站。问题在于他们所拥有的浏览器。自动化浏览器一开始是空的:没有登录记录,没有历史记录,还有一个许多网站会立刻屏蔽的指纹。浏览器扩展可以解决这个问题,但它会把你绑定在一个浏览器和一个助手上,必须安装并允许使用,而且扩展可能会限制代理能访问的网站。 AnyBrowser 给客服一个普通的浏览器窗口,并配有自己的配置文件。你手动登录一次,会话就会保持。每个配置文件都针对一个网站或用途,比如 Chrome 中的 gmail,所以错误只能进入那个账户。 它支持你已有的 Chromium 浏览器(Chrome、Brave、Edge、Arc、Vivaldi、Opera)或 Playwright 自家的 Chromium,以及任何支持 MCP 的代理主机:Claude Code、Codex、Cursor、Gemini CLI 等。 - 你的代理主持人运营任何一个MCP。
概述(AI 翻译)
让任何AI代理驱动已经登录的真实浏览器。不要用浏览器扩展,任何浏览器,任何会说MCP的代理。
为什么
客服很擅长使用网站。问题在于他们所拥有的浏览器。自动化浏览器一开始是空的:没有登录记录,没有历史记录,还有一个许多网站会立刻屏蔽的指纹。浏览器扩展可以解决这个问题,但它会把你绑定在一个浏览器和一个助手上,必须安装并允许使用,而且扩展可能会限制代理能访问的网站。
AnyBrowser 给代理一个普通的浏览器窗口,带有自己的配置文件。你手动登录一次,会话就会保持。每个配置文件只针对一个网站或目的,比如 gmail-in-chrome,所以错误只能访问那个账户。
它支持你已有的 Chromium 浏览器(Chrome、Brave、Edge、Arc、Vivaldi、Opera)或 Playwright 自家的 Chromium,以及任何支持 MCP 的代理主机:Claude Code、Codex、Cursor、Gemini CLI 等。
它是如何运作的
- 你的代理主机运行
anyb mcp。它在首次使用时启动一个后台守护进程并转发到该守护进程。 - 守护进程拥有所有浏览器。代理会话共享它们,每个会话在自己的标签页中工作。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
anybrowser
Let any AI agent drive a real browser that is already logged in. No browser extension, any browser, any agent that speaks MCP.
Why
Agents are good at using websites. The browsers they are given are the problem. An automation browser starts empty: no logins, no history, and a fingerprint that many sites block on sight. A browser extension fixes that, but it ties you to one browser and one assistant, it has to be installed and allowed, and the extension may limit which sites the agent can touch.
anybrowser gives the agent a normal browser window with its own profile. You log in once, by hand, and the session stays. Each profile is for one site or purpose, such as gmail-in-chrome, so a mistake can only ever reach that one account.
It works with the Chromium browsers you already have (Chrome, Brave, Edge, Arc, Vivaldi, Opera) or Playwright’s own Chromium, and with any agent host that supports MCP: Claude Code, Codex, Cursor, Gemini CLI and more.
How it works
agent session ─┐
agent session ─┼─ anyb mcp ──► anyb daemon ──► one browser per profile
agent session ─┘ (stdio) (one per user) ├─ work-in-chrome
└─ shop-in-brave
- Your agent host runs
anyb mcp. It starts a background daemon on first use and forwards to it. - The daemon owns every browser. Agent sessions share them, and each session works in its own tab.
- The browser tools are Playwright MCP’s, unchanged except that each takes a
profileargument. - A profile’s browser closes after 10 idle minutes, and the daemon exits once nothing is connected. Logins are written to disk before either closes.
- Each profile’s traffic passes through a small proxy inside the daemon, which enforces the allowed-sites list below.
Status
Pre-release, version 0.1. What works: profiles on installed Chromium browsers, login by hand, every Playwright MCP browser tool, shared sessions, idle shutdown, the allowed-sites list, and anyb install for Claude Code.
Not yet: Firefox and WebKit, installed-browser detection outside macOS (Playwright’s Chromium works everywhere), and anyb install for hosts other than Claude Code.
Quick start
You need Node 22.12 or newer.
npm install -g @anybrowser/cli
anyb install
Install it globally: your agent host runs the anyb command, so it has to be on your PATH. anyb install registers the MCP server with Claude Code and copies the agent skill. For any other MCP host, anyb install --print prints a config snippet to paste.
Make a profile and sign in to it once:
anyb profile add work chrome
anyb profile login work-in-chrome https://github.com/login
Sign in in the window that opens. Then open a new agent session and ask it to use the work-in-chrome profile. anyb --help lists every command.
Safety
An agent in a logged-in browser can do real things, so the design limits how far a mistake can reach:
安装
npx playwright install chromium # once, for the browser tests