browser-mcp
Allows probing GraphQL endpoints for introspection and API reconnaissance as part of browser-based security testing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@browser-mcplaunch session s1, scope to example.com, navigate and snapshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
browser-mcp β beri AI agent Anda browser sungguhan ππ€
MCP server standalone yang memberi AI agent (opencode, Claude Code/Desktop, Cursor, Cline, dsb) kemampuan browser penuh via Chromium lokal + CDP:
ποΈ Lihat halaman β snapshot DOM compact (mata utama AI), screenshot, visual grounding (x,y), combined view
π±οΈ Aksi manusiawi β klik/type/keys/scroll + hover/move/dblclick/rightclick/drag (easing+jitter, lolos slider GeeTest)
π·οΈ Recon otonom β spider BFS in-scope, ekstraktor API/GraphQL ala LinkFinder, HAR-lite, console hook, probe introspeksi GraphQL
π Auth 2-akun β vault attacker/victim untuk differential testing (IDOR/priv-esc), password ter-redact di audit
π οΈ Burp-like first-class β intercept (request+response), repeater, intruder sniper, match-replace, scope allowlist, collaborator OOB
π‘οΈ Aman by default β scope check di semua navigasi/HTTP keluar, audit
audit.jsonldengan redact kredensialπ¦ Zero-deployment hell β 1 repo, stdlib +
websocket-clientsaja, backend CDP di-vendor (vendor_browser_local.py), tanpa binary global
47 tools. 1 perintah install. Browser tetap di mesin Anda β tidak ada cloud, tidak ada data keluar.
Demo 30 detik
git clone https://github.com/eye-fox/browser-mcp.git
cd browser-mcp
./install.sh
# restart opencode / AI client Anda, lalu suruh agent:
# "launch browser-mcp session demo, scope ke example.com, navigate, snapshot"
python3 examples/quickstart.py # tanpa LLM: bukti end-to-end lewat stdioRelated MCP server: project-tendril
Cara kerja
flowchart LR
Agent["AI agent"] -- "MCP stdio<br/>JSON-RPC" --> Server["server.py"]
Server -- "subprocess" --> Vendor["vendor_browser_local.py"]
Vendor -- "CDP ws://" --> Chrome["Chromium lokal"]
Server --- Scope["scope.json<br/>allowlist/blocklist"]
Server --- Audit["audit.jsonl<br/>redacted"]
Server --- Vault["auth_vault.json<br/>2 akun, 600"]
Server --- Sessions["sessions.json<br/>sessionId β cdp_url"]Syarat
Kebutuhan | Versi | Cek |
Python | β₯ 3.9 |
|
websocket-client | β₯ 1.8.0 |
|
Chromium/Chrome | baru |
|
Install
./install.shScript melakukan: cek python β install websocket-client β deteksi chromium (auto-patch BROWSER di vendor) β chmod +x β init scope.json / auth_vault.json (600) / sessions.json / audit.jsonl dari .example β auto-register ke ~/.config/opencode/opencode.json β smoke test tools/list (harus β₯40 tools).
Opsi:
./uninstall.sh # hapus entri MCP + matikan daemon, repo tidak dihapusConfig manual (non-opencode)
Claude Desktop / Cursor / Cline (mcp.json / claude_desktop_config.json):
{
"mcpServers": {
"browser-mcp": {
"command": "python3",
"args": ["/ABSOLUTE/PATH/browser-mcp/server.py"]
}
}
}Template siap copy: mcp.json.example. Untuk opencode mentah: opencode.json.snippet.
Struktur repo
browser-mcp/
βββ install.sh # setup full: deps + chromium detect + opencode register + smoke test
βββ uninstall.sh # cabut entri MCP + kill daemon
βββ server.py # MCP stdio server (47 tools, scope+audit+redact)
βββ vendor_browser_local.py # backend CDP Chromium (stealth, intercept, cookies, dsb) β di-vendor
βββ requirements.txt # websocket-client saja
βββ SKILL.md # instruksi agent (copy ke skill-dir bila perlu)
βββ scope.json.example # -> scope.json (allowlist; default disabled)
βββ auth_vault.json.example # -> auth_vault.json (chmod 600)
βββ opencode.json.snippet # referensi config opencode
βββ mcp.json.example # referensi config generik MCP
βββ examples/quickstart.py # e2e tanpa LLM: launchβscopeβnavigateβsnapshotβclose
βββ scripts/smoke_test.py # initialize + tools/list, exit 0 bila β₯40 tools
βββ LICENSE (MIT)
βββ .gitignore (melindungi audit/sessions/vault asli)
scope.json,auth_vault.json,sessions.json,audit.jsonladalah runtime β tidak ikut ke git (lihat.gitignore). Yang dipublish hanya.example.
Pakai di agent (pola baku)
mcp_browser_launch {"sessionId":"s1"}β simpansessionIdmcp_scope_set {"allowed":["target.com"],"enabled":true}mcp_browser_spider {"sessionId":"s1","startUrl":"https://target.com","maxPages":20,"depth":2}Per halaman menarik:
mcp_browser_js_endpoints+mcp_browser_console+mcp_browser_network_harmcp_browser_snapshotβmcp_browser_click/type (wait:"idle")β snapshot lagi βmcp_browser_evalverifikasi valueAuth differential:
mcp_auth_vault set victim/attacker,switchbergantianIntercept hanya saat tahu momennya:
mcp_intercept_set(pattern)β aksi pemicu βmcp_intercept_polllangsung βmcp_intercept_continue(forward|drop|modify|fulfill,id:"all"untuk lepas semua)mcp_repeater_send(replay tanpa browser) βmcp_intruder_fuzz(wordlist inline, auto URL-encode) βmcp_browser_graphqlprobe βmcp_collaborator_start/polluntuk OOBmcp_history_list+ HAR review βmcp_browser_close
Aturan detail + 47 tools: lihat SKILL.md.
Tips anti-nyangkut (dari pengalaman)
Tombol tak ada di elements β
mcp_browser_submit(formId)ataukeys Enter.CAPTCHA gambar/checkbox β
mcp_browser_ground, klik viax,ydari gambar.Slider GeeTest / canvas β
mcp_browser_viewlalumcp_browser_drag(x1,y1,x2,y2).Session
Connection refused/ hang setelah intercept βmcp_browser_recoveratau attachsessionIdbaru, jangan retry session yang wedge.pollharus langsung setelah trigger βeval-fetch yang menunggu = wedge.
Keamanan
Scope allowlist ditegakkan di
navigate,repeater_send,intruder_fuzz,graphql. Defaultscope.json.example= disabled agar demo jalan; aktifkan sebelum hunting target nyata.audit.jsonl: key sensitif (password/token/secret/cookie/api-key/bearer) di-redact + body dipotong 500 char. Jangan commit file runtime.Vault 600. Jangan taruh kredensial asli di
.example.Hanya pakai terhadap target yang Anda punya izin uji.
Publish ke GitHub (checklist)
cd browser-mcp
# pastikan tidak ada secret bocor:
grep -ri "password\|token\|api.key\|bearer" --include="*.py" --include="*.md" --include="*.json" --include="*.sh" . | grep -v example | grep -v REDACT || echo "bersih"
git init && git add . && git commit -m "browser-mcp standalone v0.4.0" && git branch -M main
gh repo create browser-mcp --public --source=. --pushTroubleshooting
Gejala | Obat |
|
|
chromium not found |
|
MCP tidak muncul di client | restart client; pastikan path |
|
|
stop intercept hang | server sudah auto-lepas paused + timeout 10 dtk; bila wedge, attach session baru dan abandon lama |
Lisensi
MIT β lihat LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Connect AI agents to your own Chrome with scoped access, approvals, and verified task results.
- TabfleetOAuthcom.tabfleet
Launch, inspect, control, and share isolated cloud browsers for your agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automation, debugging, performance analysis, network monitoring, and DOM interaction through Chrome DevTools Protocol.2,262,793 npmApache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to operate an isolated local Chromium browser through MCP, with semantic snapshots, ref-based actions, search, research, crawling, and CDP access.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to securely control a user's existing Chrome profile locally, providing typed browser actions, form and editor support, WordPress workflows, terminal automation, and Figma inspection with policy-based authorization and redacted auditing.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to control existing Chrome and Firefox browser sessions locally, including tab management, navigation, form filling, screenshots, and persistent scripts, without remote relays or debugging ports.6 npm-