Leapfrog
About
Multi-session browser MCP for AI agents — stealth mode, session pooling, humanization, 10x fewer tokens than Playwright
Details
- Author
- anthonybono21-cloud
- Categories
- Web Scraping, Automation, Other
Jump to
Setup
Install Leapfrog in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/anthonybono21-cloud/leapfrog
Follow the installation instructions in the repository README, then restart your MCP client.
Multi-session browser MCP for AI agents.
36 tools. 15 parallel sessions. Stealth. HUD. Self-improvement. Up to 10x fewer tokens.
npm i leapfrog-mcp| Works with Claude Code, Cursor, Windsurf
Playwright MCP sends~14,000 tokensfor a content-heavy page like Hacker News. Most of that is noise. Your context window fills up. Your agent gets confused. You pay for it.
Leapfrog sends~1,400 tokens. Same page. Same information. Up to 10x less noise.
┌─────────────────────────────────────────────────────┐ │ Playwright MCP │ │ ████████████████████████████████████████ ~14,000 │ │ │ │ Leapfrog │ │ █████ ~1,400 │ └─────────────────────────────────────────────────────┘ tokens per page (Hacker News, real test)
Savings range from 2-10x depending on page complexity. Content-heavy pages see the biggest wins. Dense forms see the smallest. The median across real-world sites is~4-5x.
npx leapfrog-mcp --doctor # verify everything works npx leapfrog-mcp --stealth-audit # test all 19 stealth patches npx leapfrog-mcp --config # print MCP config to paste
Add to~/.mcp.json(Claude Code) or your editor's MCP config:
{ "leapfrog": { "command": "npx", "args": ["-y", "leapfrog-mcp"], "env": { "LEAP_MAX_SESSIONS": "15", "LEAP_TILE": "true", "LEAP_HUD": "true", "LEAP_AUTO_CONSENT": "true" } } }
Leapfrog usesplaywright-core(15MB) instead ofplaywright(1.6GB) and doesnotbundle a browser. Either:
- SetLEAP_CHANNEL=chrometo use your installed Chrome/Chromium (recommended)
- Or runnpx playwright-core install chromiumto install the bundled Chromium binary
- Or setLEAP_CDP_ENDPOINTto connect to an already-running Chrome instance
Leapfrog ships 19 anti-detection patches enabled by default (LEAP_STEALTH=true). Four modes:
- true(default) — all 19 patches active
- passive— removes automation signals only (webdriver, HeadlessChrome). Does NOT fake identity (WebGL, fonts, audio). Better for sites where trust matters more than evasion.
- auto— per-domain EXP3 bandit selects the optimal stealth configuration based on what's worked before
- false— no stealth patches
These cover the vectors that fingerprint services like CreepJS and fingerprint-pro actually check:
- Client Hints brands (strips HeadlessChrome)
- navigator.webdriverforced toundefined
- WebGL vendor/renderer (replaces SwiftShader with real GPU strings)
- Connection RTT (non-zero)
- Alert dismiss timing (human-speed delay)
- Window outer/inner height offset
- MIME type array population
- Platform inference from user agent
- chrome.appemulation
- iframecontentWindowprotection
- Media codec spoofing (canPlayType)
- document.hasFocus()override
- Source URL comment stripping
- Custom UA + stealth coexistence (custom user agents no longer disable stealth context)
- CDPRuntime.enabledetection (Error.prepareStackTracefilter)
- Permissions API spoofing (20+ permission types)
- AudioContext fingerprint noise (getChannelData/getFloatFrequencyData)
- WebRTC IP leak prevention (ICE candidate filtering)
- Font enumeration fingerprint spoofing
Per-session stealth control: passstealth: falseinsession_createto disable for a specific session.
SetLEAP_HUMANIZE=trueto enable human-like browser interaction. This is opt-in and adds latency in exchange for more realistic behavior. Six modules:
- Mouse— Bezier curve paths with Fitts's Law timing and micro-tremor jitter
- Typing— Log-normal inter-key delays (200ms median), key dwell time, bigram-aware speed, rollover typing
- Scroll— Inertial simulation with ramp-up and momentum decay (touchpad/mouse-wheel physics)
- Pause— Inter-action "think" delays that simulate cognitive gaps between actions
- Fingerprint— Coherent browser fingerprint generation (platform, device memory, GPU, timezone)
- Utils— Shared math primitives (Box-Muller gaussian, distributions)
Everynavigateandsnapshotcall automatically classifies the page type using weighted signal scoring (no LLM required). 18 types:
login·search-results·product·product-list·checkout·article·dashboard·form·error·challenge·landing·documentation·profile·media·feed·qa·ecommerce·unknown
Classification drives smarter snapshot extraction — login pages surface form fields, articles surface content, dashboards surface interactive elements.
The harness tracks every action in a session and classifies outcomes:
- Action outcome classification—SUCCESS,SILENT_CLICK,NAVIGATION,WRONG_ELEMENT,BLOCKED,ERROR,PENDING
- Bot redirect detection— detects when a site redirects to a challenge or block page after an action
- Loop detection— warns when the agent is stuck clicking the same element, ping-ponging between URLs, or repeating actions
- Session memory—session_memorytool recalls actions after context window compression
Navigate automatically retries with fallback strategies when pages fail to load:
- Tryload(fastest) — if empty, retry withnetworkidle(10s cap)
- Ifnetworkidletimes out (Amazon, ad-heavy sites), fall back todomcontentloaded
- If blocked/challenged, escalate stealth: random delays → wait for JS challenge → rotate session with fresh fingerprint
- Profile sessions (auth'd) never have their session destroyed — hard-capped at Level 2
Opt-out withautoRetry: falseonnavigate. Control max escalation withmaxRetryLevel(0-5, default 3).
Export a session's action history as a replayable recording, then replay it in new sessions:
- session_export— creates parameterized JSON or Playwright script from session history.@eNrefs resolved to stable CSS selectors. Auto-detects emails, passwords, URLs as{{placeholders}}.
- session_replay— replays a recording with parameter overrides. SupportsonError: 'stop'or'skip'.
Turn one-off agent workflows into reusable automations.
Extract data across multiple pages in a single tool call:
- Click-next— auto-detects "Next" buttons, pagination links, "Load more" buttons
- Infinite scroll— scrolls and waits for new content via DOM hash comparison
- URL pattern— increments?page={page}or custom patterns
Replaces 3-4 tool calls per page. Cap: 50 pages, 100K total chars. Stops on: no next button, empty page, duplicate content, or bot detection.
Thedifftool returns only what changed since the last snapshot — additions, removals, changes. Massive token savings for monitoring and polling workflows.
When running headed, Leapfrog overlays visual feedback on every session:
- Click ripple— expanding green circle at click coordinates (agent actions only)
- Zoom-to-target— browser zooms to 1.15x on the clicked element briefly so agents (and humans) can visually track what's happening in tiled windows
- Scroll-to-target— scrollIntoView before clicks so you can see what the agent is about to click
Minimal by design. No borders, no status bars, no cursor overlay — just the feedback that matters.
Multi-Terminal Tiling (LEAP_TILE=true)
Multiple Leapfrog instances share the screen via file-based coordination. Each instance tracks its own windows and a TilesCoordinator assigns global grid slots — no overlap, no manual arrangement. SetLEAP_TILE=true(orLEAP_TILE=masterfor the primary instance). Padding between tiles is configurable withLEAP_TILE_PADDING(default 8px).
Leapfrog auto-detects situations that need a human — CAPTCHAs, login forms, OAuth redirects, Cloudflare challenges — and tries to self-resolve before pausing.
- Auto-resolves first:clicks reCAPTCHA checkboxes, Cloudflare verify buttons, generic verify/continue buttons, then a second-pass retry — all before asking for help
- External solvers:setLEAP_CAPTCHA_PROVIDER+LEAP_CAPTCHA_API_KEYfor CapSolver, 2Captcha, or NopeCHA integration
- Learns what works:remembers which resolution method succeeded per domain and tries the known-good method first on revisit
- Detects reCAPTCHA, hCaptcha, Turnstile, login forms, OAuth redirects, Cloudflare challenges
- Tab title changes to "NEEDS HUMAN" when intervention is needed
- wait_for_humantool — agent calls when stuck, blocks until you resolve it or navigate past
Per-session Playwright tracing with screenshots + DOM snapshots. Export ZIP files viewable attrace.playwright.devvia thesession_export_tracetool. Auto-saves on session destroy.
Leapfrog learns from every visit. Per-domain knowledge persists at~/.leapfrog/domains/{domain}.json— 9 dimensions, all automatic:
LRU eviction at 500 domains. Inspect with thedomain_knowledgetool.
URL validation blocks hex-encoded IPs (0x7f000001), octal notation (0177.0.0.1), CGNAT ranges (100.64.0.0/10), and redirect chains that resolve to internal addresses. Localhost and127.0.0.0/8are allowed by default for local dev workflows — setLEAP_BLOCK_LOCALHOST=trueto block them.
Leapfrog uses pond metaphors to keep things memorable. Your agent is the frog.
- Node.js >= 20
- Chromium — use system Chrome (LEAP_CHANNEL=chrome) or install vianpx playwright-core install chromium
MCP server for browser automation via Vercel agent-browser CLI
Convert any URL to LLM-ready Markdown via real Chrome browsers. 3 tools: scrape, crawl, search. Free via MCP, pay-per-use via x402.
An MCP server that allows AI agents to control a web browser using the browser-use library.
Exposes Chrome browser functionality to AI assistants for automation, content analysis, and semantic search via a Chrome extension.
Control a Chrome browser through the Chrome DevTools Protocol (CDP) from MCP clients for browsing, inspection, and automation workflows.
Stealthy, LLM-drivable browser engine — a Python library + 85-tool MCP server on stealth Chromium with full Chrome DevTools Protocol.
A Go-based MCP server for interacting with the Lightpanda Browser using the Chrome DevTools Protocol (CDP).
A browser automation agent using the Model Context Protocol (MCP) to enable browser interactions.
A browser automation service for capturing console output, useful for tasks like public sentiment analysis.
Control the Chrome browser for web automation using an AI model. Requires the MCP Chrome extension.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


