🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

pilot-mcp

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pilot-mcp

Fast browser automation MCP server for LLMs — persistent Chromium, ref-based interaction, cookie migration

latest
Source
npmnpm
Version
0.4.2
Version published
Weekly downloads
26
-16.13%
Maintainers
1
Weekly downloads
 
Created
Source

pilot — Your AI Agent, Inside Your Real Browser

npm license stars

Your AI agent controls a tab in your real Chrome — already logged in, no bots blocked, no CAPTCHAs.

pilot demo

Other browser tools launch a separate headless browser. Your agent starts anonymous, gets blocked by Cloudflare, can't access anything behind login.

pilot takes a different approach: it controls a tab in the browser you're already using. Your agent sees what you see — logged into GitHub, Linear, Notion, your internal tools. No cookie hacks. No re-authentication. No bot detection.

Quick Start

1. Install pilot

npx pilot-mcp
npx playwright install chromium

Add to .mcp.json (Claude Code) or MCP settings (Cursor):

{
  "mcpServers": {
    "pilot": {
      "command": "npx",
      "args": ["-y", "pilot-mcp"]
    }
  }
}

2. Install the Chrome extension

npx pilot-mcp --install-extension

This opens Chrome's extensions page and shows the folder path. Click Load unpacked → paste the path. You'll see the ✈️ Pilot icon — badge shows ON when connected.

3. Use it

Tell your agent:

"Go to my GitHub notifications and summarize them"

The agent navigates in a real Chrome tab — already logged in as you. No setup. No cookies. No Cloudflare blocks.

Two Modes

Extension Mode — your real browser

The Pilot Chrome extension connects to the MCP server via WebSocket. Your agent gets its own tab in your real browser — with all your sessions, cookies, and logged-in state already there.

AI Agent → MCP (stdio) → pilot → WebSocket → Chrome Extension → Your Browser Tab
  • No Cloudflare blocks (real browser fingerprint)
  • Already authenticated everywhere
  • Multiple agents get separate tabs (multiplexed)
  • You can watch the agent work in real-time

This is how pilot is meant to be used.

Headed Mode — visible Chromium

When the extension isn't connected, pilot opens a visible Chromium window. You can see everything the agent does and intervene when needed.

Import cookies from your real browser to authenticate:

pilot_import_cookies({ browser: "chrome", domains: [".github.com", ".linear.app"] })

Supports Chrome, Arc, Brave, Edge, Comet via macOS Keychain / Linux libsecret.

When the agent hits a CAPTCHA or bot wall, it hands control to you:

  • pilot_handoff — pauses automation, you solve the challenge
  • pilot_resume — agent continues where it left off

Lean Snapshots

Large page snapshots eat context windows. pilot is opinionated about keeping things small:

  • Navigate returns a ~2K char preview, not a 50K+ page dump
  • Snapshot supports max_elements, interactive_only, lean, structure_only
  • Snapshot diff shows only what changed — no redundant re-reads
Other tools:   navigate(58K) → navigate(58K) → answer        = 116K chars
pilot:         navigate(2K)  → navigate(2K)  → snapshot(9K)  =  13K chars

Less context = faster inference, cheaper API calls, fewer failures.

pilot vs @playwright/mcp

Both are solid tools. Here's what's actually different:

pilot@playwright/mcp
Real browser controlExtension controls a tab in your ChromeExtension for session reuse (no DOM control)
Bot detectionNot an issue (real browser) + handoff/resume❌ blocked by Cloudflare
Cookie importDecrypt from Chrome, Arc, Brave, Edge, Comet❌ (manual --storage-state JSON)
Default snapshot size~2K on navigate, ~9K full snapshot~50-60K on navigate
Snapshot diffingpilot_snapshot_diff
Token controlmax_elements, interactive_only, lean, structure_only--snapshot-mode (incremental/full/none)
Iframe supportpilot_frames, pilot_frame_select, pilot_frame_reset
Ad blockingpilot_block with ads preset--blocked-origins (manual)
Tool profilescore (9) / standard (30) / full (61)Capability groups via --caps
Transportstdiostdio, HTTP, SSE
Persistent sessionspilot_auth + cookie import--user-data-dir, --storage-state
Network interceptionpilot_interceptbrowser_route
Assertionspilot_assertVerify tools via --caps=testing

Use pilot when: You need your agent to work on authenticated sites, you want lean context, or you're tired of Cloudflare blocks.

Use @playwright/mcp when: You need HTTP/SSE transport, Windows auth support, or you prefer Microsoft's ecosystem.

Tool Profiles

61 tools is too many for most LLMs — research shows degradation past ~30. Load only what you need:

ProfileToolsUse case
core9Simple automation — navigate, snapshot, click, fill, type, press_key, wait, screenshot
standard30Common workflows — core + tabs, scroll, hover, drag, iframes, auth, block, find
full61Everything, including network mocking, assertions, clipboard, geolocation
{
  "mcpServers": {
    "pilot": {
      "command": "npx",
      "args": ["-y", "pilot-mcp"],
      "env": { "PILOT_PROFILE": "standard" }
    }
  }
}

