Real Browser

io.github.ofershap由 GitHub 帳號 ofershap 發布v1.2.1更新於 Oct 24, 2026

MCP server + Chrome extension for AI browser control with real sessions.

已驗證STDIO僅桌面瀏覽器自動化開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器加 Chrome 擴充功能,讓 AI 助理檢視並操作你已登入的現有 Chrome 瀏覽器。

可以做什麼
  • 檢視頁面:含元素參照的無障礙樹快照、截圖、擷取原始文字、依 CSS 選擇器查詢元素
  • 操作元素:依參照、選擇器或可見文字點擊,輸入文字、按鍵、捲動、懸停、選擇下拉選項、等待元素出現或消失
  • 導覽與分頁:在目前分頁開啟網址,列出、新增、關閉或切換分頁
  • 除錯:讀取主控台輸出、檢視 XHR/fetch 請求與狀態碼、透過 DevTools 協定執行 JavaScript、處理 alert/confirm/prompt 對話框
適用情境
適合讓助理在你已開啟的瀏覽器工作階段中驗證或測試修改,包括需要 SSO 或預備環境登入的頁面,而非全新的無頭設定。README 建議可重複執行的 CI 自動化改用 Playwright。
執行需求
透過 npx(Node.js)在本機以 stdio 執行 MCP 伺服器,並在真實 Chrome 中安裝擴充功能(從儲存庫載入未封裝資料夾或已發行版本)。擴充功能需顯示已連線狀態。選用環境變數 WS_PORT(預設 7225),可在不同連接埠執行多個執行個體。
安裝前請注意
助理可以點擊、輸入並讀取所連分頁中一切可見內容,包括已登入應用程式與敏感資料。工具回傳的頁面內容會進入你的 AI 用戶端。測試不受信任的網站時請使用專用設定檔或分頁。操作會改變真實瀏覽器狀態,可能送出表單或觸發對話框。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Real Browser,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Real Browser MCP]

real-browser-mcp

Agentic browsers give agents a new browser. Coding agents need yours.

MCP + Chrome extension for the Chrome you already have open:
cookies, SSO, staging sessions, the bug you already reproduced.

[Chrome Extension]   [MCP Server]   [Add to Cursor]   [Agent Rules]

[CI] [npm version] [npm downloads] [License: MIT] [Agent Plugins] [TypeScript]

[Demo]


Everyone is building "agentic browsers." Most of them hand the agent a new browser: headless Chromium, a cloud VM, a clean profile with no cookies.

That is the wrong tool for the coding loop.

You ship a fix. The agent says "done, please verify." You already have Chrome open on staging, past SSO, on the exact page that breaks. The agent wrote the code. It could verify it there. It just cannot see that browser.

real-browser-mcp is the bridge: a local MCP server plus a Chrome extension over localhost WebSocket. Your agent talks MCP. Your real Chrome executes. Sessions stay on your machine.

This is not Playwright with a fresh profile. Not a hosted agent browser. Not CDP remote-debugging bolted onto your default Chrome profile (Chrome 136+ blocks that path for good security reasons).

[Real Browser MCP]


Quick Start

Two parts:

  • MCP server - runs on your machine, talks to your AI agent (Cursor, Claude Code, VS Code, …)
  • Chrome extension - runs inside your real Chrome and executes the tools

1. Add the MCP server

Cursor (one click):

[Install in Cursor]

Or add manually in Cursor Settings > MCP > "Add new MCP server":

json
{  "mcpServers": {    "real-browser": {      "command": "npx",      "args": ["-y", "real-browser-mcp"]    }  }}
Claude Desktop, Windsurf, or other MCP clients

Claude Desktop: Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Add the same JSON block.

Windsurf: Settings > MCP. Same config.

Any MCP-compatible client works.

2. Install the Chrome extension

[Available in the Chrome Web Store]

Or load from source:

bash
git clone https://github.com/ofershap/real-browser-mcp.git
  1. Open chrome://extensions and enable Developer mode (toggle in the top right)
  2. Click Load unpacked and select the extension/ folder from the cloned repo

Click the Real Browser MCP icon in your toolbar.

Green dot = connected. Gray = waiting for server.

Done. Your agent can see your browser.


Agent Plugins

