# leapfrog [Health: Active]

**Category:** 📂 Browser Automation  
**Repository:** https://github.com/anthonybono21-cloud/leapfrog  
**GitHub Stars:** 5  
**npm Downloads (last month):** 242  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/leapfrog

## Description
Multi-session browser MCP — 15 parallel isolated browsers, 37 tools, stealth, self-improvement.

## Tools
Capabilities this server exposes over MCP:

- **session_create** — Create a new isolated browser session with its own cookies and state. Returns a short session ID (e.g. s_k3m7x1) to pass to all other tools. Each session is a separate BrowserContext — no cookie leakage between sessions. Pool limit: 15 concurrent sessions. Sessions auto-expire after 30 minutes of inactivity. Use keep-alive pattern (periodic navigate or snapshot) for long-running sessions.
- **session_create_batch** — Create multiple isolated browser sessions concurrently — 5-10x faster than sequential session_create calls. Optionally navigate each to a URL. Returns all session IDs. A single reflow positions all windows into a unified grid after all sessions are created.
- **session_list** — List all active browser sessions with their URLs and idle times.
- **session_destroy** — Close and clean up a browser session. Frees a pool slot.
- **session_save_profile** — Save a session's cookies and auth state to disk. Use this after logging in to a site so future sessions can restore that login. Pass the returned profile path to session_create's profilePath to reuse it.
- **session_list_profiles** — List all saved authentication profiles.
- **navigate** — Navigate to a URL and return a compact accessibility snapshot with @eN refs. Refs like @e1, @e2 can be passed directly to the 'act' tool — no CSS selectors needed. Snapshots are ~200-500 tokens (vs 15,000 with Playwright MCP).
- **snapshot** — Re-snapshot the current page for fresh @eN refs. Use after 'act' when you need to re-orient, or scope to a region with 'selector'. Use 'selector' to dramatically reduce tokens (e.g. 'form', '#results').
- **diff** — Compare the current page state against the last snapshot for this session. Returns only what changed (additions, removals, changes) — massive token savings vs a full re-snapshot. Use after 'act' instead of 'snapshot' when you just need to see what changed. On first call (no previous snapshot), returns the full snapshot with a note. Use 'selector' to scope the diff to a page region.
- **act** — Perform a browser interaction: click, fill, type, check, select, press key, scroll, hover, mousemove, drag, upload, resize, back, forward. Use @eN refs from navigate/snapshot as the target (e.g. '@e2'). CSS selectors also work. drag: requires target (source) and target2 (destination). upload: requires target (file input) and filePaths. resize: requires width and height (no target needed). holdDuration: for click, holds mouse down for N ms (long-press). Returns a fresh snapshot if the page navigated, or just the action result if it didn't.
- **screenshot** — Capture a screenshot of the current page. Returns the image inline as base64. Optionally save to disk with savePath.
- **extract** — Extract data from the page without a full snapshot. Types: text (visible text), html (markup), title, url, js (evaluate JavaScript). Use target with @eN or CSS selector for element-specific extraction.
- **pool_status** — Show pool stats, resource usage (memory, uptime), and all active session summaries. Shows per-session idle time. Sessions approaching 30-minute idle timeout should be refreshed or saved.
- **network_log** — View captured HTTP requests/responses for a session. Shows method, status, URL, size, and timing. Filter by URL pattern, method, status range, or content-type. Network capture starts automatically when a session is created.
- **console_log** — View captured browser console messages (log, warn, error, info, debug). Console capture starts automatically when a session is created. Use level filter to focus on errors or warnings.
- **network_intercept** — Add or remove network intercept rules. Block requests (ads, trackers), mock API responses, or log specific traffic. Use action='remove' with ruleId to remove an existing rule.
- **wait_for** — Wait for a condition before proceeding. Supports: element visible, text appears, network idle, URL navigation, JS expression truthy. Returns a fresh snapshot after the wait completes.
- **tabs_list** — List all open tabs in a session. Shows index, URL, title, and which tab is active. New tabs (popups, OAuth windows) are automatically tracked.
- **tab_switch** — Switch to a different tab by index. Use -1 to switch to the most recently opened tab (useful for popups). Returns a snapshot of the newly active tab.
- **tab_close** — Close a tab by index. Defaults to the active tab. Cannot close the last remaining tab. Returns a snapshot of the new active tab.
- **session_health** — Check if a session is healthy (browser connected, page responsive). Omit sessionId to check all sessions. Quick diagnostic for debugging.
- **add_init_script** — Inject JavaScript that runs before every page load in a session. Persists across navigations (Playwright built-in behavior). Use for fingerprint overrides, custom stealth patches, or page instrumentation.
- **batch_actions** — Execute multiple browser actions sequentially in a single MCP call. Eliminates round-trip overhead for humanization sequences (e.g. Bezier mouse paths, typed text with delays). Each action can have an optional delayAfter (ms) to pause between steps. Returns a single result with the outcome of each action.
- **execute** — Run a Playwright script with access to { page, context }. One tool call replaces 5-20 sequential MCP round trips. Use for complex flows with conditional logic, loops, error handling. NOTE: Scripts run in the Node.js process — equivalent to arbitrary code execution. Disable with LEAP_ALLOW_EXECUTE=false.
- **api_discover** — List JSON APIs the page has called. Captured automatically from XHR/fetch traffic. Classifies into: data, tracking, auth, cdn, ads.
- **api_export** — Generate an OpenAPI v3 spec from observed API traffic. Navigate pages first to capture traffic, then export.
- **session_memory** — Recall what actions were performed in this session. Useful after context window compression to recover lost context.
- **profile_list** — List saved persistent browser profiles with their auth status.
- **profile_delete** — Delete a saved persistent browser profile and all its data.
- **paginate** — Extract data across multiple pages in a single call. Handles click-next, infinite scroll, and URL-pattern pagination. Auto-detects 'next' buttons when nextSelector='auto'. Returns extracted content from each page plus metadata. Replaces 3-4 tool calls per page with one invocation. Cap: 50 pages, 100K total chars.
- **session_export** — Export session action history as a replayable recording. Creates a JSON script from all mutating actions with @eN refs resolved to stable selectors. Use format='playwright' to get a Playwright JS script compatible with the execute tool.
- **session_replay** — Replay a recording in the current session. Executes each step directly against the browser. Override {{placeholder}} params with the params object. Set onError='skip' to continue past failures.
- **wait_for_human** — Pause and request human intervention. Shows the @..@ overlay with your reason. Use when you encounter a CAPTCHA, login wall, or any situation requiring human action. The tool blocks until the user clicks 'Done' on the overlay. Returns success when resolved.
- **profile_warm** — Warm up a browser profile by browsing trusted sites (Google, Wikipedia, YouTube). Fresh profiles with zero history score near 0 on reCAPTCHA v3. A 60-90 second warm-up dramatically improves trust scores. Stores warm-up state in domain knowledge so it doesn't repeat. Must pass a sessionId of an existing session with a profile.
- **profile_import_from_chrome** — Connect to your real Chrome browser via CDP, capture its auth cookies, and save them as a Leapfrog profile. This gives you real Google auth, reCAPTCHA trust, and all your logged-in sessions — but in an isolated Leapfrog session, not your real browser. Start Chrome with: chrome --remote-debugging-port=9222
- **domain_knowledge** — Inspect what Leapfrog has learned about a website from previous visits. Shows stealth tier, wait strategy, block history, consent selector, API endpoints, and visit count. Pass no domain to list all known domains.
- **session_export_trace** — Export a Playwright trace file for a session. Requires LEAP_TRACE=true. The trace can be viewed at trace.playwright.dev for detailed action timeline.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "leapfrog": {
    "command": "npx",
    "args": ["-y","leapfrog-mcp"]
  }
}
```

## Documentation

## What the leapfrog MCP server does

The leapfrog MCP server exposes browser automation for AI agents through MCP. It supports up to 15 parallel, isolated browser sessions, with multi-tab and popup handling, per-session proxy settings, persistent cookies, authentication profile reuse, and crash recovery. It is aimed at workflows where an agent needs to browse, interact with pages, monitor changes, or repeat a browser procedure.

Page output is designed to reduce irrelevant context. Navigation and snapshot operations classify pages into types such as login, article, dashboard, form, search results, checkout, and documentation. That classification influences which content and interactive elements are surfaced. The `diff` capability returns additions, removals, and changes since a previous snapshot, which suits polling and monitoring tasks.

## How it works

The package runs with `playwright-core`, so it does not include a browser binary. It can use an installed Chrome or Chromium through `LEAP_CHANNEL=chrome`, connect to an already running browser through `LEAP_CDP_ENDPOINT`, or use a Chromium binary installed with `npx playwright-core install chromium`.

A session can use one of four stealth modes. The default enables 19 anti-detection patches; passive mode removes automation signals without changing browser identity details; auto mode selects configurations per domain based on prior results; and false disables stealth. Stealth can also be disabled for an individual session. Humanized mouse, typing, scrolling, pause, and fingerprint behavior is separate and opt-in because it adds latency.

Navigation includes fallback waiting strategies and can escalate stealth when a page appears blocked or challenged. The agent can disable automatic retries or set a maximum retry level. Session history records action outcomes, detects repeated action loops and bot redirects, and remains available through `session_memory` after context compression.

## Setup and configuration

Install the package with npm or run it directly with npx. The diagnostic commands can check the environment, test the stealth patches, and print an MCP configuration:

- `npx leapfrog-mcp --doctor`
- `npx leapfrog-mcp --stealth-audit`
- `npx leapfrog-mcp --config`

The MCP entry uses `npx -y leapfrog-mcp` as its command. Optional settings include `LEAP_MAX_SESSIONS`, `LEAP_TILE`, `LEAP_HUD`, and `LEAP_AUTO_CONSENT`. `LEAP_STEALTH` controls the stealth mode, while `LEAP_HUMANIZE=true` enables experimental humanized interaction. When running headed, `LEAP_HUD=true` adds visual action overlays to sessions.

## Tools and capabilities

The leapfrog MCP server supports browser actions and workflow-oriented operations, including:

- Creating and managing isolated sessions, tabs, and popups
- Navigating pages and taking classified snapshots
- Capturing snapshot differences for incremental monitoring
- Performing batch actions, uploads, drag operations, and resizing
- Intercepting network traffic and capturing console output
- Extracting content through next-page controls, load-more buttons, infinite scroll, or URL patterns
- Exporting session history as parameterized JSON or a Playwright script
- Replaying recordings with parameter overrides and stop-or-skip error handling
- Recalling session history with `session_memory`

Pagination extraction handles up to 50 pages and 100,000 total characters. Recordings can replace detected emails, passwords, and URLs with placeholders before reuse.

## Limitations and notes

The package does not bundle a browser, so a usable Chrome, Chromium, CDP endpoint, or separately installed Chromium binary is needed. Humanization is experimental and increases latency. Stealth is configurable rather than mandatory, and sites can still block or challenge automated browsing. Automatic navigation retry can be disabled with `autoRetry: false`, and profile sessions are protected from the highest session-destruction escalation level.

The README reports approximate token reductions that vary by page complexity: content-heavy pages benefit more than dense forms. Pagination stops when it finds no further content, duplicate content, an empty page, or bot detection.

_Full upstream README: https://allmcps.com/mcp/leapfrog/readme_

