MCP Hub
Back to servers

webpilot-cli

A semantic terminal browser for LLM agents and CLI-native developers. Browse any website from your terminal — no GUI, no mouse, just commands.

npm216/wk
Updated
Apr 6, 2026

Quick Install

npx -y webpilot-cli

Webpilot

The web, through the eyes of a machine.

npm version License: MIT

A semantic terminal browser that renders web pages as structured, numbered, interactive text. Built for LLM agents (via MCP), CLI-native developers, and automation pipelines.

Key insight: LLMs don't need to see a website — they need to understand it. Webpilot uses the accessibility tree (the same structure screen readers use) to represent any website as numbered elements that both humans and machines can interact with.

$ wpilot https://github.com

┌──────────────────────────────────────────────────────────────┐
  GitHub: Let's build from here
  https://github.com
└──────────────────────────────────────────────────────────────┘

  [1] › link         Sign in
  [2] › link         Sign up
  [3] ⌕ searchbox    Search GitHub
  [4] # h1           Build and ship software on a single platform
  [5] _ textbox      Enter your email address
  [6] ◆ button       ⟦ Sign up for GitHub ⟧

~ › click 1

  Navigated: github.com -> github.com/login

  [1] # h1           Sign in to GitHub
  [2] _ textbox      Username or email address
  [3] _ textbox      Password
  [4] ◆ button       ⟦ Sign in ⟧
  [5] › link         Forgot password?
  [6] › link         Create an account

~ › type 2 octocat@github.com
~ › type 3 ••••••••

~ › ss github-login.png

  Screenshot saved to github-login.png

The screenshot webpilot saves:

Webpilot screenshot of GitHub login with filled credentials

Why Webpilot?

BrowshLynxCarbonylWebpilot
JavaScript supportYesNoYesYes
SPAs (React, Next.js, Vue)YesNoYesYes
LLM-parseable outputNoNoNoYes
MCP server for AI agentsNoNoNoYes
Element interaction by IDNoNoNoYes
State diffsNoNoNoYes
Semantic (a11y tree)NoPartialNoYes
No pixels, no renderingNoYesNoYes
Zero cost (runs locally)YesYesYesYes

Install

npm install -g webpilot-cli
npx playwright install chromium   # one-time browser setup

Quick Start

# Interactive REPL
wpilot https://google.com

# JSON output for LLM agents
wpilot --agent https://google.com

# Pipe mode for scripting
echo 'goto https://example.com
extract --links' | wpilot --pipe

# Shorthand URLs
wpilot :3000              # → http://localhost:3000
wpilot google.com         # → https://google.com

MCP Server (for Claude, ChatGPT, etc.)

Webpilot ships as an MCP server — any LLM agent that supports the Model Context Protocol can browse the web through it.

Setup with Claude Desktop

Add to your claude_desktop_config.json:

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

Setup with VS Code / Copilot

Add to your .vscode/mcp.json:

{
  "servers": {
    "webpilot": {
      "command": "npx",
      "args": ["-y", "webpilot-cli", "--mcp"]
    }
  }
}

Available MCP Tools

ToolDescription
web_navigateOpen a URL and get page state
web_snapshotGet current page as numbered elements
web_clickClick element by [n] ID
web_typeType into input/textarea by [n] ID
web_selectSelect dropdown option
web_scrollScroll up/down/top/bottom
web_backGo back in history
web_extractExtract text, links, tables, forms, or metadata
web_evalExecute JavaScript in page context
web_screenshotCapture page as PNG image
web_tabsList open tabs
web_newtabOpen new tab
web_closeClose browser session

Example Agent Interaction

Agent: web_navigate("https://news.ycombinator.com")
→ 280 elements: [1] link "Hacker News", [2] link "new", [3] link "past" ...

Agent: web_click(5)
→ Navigated to article page, 42 elements

Agent: web_extract({ type: "text" })
→ Full article text extracted

Agent: web_back()
→ Back to Hacker News front page

Commands Reference

CommandDescription
goto <url>Navigate to URL
click [n]Click element by ID
type [n] "text"Type into form field
select [n] "option"Select dropdown option
check [n] / hover [n]Toggle checkbox / hover
press <key>Press keyboard key (Enter, Tab, etc.)
back / forwardBrowser history
refreshReload current page
scroll down|up|top|bottomScroll the page
find "text"Search for text in elements
showRe-display current page state
extract --text|--links|--tables|--forms|--metaExtract structured content
eval "js"Execute JavaScript
screenshot [path]Save screenshot
sourceView page HTML
tabs / tab [n] / newtab / closetabTab management
helpShow all commands

Three Output Modes

  • Human (default) — Colored, formatted for terminal reading
  • Agent (--agent) — JSON structured output for LLM consumption
  • Pipe (auto-detected) — Plain text for grep, awk, scripting

How It Works

Website → Playwright (headless Chromium) → CDP Accessibility Tree → Numbered Elements → You
  1. Playwright launches headless Chromium — full JS, cookies, SPAs, everything works
  2. The accessibility tree is extracted via Chrome DevTools Protocol — semantic structure, not pixels
  3. Elements get numbered IDs[1], [2], [3]... for easy targeting
  4. After each action, a state diff shows what changed, not the entire page
  5. You interact with simple commands: click [3], type [5] "hello"

Works With Everything

  • localhost:3000 — your dev server
  • Public websites — Google, GitHub, HN, anything
  • React / Next.js / Vue / Angular / Svelte — full JS execution
  • SPAs with client-side routing
  • Sites behind login — cookies persist in session
  • Dynamic content — JS runs before each snapshot
  • Forms, dropdowns, checkboxes — full interaction
  • Multi-tab browsing

Use Cases

  • LLM agents browsing the web — Claude/ChatGPT navigate, fill forms, extract data via MCP
  • E2E testing in CI — pipe commands, assert output, no flaky selectors
  • Web scraping — extract links, tables, text from any JS-rendered page
  • Accessibility auditing — see exactly what the a11y tree exposes
  • SSH/headless environments — browse from any terminal, no GUI needed

Development

git clone https://github.com/luckysolanki902/webpilot.git
cd webpilot
npm install
npx playwright install chromium
npm run build    # → dist/index.js
npm run dev      # Watch mode

License

MIT

Reviews

No reviews yet

Sign in to write a review