This repo ships as an Agent Plugins 1.0.0 package: root plugin.json, mcp.json, and skills/real-browser-control/ teach agents when to pick real Chrome over headless / cloud agentic browsers.

Claude Code .claude-plugin/ and agent-config/ remain for rules and marketplace flows. Agent Plugins is the cross-client layout (MCP + skill in one tree).

Cursor (local plugin): clone the repo, then copy or symlink it to ~/.cursor/plugins/local/real-browser-mcp and reload the window. You still need the Chrome extension connected. One-click MCP install below adds only the server unless you also install the local plugin folder.

Spec and tooling: agent-plugins.org.


Why this exists (the agentic browser gap)

StackWhat the agent getsWhere it fails for coding agents
Playwright MCP / PuppeteerNew browser, clean stateNo SSO cookies, no "the tab I already opened"
Cloud agentic browsersRemote browser / VMSeparate login, not your IDE-local Chrome
Chrome DevTools MCP (CDP / autoConnect)DevTools-oriented attachChrome 136+ refuses --remote-debugging-port on the default profile, so everyday logged-in Chrome is hard to attach without a throwaway profile
Real Browser MCPYour Chrome via MV3 extension + localhost MCPNot for CI parallel clean runs (use Playwright there)

If you want repeatable automation in CI, use Playwright. If you want the agent inside the browser you already authenticated, use this.


How Others Compare

Real Browser MCPPlaywright MCPChrome DevTools MCPCloud agentic browser
BrowserYour real ChromeLaunches new Chromium (usually)Attach via CDPHosted / remote
Cookies / SSO already thereYesNo (inject or replay)Fragile on default profile after Chrome 136Separate session
Connection modelExtension ↔ localhost WebSocketPlaywright driverRemote debugging / autoConnectVendor cloud
Best fitLive verify in IDECI + repeatable runsPerformance / DevTools debuggingUnattended remote browse
Leaves your machine?No control planeLocal (unless you add cloud)LocalYes

🧠 Teach Your Agent

The agent can use all 18 tools out of the box, but it works better when it knows when and how to chain them. A config file teaches the right workflow - snapshot first, then act, then verify.

Run one command:

bash
npx real-browser-mcp --setup cursor

This installs:

  • ~/.cursor/rules/real-browser-mcp.mdc - teaches the snapshot-first workflow, how to handle dropdowns, when to use screenshots vs snapshots
  • ~/.cursor/commands/check-browser.md - adds /check-browser to your Cursor chat

After that, type /check-browser in any chat. Or just say "check the result in my browser" and the agent knows what to do.

Claude Code setup
bash
npx real-browser-mcp --setup claude

Adds an AGENTS.md to your project root. Claude Code auto-discovers it.

See agent-config/ for manual installation or to customize the rules.


What It Can Do

18 tools. Grouped by purpose.

See

ToolWhat it does
browser_snapshotAccessibility tree with element refs. Compact mode (default) returns only interactive elements
browser_screenshotCapture what's on screen
browser_textExtract raw text from page or element
browser_findQuery elements by CSS selector

Interact

ToolWhat it does
browser_clickClick by ref or CSS selector
browser_click_textClick by visible text. Works through React portals and overlays
browser_typeType into inputs and contenteditable fields
browser_press_keyKey combos (Enter, Escape, Ctrl+A)
browser_scrollScroll pages and virtual containers
browser_hoverTrigger tooltips and dropdowns
browser_selectPick from native <select> dropdowns
browser_waitWait for elements to appear or disappear

Navigate

ToolWhat it does
browser_navigateGo to a URL in the active tab
browser_tabsList, create, close, or focus tabs

Debug

ToolWhat it does
browser_consoleConsole output (log, warn, error)
browser_networkXHR/fetch requests with status codes
browser_evaluateRun JavaScript via Chrome DevTools Protocol
browser_handle_dialogHandle alert/confirm/prompt dialogs

Configuration

Env varDefaultWhat it does
WS_PORT7225WebSocket port for extension connection

Connection drops are handled automatically with exponential backoff (1s to 30s), ping/pong health checks every 10s, and per-tool timeouts (5s for clicks, 60s for navigation).

Multiple Chrome profiles

Run two server instances on different ports:

json
{  "mcpServers": {    "browser-work": {      "command": "npx", "args": ["-y", "real-browser-mcp"]    },    "browser-personal": {      "command": "npx", "args": ["-y", "real-browser-mcp"],      "env": { "WS_PORT": "9333" }    }  }}

Update the port in each extension popup to match.


Architecture

Everything stays on your machine. The extension connects to the MCP server via WebSocket on localhost. No cloud, no proxy, nothing leaves your browser.

real-browser-mcp/├── mcp-server/          MCP server (npm package, TypeScript)│   └── src/tools/       One file per tool, registry pattern├── extension/           Chrome extension (Manifest V3, plain JS)│   ├── background.js    Service worker, WebSocket client, tool handlers│   ├── content.js       Console capture│   └── popup/           Connection status UI├── agent-config/        Pre-built configs for Cursor + Claude Code│   ├── cursor/          Rules and commands│   ├── skills/          Browser automation skill│   └── setup.mjs        One-command installer└── tests/               Bridge + registry tests

Stack: TypeScript (strict) · MCP SDK · WebSocket · Chrome Extension Manifest V3 · Vitest

Development
bash
git clone https://github.com/ofershap/real-browser-mcp.gitcd real-browser-mcpnpm installnpm run buildnpm test
CommandWhat it does
npm run buildCompile TypeScript
npm run devWatch mode
npm testRun tests
npm run typecheckType check without emitting
npm run setup:cursorInstall Cursor rule + command

FAQ

Is this an agentic browser?

No. An agentic browser usually means the agent owns a new browser (local headless or cloud). real-browser-mcp connects an MCP agent to your existing Chrome. Same profile, same tabs, same logins.

Is the Chrome extension required?

Yes. The MCP server alone cannot see or control Chrome. Install the Chrome extension, open the popup, and wait for a green connected state before calling tools.

Does it work with my existing logins and corporate SSO?

Yes. The extension runs in your normal Chrome profile with cookies, sessions, and local storage. That is the point: verify against the session you already set up, including SSO you completed manually.

How is this different from Playwright MCP or browser-use?

Those stacks are built around a browser the automation tool launches (great for CI and clean repeats). Real Browser MCP is built around the browser you already have open. Use Playwright when you need deterministic runs. Use this when you need live session state.

How is this different from Chrome DevTools MCP?

Chrome DevTools MCP is excellent for DevTools-style debugging and can attach via CDP / autoConnect. After Chrome 136, remote debugging on the default user profile is blocked, which is exactly the profile that holds your real logins. Real Browser MCP uses an extension bridge over localhost WebSocket instead of opening a debug port on that profile.

Why not a cloud agentic browser?

Cloud browsers are remote machines. You re-auth, you leave the local IDE loop, and session data sits on someone else's infra. This project keeps control on localhost: MCP server ↔ extension. Page content still enters your AI client when tools return it; there is just no vendor browser SaaS in the middle.

Agent Plugins vs MCP-only install?

MCP-only (Cursor deeplink or mcp.json) registers the server and tools. The Agent Plugins package adds plugin.json and the real-browser-control skill so agents know when to prefer real Chrome over headless. Same npm server either way.

Is it safe to let an agent control my real browser?

The server and extension talk over WebSocket on localhost only; nothing is sent to a cloud control plane. The agent can still click, type, and read whatever is visible in the connected tab, including logged-in apps. Use a dedicated profile or tab when testing untrusted sites, and do not point automation at tabs with sensitive data unless you accept that risk.

Does it send data anywhere?

No. The MCP server and extension talk over WebSocket on localhost. Nothing leaves your machine. There is no analytics, no telemetry, and no cloud component. Privacy policy.

Which AI clients work?

Any MCP-compatible client. Cursor, Claude Desktop, Claude Code, Windsurf, Cline, and anything else that speaks the MCP protocol.

Can I use it with multiple Chrome profiles?

Yes. Run two MCP server instances on different ports. See Configuration for the setup.


Contributing

Bug reports, feature requests, and PRs welcome. Open an issue first for larger changes.

Author

[Made by ofershap]

[LinkedIn] [GitHub]


README built with README Builder

License

MIT © Ofer Shapira

來源:README.md,提交 9c27df3

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.2.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分