Pagerunner — The Browser Layer That Learns

io.github.Enreign由 GitHub 账号 Enreign 发布v0.8.0更新于 Oct 27, 2026

Real Chrome profiles with site intelligence — already logged in, PII anonymization, sessions persist

概览

AI 生成的概览

一个 Chrome 浏览器自动化 MCP 服务器,使用你现有的 Chrome 配置文件、Cookie 和登录状态驱动真实浏览器,并可选做 PII 匿名化。

可以做什么
  • 管理会话与标签页:列出配置文件,打开、附加或关闭会话,新建和关闭标签页
  • 导航与读取页面:跳转网址、等待选择器、获取可见文本、截图、执行 JavaScript
  • 与页面交互:点击、输入、以框架兼容事件填充表单、选择下拉项、滚动页面
  • 保存与恢复状态:加密的 Cookie/localStorage 快照、标签页状态以及完整会话检查点
  • 存储数据并查看流量:持久化键值存储,以及网络请求和控制台日志
  • 站点智能:查看已学习的站点信息,注册并调用针对站点 API 的 JS 适配器,从网络流量生成适配器
适用场景
适合让助手在你已登录的浏览器中操作:填写表单、走完多步流程、抓取登录后才能看到的页面,或用你的会话调用站点自身 API。也适合在会话之间保存和恢复已认证的标签页状态。
运行要求
以 stdio 本地进程运行;README 提供 Homebrew、Cargo 或预编译二进制安装方式,而清单列出的是 npm 包。需要装有 Chrome 且至少有一个配置文件,并通过 init 命令初始化;注册时须带上 mcp 子命令。适配器生成工具需要 ANTHROPIC_API_KEY。可选的 NER 人名识别需单独构建特性并下载约 65MB 模型。macOS 菜单栏应用为可选项。
安装前请注意
它会用你的真实配置文件启动 Chrome,助手因此可凭你的 Cookie、已保存密码和浏览历史操作,并能在真实网站上点击、输入和提交。检测到的认证令牌和 Cookie 会存入本地加密保险库,适配器可读取。快照和检查点会把会话状态持久化到磁盘。隐身模式会掩盖自动化特征,且你需自行遵守网站服务条款和数据保护法规。属于 v0.x 早期软件,API 可能变动。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Pagerunner — The Browser Layer That Learns,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Pagerunner

[CI] [Release] [License: MIT] [Rust 1.91+]

A Chrome browser automation MCP server. Connect Claude (or any MCP client) to a real Chrome session — using your existing profiles with their cookies, saved passwords, and history.

[!WARNING] Pagerunner is early-stage software (v0.x). APIs and configuration formats may change between releases.

Contents

How it works

Pagerunner launches Chrome with your existing user profile via CDP (Chrome DevTools Protocol) and exposes it as an MCP server over stdin/stdout. Claude can then navigate, click, type, screenshot, and run JavaScript in the live browser.

Setup

1. Install

bash
# Option A — Homebrew (easiest on macOS/Linux):brew tap enreign/pagerunnerbrew install pagerunner
# Option B — Cargo (if you have Rust):cargo install pagerunner# Note: if you get "requires rustc 1.91+" despite having a newer Rust installed,# Homebrew's Rust may be shadowing rustup's. Fix: export PATH="$HOME/.cargo/bin:$PATH"
# Option C — Pre-built binary (no dependencies):
# macOS arm64 (Apple Silicon):curl -L https://github.com/Enreign/pagerunner/releases/latest/download/pagerunner-macos-arm64 \  -o pagerunner && chmod +x pagerunner
# macOS x86_64 (Intel):curl -L https://github.com/Enreign/pagerunner/releases/latest/download/pagerunner-macos-x86_64 \  -o pagerunner && chmod +x pagerunner
# Linux x86_64:curl -L https://github.com/Enreign/pagerunner/releases/latest/download/pagerunner-linux-x86_64 \  -o pagerunner && chmod +x pagerunner
# macOS: if Gatekeeper blocks the binary on first run:xattr -d com.apple.quarantine pagerunner
# Option B — install via cargo (requires Rust):cargo install --git https://github.com/Enreign/pagerunner --locked
# Option C — build locally:cargo build --release

2. Auto-detect Chrome profiles

bash
pagerunner init

This reads Chrome's profile list and writes ~/.pagerunner/config.toml automatically. Run pagerunner status to verify.

Alternatively, write ~/.pagerunner/config.toml by hand — see pagerunner example-config for the format.

3. Register as MCP server

bash
# If installed (Options A or B — binary is in PATH):claude mcp add pagerunner "$(which pagerunner)" mcp
# If built locally (Option C):claude mcp add pagerunner "$(pwd)/target/release/pagerunner" mcp

For Claude Desktop, add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "pagerunner": {      "command": "/absolute/path/to/pagerunner",      "args": ["mcp"]    }  }}

Note: The mcp subcommand is required — registering just the binary path without mcp will not work.

Note: Chrome locks profile directories. Close any Chrome window using a profile before opening a Pagerunner session on it.

4. Set up in your project (optional)

In any project directory with a CLAUDE.md or AGENTS.md:

bash
pagerunner init

Pagerunner prints a ready-to-use usage snippet and offers to append it to your project file automatically. For scripting: pagerunner init --json.

5. (Optional, --features ner builds only) Download the NER model

bash
pagerunner download-model   # ~65MB, enables PERSON/ORG name detection

Using with your project

Copy the example agent instructions into your project root so Claude (or any agent) immediately knows how to use Pagerunner:

bash
# Claude Code projects:curl -sL https://raw.githubusercontent.com/Enreign/pagerunner/main/docs/examples/CLAUDE.md -o CLAUDE.md
# Other agents (Gemini, Codex, etc.):curl -sL https://raw.githubusercontent.com/Enreign/pagerunner/main/docs/examples/AGENTS.md -o AGENTS.md

Or paste the content manually and extend it with project-specific instructions.

Using Pagerunner with Claude Code

For comprehensive guidance, workflows, and examples tailored to 4 different use cases, install the Pagerunner Skill:

bash
# Install the skill (once available in skills.sh registry)claude skill install pagerunner-skill

Or explore the skill repository directly: pagerunner-skill

The skill includes:

  • Quick starts for 4 ICPs: Solo Developer, Power User, Security-Conscious, Server-Side
  • 11 workflow patterns: form filling, authentication, scrolling, multi-step interactions
  • Complete reference: all 38 tools with parameters and examples
  • Security guide: PII anonymization, audit logging, encryption
  • Real-world examples: end-to-end workflows with error handling
  • Troubleshooting: common issues and solutions

Start with the skill's SKILL.md to find your use case and quick start path.

Tools

Sessions & tabs

ToolDescription
list_profilesList configured Chrome profiles
open_sessionLaunch Chrome for a profile, returns session_id
attach_sessionAttach to an existing Chrome instance via --remote-debugging-port
close_sessionKill a Chrome session
list_sessionsList active sessions
list_tabsList open tabs in a session
new_tabOpen a new tab, returns target_id
close_tabClose a specific tab

Navigation & content

ToolDescription
navigateNavigate a tab to a URL
wait_forWait for a CSS selector, URL pattern, or fixed delay
get_contentGet visible text content of a tab
screenshotCapture a tab as PNG (saved to temp file or inline base64)
evaluateRun JavaScript in a tab, returns the result

Interactions

ToolDescription
clickClick an element by CSS selector
type_textType text at the focused element or a given selector
fillSet input value with React/Vue/Angular synthetic events
selectChoose a dropdown option by value
scrollScroll the page by pixels or scroll an element into view

Snapshots & tab state

ToolDescription
save_snapshotSave current page cookies/localStorage to the encrypted DB
restore_snapshotRestore a saved snapshot into the current tab
list_snapshotsList saved snapshots (optionally across all profiles)
delete_snapshotDelete a saved snapshot
save_tab_stateSave all open tab URLs to the DB
restore_tab_stateReopen the previously saved tabs

Key-value store

ToolDescription
kv_setStore a value in a persistent namespace
kv_getRetrieve a value by key
kv_deleteDelete a key
kv_listList keys in a namespace (with optional prefix filter)
kv_clearDelete all keys in a namespace

Network & console

ToolDescription
get_network_logInspect HTTP requests captured in a session
get_console_logCapture JavaScript console output from a tab

Site intelligence

ToolDescription
get_site_knowledgeInspect what Pagerunner has learned about a site (adapters, auth tokens, selector health)
register_adapterStore a JS adapter for direct API calls against a site
call_site_apiExecute a stored adapter in the browser tab
generate_adapterAuto-generate a JS adapter from network traffic using Claude (requires ANTHROPIC_API_KEY)

Session checkpoints

ToolDescription
save_session_checkpointSave full tab state (URLs + scroll positions) for all tabs in a session
restore_session_checkpointReopen all saved tabs and navigate to stored URLs
list_session_checkpointsList saved checkpoints for a profile
delete_session_checkpointRemove a checkpoint by ID

Site Intelligence

Pagerunner learns about sites as you use them and can call site APIs directly using your session credentials — no separate auth setup required.

Adapters are short JS functions stored in the encrypted DB and executed in the browser tab. Use them to call APIs that a site exposes (typically the same API the web UI uses):

register_adapter(origin="https://github.com", name="list-issues",  description="List open issues for a repo",  js_code="async ({owner, repo}) => { const r = await fetch(...); return r.json() }")
call_site_api(session_id, target_id, origin="https://github.com",  name="list-issues", params={"owner": "Enreign", "repo": "pagerunner"})

Seed adapters for GitHub, Linear, Jira, Notion, and Gmail are built in.

Auth token detection — Bearer tokens, API keys, and session cookies discovered in network traffic are stored in the encrypted site vault. Adapters automatically have access to them via the credentials argument.

Selector stability — click, fill, and select track success/failure rates per selector. A fragility warning appears in the tool response when a selector fails >30% of the time over ≥5 uses.

Session Checkpoints

Save complete browser state (all open tabs with URLs and scroll positions) and restore it in any future session:

save_session_checkpoint(session_id, name="before-review")  → checkpoint_id: cp_abc123
restore_session_checkpoint(session_id, checkpoint_id="cp_abc123")  → reopens all saved tabs at their stored URLs

Checkpoints are stored in the encrypted DB and scoped to a profile.

macOS Menu Bar App

A native Swift companion app lives at apps/menubar/. It shows all Chrome profiles, active sessions, open tabs, and daemon status from the menu bar — no terminal required.

Features:

  • One-click open/close sessions and save checkpoints
  • Agent profiles shown with a distinct CPU icon in a separate section
  • Add Profile flow: discovers unconfigured Chrome profiles or creates new agent profiles
  • macOS native notifications: daemon stopped, session crashed, checkpoint saved
  • Global hotkey and auto-update via Sparkle 2.x

Build and run:

bash
pagerunner daemon &cd apps/menubarbash scripts/package.sh   # builds + bundles into scripts/Pagerunner.appopen scripts/Pagerunner.app

Anonymization (PII protection)

Pass anonymize: true to open_session to strip PII from all get_content and evaluate results before they reach Claude. Screenshots are blocked in anonymization mode.

json
{ "tool": "open_session", "profile": "personal", "anonymize": true }

Detected by default: EMAIL, PHONE, CREDIT_CARD, IBAN, SSN, IP With --features ner build: also detects PERSON and ORG names via a local ONNX model

Modes

  • tokenize (default): replaces PII with tokens like [EMAIL:a3f9b2]. Pass tokens back to fill/type_text — Pagerunner de-tokenizes before writing to the DOM.
  • redact: one-way replacement with [EMAIL] — no vault, no de-tokenization.

NER setup (PERSON and ORG name detection)

bash
# 1. Build with NER support:cargo build --release --features ner
# 2. Download the model (one-time, ~65MB):pagerunner download-model

Disable globally in ~/.pagerunner/config.toml:

toml
[ner]enabled = false

Stealth mode

Pass stealth: true to open_session to enable anti-detection: hides automation signals, injects scripts to mask navigator.webdriver, and adds human-like delays between inputs.

json
{ "tool": "open_session", "profile": "personal", "stealth": true }

Example session

open_session(profile="personal")          → session_id: abc123new_tab(session_id, url="https://...")    → target_id: TAB456get_content(session_id, target_id)        → "page text..."click(session_id, target_id, "#button")type_text(session_id, target_id, "hello", selector="#input")screenshot(session_id, target_id)         → "data:image/png;base64,..."close_session(session_id)

Daemon (multiple Claude Code sessions / persistent state)

By default each pagerunner mcp process opens the database directly — only one can run at a time. If you open Pagerunner in a second Claude Code window you'll hit a DB lock error.

Start the daemon once to share state across any number of sessions:

bash
pagerunner daemon &

Each pagerunner mcp instance automatically detects the daemon, connects to it over a Unix socket (~/.pagerunner/daemon.sock), and proxies all tool calls through it. All Claude Code windows share the same open browsers, KV store, and snapshots.

To stop:

bash
pkill -f "pagerunner daemon"

Install as a background service (starts at login, restarts on crash):

bash
./scripts/install-launchd.sh

The script detects your installed pagerunner binary automatically. Logs at ~/.pagerunner/daemon.log.

Note: After installing the daemon service, restart Claude Code. On the next launch, the daemon starts first (via launchd) and the MCP server connects to it in proxy mode. If Claude Code is already running when you install the daemon, you need two restarts: one to let launchd start the daemon, and one for the MCP server to reconnect to it.

Snapshots

Save authenticated browser state to the encrypted local DB:

save_snapshot(session_id, target_id, origin="https://github.com")

Restore it in any future session:

restore_snapshot(session_id, target_id, origin="https://github.com")

Snapshots are encrypted with AES-256-GCM. The key is stored in macOS Keychain under pagerunner / db_key — never written to disk in plaintext.

Legal & Responsible Use

Pagerunner automates a browser you own, using your own credentials. You are responsible for complying with the Terms of Service of any website you automate, applicable data protection laws (GDPR, CCPA), and authorized-access requirements (CFAA and equivalents).

Using anonymize: true is recommended for any workflow that involves processing personal data belonging to other people.

See DISCLAIMER.md for the full legal disclaimer, limitation of liability, and responsible use obligations.


If this project helps you, star the repo — it helps others find it.

来源:README.md,提交 1d22837

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.8.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。