Default is standard (30 tools).

All Tools (61)

Navigation

ToolDescription
pilot_getNavigate and return full readable content + interactive elements in one call
pilot_navigateNavigate to a URL. Returns content preview + interactive elements (~2K chars)
pilot_backGo back in browser history
pilot_forwardGo forward in browser history
pilot_reloadReload the current page

Snapshots

ToolDescription
pilot_snapshotAccessibility tree with @eN refs. Supports max_elements, structure_only, interactive_only, lean, compact, depth
pilot_snapshot_diffUnified diff showing what changed since last snapshot
pilot_findFind element by visible text, label, or role — returns a ref without a full snapshot
pilot_annotated_screenshotScreenshot with red boxes at each @ref position

Interaction

ToolDescription
pilot_clickClick by @ref or CSS selector
pilot_hoverHover over an element
pilot_fillClear and fill an input/textarea
pilot_select_optionSelect a dropdown option
pilot_typeType text character by character
pilot_press_keyPress keyboard keys
pilot_dragDrag from one element to another
pilot_scrollScroll element or page
pilot_waitWait for element, network idle, or page load
pilot_file_uploadUpload files to a file input

Iframes

ToolDescription
pilot_framesList all iframes
pilot_frame_selectSwitch context into an iframe
pilot_frame_resetSwitch back to main frame

Page Inspection

ToolDescription
pilot_page_textClean text extraction
pilot_page_htmlGet innerHTML of element or full page
pilot_page_linksAll links as text + href pairs
pilot_page_formsAll form fields as structured JSON
pilot_page_attrsAll attributes of an element
pilot_page_cssComputed CSS property value
pilot_element_stateCheck visible/hidden/enabled/disabled/checked/focused
pilot_page_diffText diff between two URLs

Debugging

ToolDescription
pilot_consoleConsole messages from circular buffer
pilot_networkNetwork requests from circular buffer
pilot_dialogCaptured alert/confirm/prompt messages
pilot_evaluateRun JavaScript on the page
pilot_cookiesGet all cookies as JSON
pilot_storageGet localStorage/sessionStorage
pilot_perfPage load performance timings

Visual

ToolDescription
pilot_screenshotScreenshot of page or element
pilot_pdfSave page as PDF
pilot_responsiveScreenshots at mobile, tablet, desktop

Tabs

ToolDescription
pilot_tabsList open tabs
pilot_tab_newOpen a new tab
pilot_tab_closeClose a tab
pilot_tab_selectSwitch to a tab

Session & Auth

ToolDescription
pilot_import_cookiesImport cookies from Chrome, Arc, Brave, Edge, Comet via Keychain decryption
pilot_authSave/load/clear full session state (cookies + localStorage + sessionStorage)
pilot_set_cookieSet a cookie manually
pilot_set_headerSet custom request headers
pilot_set_useragentSet user agent string
pilot_handle_dialogConfigure dialog auto-accept/dismiss
pilot_resizeSet viewport size
pilot_blockBlock requests by URL pattern or ads preset
pilot_geolocationSet fake GPS coordinates
pilot_cdpConnect to a real Chrome instance via CDP
pilot_extension_statusCheck Chrome extension connection status
pilot_handoffOpen headed Chrome for manual interaction (CAPTCHA, auth)
pilot_resumeResume automation after handoff
pilot_closeClose browser and clean up

Automation (full profile)

ToolDescription
pilot_interceptIntercept requests and return custom responses
pilot_assertAssert URL, text, element state, or value
pilot_clipboardRead or write clipboard content

Extension Architecture

The Pilot extension uses a broker/client model — multiple AI sessions share one extension, each getting its own tab:

Claude Code Session A ──┐
                        ├→ pilot broker (ws://127.0.0.1:3131) → Chrome Extension → Tab 1
Claude Code Session B ──┘                                                       → Tab 2

Each session's tab is color-grouped in Chrome so you can see which tab belongs to which agent.

Requirements

  • Node.js >= 18
  • Chrome + Pilot extension (recommended)
  • macOS or Linux (for cookie import in headed mode)
  • Chromium: npx playwright install chromium (for headed mode)

Security

VariableDefaultDescription
PILOT_PROFILEstandardTool set: core (9), standard (30), or full (61)
PILOT_OUTPUT_DIRSystem tempRestricts where screenshots/PDFs can be written
  • Extension communicates over localhost WebSocket only (127.0.0.1)
  • Output path validation prevents writing outside PILOT_OUTPUT_DIR
  • Path traversal protection on all file operations
  • Expression size limit (50KB) on pilot_evaluate

Development

npm test   # unit tests via vitest

Credits

The core browser automation architecture — ref-based element selection, snapshot diffing, cursor-interactive scanning, annotated screenshots, circular buffers, and AI-friendly error translation — is ported from gstack by Garry Tan.

Built on Playwright by Microsoft and the Model Context Protocol SDK by Anthropic.

If pilot is useful to you, star the repo — it helps others find it.

Keywords

mcp

FAQs

Package last updated on 30 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts