peek

io.github.Cubenest由 GitHub 账号 Cubenest 发布v0.1.0-alpha.24更新于 Oct 24, 2026

Exposes recorded browser sessions (rrweb DOM, console, network) to AI coding agents, fully local

发布方自己的服务:Peek

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

本地 MCP 服务器,让 AI 编程助手读取已录制的浏览器会话,并生成可运行的 Playwright 复现测试。

可以做什么
列出并搜索已录制的浏览器会话,可按来源、日期范围、状态以及控制台或网络错误筛选,并获取会话的叙述式摘要。读取控制台错误、失败的网络请求,以及错误发生前的用户操作、DOM 变更与错误的因果链。重建指定时刻的 DOM 快照,并按选择器或时间窗口查询 DOM 历史。从会话生成可运行的 Playwright 测试,可选地加入控制台错误断言。通过带掩码和引用标记的元素视图查看实时页面,并在更高权限级别下执行界面操作、高亮元素和校验本地审计日志。
适用场景
适合调试已在真实浏览器中发生的问题,让助手查看 DOM 历史、控制台与网络错误,并产出 Playwright 回归测试。也适合注重本地隐私、由 peek Chrome 扩展录制会话的工作流。
运行要求
通过 npx 以 stdio 在本地运行,需要 Node.js 22 或更高版本。需先采集会话:安装 peek Chrome 扩展并运行 peek CLI 的 init 向导,它会注册原生消息宿主并把 MCP 服务器接入客户端。可用 PEEK_HOME 指定非默认的采集目录。无需认证或 API 密钥。
安装前请注意
写入类工具可在浏览器中执行真实界面操作;它们受按来源的权限模型控制,默认只读,看似破坏性的操作始终会请求确认。级别 4 会自动允许非破坏性操作而不提示。审计日志只能防篡改检测,并非不可篡改。录制的会话保存在本地,但 MCP 客户端如何处理这些数据不受 peek 控制。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[peek]

@peekdev/mcp

Let your AI coding agent debug what already happened in your real browser — peek reads your locally-recorded sessions (DOM history, console & network errors, the action right before a failure) over MCP and turns them into a runnable Playwright repro. Local-first: peek uploads nothing — what your MCP client does with the data is up to you.

[npm] [downloads] [license] [CI] [OpenSSF Scorecard] [types] [node] [status: alpha] [rrweb-stack MCP server]

Docs: https://peek.cubenest.in

@peekdev/mcp is two things in one binary:

  1. The stdio MCP server that AI coding agents (Claude Code, Cursor, Cline, Windsurf, Continue, Zed) speak to when querying your captured browser sessions.
  2. The native messaging host that Chrome's MV3 extension speaks to when writing into ~/.peek/sessions.db.

The same binary handles both roles — chosen by argv. You don't install this package directly in normal use; the @peekdev/cli peek init wizard wires it into your AI client's MCP config and into Chrome's NativeMessagingHosts/.

Requires Node.js ≥ 22. The native better-sqlite3 dependency only ships prebuilt binaries for Node 22+ — on Node 20 (notably Windows, which has no C/C++ toolchain by default) the install falls back to compiling from source and fails. Use Node 22 or newer.

You probably want @peekdev/cli instead

sh
npm install -g @peekdev/clipeek init

Read on if you're configuring the MCP server manually, building tooling against it, or want the protocol/tool reference.

What this is NOT

  • Not a remote MCP server. Peek is local-only: stdio transport over a child-process pipe. There is no HTTP listener, no SSE endpoint, no remote auth. The MCP transport spec's Streamable HTTP variant is out of scope by design.
  • Not a write-by-default tool. Read tools are unauthenticated. The write tools (execute_action, request_authorization) are gated by the per-origin permission model (off by default) + the destructive blocklist + the audit-log writer. The cross-process IPC that delivers them to the browser native host (LocalSocketHostBridge ↔ HostSocketServer over ~/.peek/host.sock) is now wired: at Level 3 every action prompts the side-panel confirm banner before it runs. The real-browser MAIN-world dispatch + banner UX are covered by the Playwright E2E (e2e/smoke.spec.ts); the bridge, relay, dispatcher, and confirm logic are unit-tested.
  • Not a wrapper around Chrome DevTools Protocol. The server reads recorded events from SQLite; the extension owns capture. No live chrome.debugger access from the MCP server.

One-click install (Cursor)

[Add peek to Cursor]

Click the button (or paste the link into Cursor) and Cursor prompts to add peek to ~/.cursor/mcp.json — no terminal needed. This wires the MCP server only; to capture sessions you still run peek init once (registers the native messaging host) and install the Chrome extension.

Install as a Claude Code plugin

If you use Claude Code, install peek as a plugin in one step:

/plugin marketplace add Cubenest/rrweb-stack/plugin install peekdev@peek

That wires up this MCP server (18 tools) plus the peek skill. You still need the recorder — run npx @peekdev/cli init once and install the peek Chrome extension — before there are sessions to read. Local-first: peek uploads nothing — what your MCP client does with the data is up to you.

Manual MCP-client config

If peek init doesn't recognize your client, paste this into your client's MCP server registry:

json
{  "mcpServers": {    "peek": {      "command": "npx",      "args": ["-y", "@peekdev/mcp@latest"]    }  }}

The @latest tag is required while peek is in alpha: every published version is a prerelease (0.1.0-alpha.*), and a bare npx -y @peekdev/mcp resolves the implicit * range, which doesn't match prereleases (ETARGET: No matching version found for @peekdev/mcp@*). Pinning @latest forces the newest published build.

PEEK_HOME defaults to ~/.peek; set it via env only if you want a non-default capture directory.

The per-user config paths peek init writes to (canonical, see packages/peek-cli/src/lib/init-config.ts):

ClientPath
Claude Code~/.claude.json (or claude mcp add)
Cursor~/.cursor/mcp.json
VS Code (MCP)~/.vscode/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
Cline~/cline_mcp_settings.json

What the AI agent can do

ToolActionAuthorization
list_recent_sessionsList recently recorded sessions, newest first (id, origin, ts, event count)none
search_sessionsFind sessions by text in title/URL/origin plus facets (origin, date range, status, console/network errors). Read-only; returns the same rows as list_recent_sessions.none
get_session_summaryLLM-readable narrative summary of a sessionnone
get_session_console_errorsList console errors recorded in a sessionnone
get_session_network_errorsList failed/notable network requests in a sessionnone
get_user_action_before_errorPre-assembled causal chain for a console error: time-ordered timeline (user action → DOM mutation → network/console error), grouped actions/domMutations/networkErrors, the seed error, a deterministic narrative, and windowMs bounding the correlated window. Backward-compatible: errorId/errorTs/actions are still present.none
generate_playwright_reproGenerate a runnable Playwright test from a session. Emits semantic locators (getByTestId/getByRole/getByPlaceholder/getByText, uniqueness-checked, CSS fallback). Accepts an optional errorId that seeds a console-error-absence assertion so the repro fails while the bug is present and passes once fixed.none
get_dom_snapshotReconstruct the DOM of a recorded session at a given timestamp (forensic)none
query_dom_historyTwo modes: selector mode — timeline of attribute/text changes for one node (as before); window mode (ts + optional windowMs, no selector) — all DOM changes in a time window with target hints.none
get_page_viewLive, masked, ref-tagged list of interactive elements — target a ref in write actions instead of a CSS selector (cheaper + deterministic than get_dom_snapshot)per-origin Level 1+
get_element_detailFull masked detail for one ref from get_page_view (role, name, all aria-*, state, value, href, position, nearby heading, direct interactive children with their refs) — drill in only on the element you need to disambiguate or act onper-origin Level 1+
request_authorizationSide-panel consent for write actions (Level 3)per-action user prompt
execute_actionDispatch a UI action (gated by permission level + destructive blocklist). Pass observe: true on a mutating action (click/type/scroll/enter/dblclick/navigate/…) to also get back a details.viewDelta of what changed (added/removed/changed refs) in one round-trip — instead of re-calling get_page_viewpermission level + destructive blocklist
suggest_elementHighlight an element via a non-destructive overlayper-origin Level 2+
clear_highlightRemove the highlight overlayper-origin Level 2+
set_intentSet the control-shield status bannerper-origin Level 4
request_user_inputPause and hand a field back to the user, then resumeper-origin Level 4
verify_audit_logVerify peek's local action audit log (~/.peek/audit.log) is an intact, tamper-evident hash chain. Returns status (intact / broken / truncated / tail-tampered / prefix-tampered / gaps / incomplete-final / head-missing) + entry count and a short message. Read-only.none

The full tool list is exposed via the MCP tools/list request (spec 2025-11-25 + back-compat for 2025-03-26). Tool docs ship with the binary via tools/list response description fields.

Permission model (the five levels)

Per-origin, 5 levels (0–4). Default is Level 1 — Read-only. Higher levels are opt-in per origin.

LevelNameWhat it allowsDefault
0OffRecording suppressed, tool surface disabled for the origin
1Read-onlyRead recorded sessions; no action executionenabled
2Suggest-onlyRead + highlight DOM via overlay; no DOM mutation
3Act-with-confirmRead + execute actions, each prompting Allow once / Always for this site / Deny
4YOLO this sessionRead + execute non-destructive actions with no prompt (auto-expires on tab close or 60 min)

At Level 3 every execute_action call prompts the user via the side-panel banner (unless a one-shot confirmToken from a prior request_authorization is passed). At Level 4 (YOLO) non-destructive actions are auto-allowed with no prompt. Levels 0–2 deny execute_action.

Destructive-action blocklist (cross-level override) — independent of the level, any action whose resolved target text/label matches a destructive term (delete, remove, transfer, send, pay, withdraw, etc. — full base list in permissions/destructive.ts, extensible via ~/.peek/policy.json) always prompts for confirmation. This overrides all levels, including Level 4 YOLO — it is not a separate "Level 5".

Every execute_action and request_authorization call is appended to ~/.peek/audit.log (JSONL, mode 0600 — peek audit log --json prints it), including denied ones. Each entry carries a seq counter and a prevHash field (SHA-256 of the previous line); a sidecar audit.head.json records the tail hash for truncation detection. Run peek audit verify to recompute the chain and confirm it is intact. The log is tamper-evident, not tamper-proof — it detects corruption, truncation, and reordering, but not a determined attacker who recomputes the chain. No keys, no external anchor, no egress.

The write-path is wired end to end: the five-level model, the destructive blocklist, and the audit-log writer are enforced inside peek-mcp (observable via ~/.peek/audit.log), and the cross-process IPC that lets execute_action fire a click in the browser now lands — a LocalSocketHostBridge (MCP process) ↔ HostSocketServer (native host) over ~/.peek/host.sock, a MAIN-world action dispatcher (click/type/navigate/scroll), and a side-panel confirm banner. Both write levels are implemented: Level 3 (act-with-confirm — every action prompts the banner) and Level 4 (YOLO — non-destructive actions auto-allow, destructive ones still prompt via the blocklist override). Both are opt-in per origin; the default stays Level 1 (read-only). Level 2 highlight (suggest_element / clear_highlight) and the Level-4 control tools (set_intent, request_user_input) are also implemented. The real-browser dispatch + banner are covered by the Playwright E2E (e2e/smoke.spec.ts).

Database

~/.peek/sessions.db — SQLite (better-sqlite3, WAL mode). Schema in src/db/migrations/. The CLI opens this DB read-mostly; the native host writes it during extension capture; the MCP server reads it for tool calls.

The native host is the only writer. The CLI and MCP server only read (except for the audit log, which is append-only JSONL on disk, not in the DB).

Subpath exports

For consumers building tooling on top of peek:

ts
import { generatePlaywrightRepro } from '@peekdev/mcp/mcp/playwright-repro';import { loadSessionEvents } from '@peekdev/mcp/mcp/event-blobs';import { openDb, peekHomeDir } from '@peekdev/mcp/db';import { buildManifest, installManifests } from '@peekdev/mcp/native-host';

These are the subpath exports the @peekdev/cli package uses. API surface is small but stable.

Versioning & compatibility

Semantic Versioning. Currently 0.1.0-alpha.x — pre-release; tool schemas are stable in spirit but new tools may land in patch releases. See SUPPORTED.md for the compatibility matrix (MCP protocol versions, Chrome stable channels, Node versions).

Per-release changes are recorded in the CHANGELOG.

Privacy

Local-only. No network destinations. No telemetry. The MCP transport is stdio over a child-process pipe — your AI client launches peek-mcp, talks to it over stdin/stdout, and kills it when done. The binary holds no persistent state outside ~/.peek/.

Full data-handling policy: docs/peek/PRIVACY_POLICY.md. Threat model: docs/peek/THREATMODEL.md.

Distribution (maintainer-facing)

This section is for the maintainer's submission workflow at Phase 5 launch. If you're a user, you don't need any of this — just npx @peekdev/cli init.

peek is listed (or queued for listing) on the discovery surfaces below. Each linked file is a submission scaffold with pre-filled metadata audited against the registry's current schema as of 2026-05-30 — not a user-facing install guide.

Launch order is documented in docs/peek/distribution/README.md (CWS first, then the MCP-registry fan-out). The Chrome Web Store listing is submitted + live: chromewebstore.google.com/detail/peek/dmgpmkeneheenpdnfmpjjahnkknkaejb.

Related packages

  • @peekdev/cli — the peek init wizard that wires this MCP server into your AI client and installs the native messaging host. Start here.
  • @peekdev/extension — the Chrome MV3 extension that records masked browser sessions and writes them to ~/.peek/sessions.db. Available on the Chrome Web Store; contributors can also load it unpacked from packages/peek-extension/chrome-mv3/ for local builds. The npm package stays private (not published to npm).

License

Apache 2.0. The bundled rrweb engine remains MIT-licensed; see NOTICE.

Contributions are accepted under the Developer Certificate of Origin (DCO) — sign your commits with git commit -s. See CONTRIBUTING.md + SECURITY.md.

来源:packages/peek-mcp/README.md,提交 99d7e1e

工具

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

版本历史

1
  1. v0.1.0-alpha.24最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

其他 Peek 集成