Ghosthand

Ghosthand

Enables MCP-capable coding agents to read and drive the user's browser page with a visible, human-like cursor that evades bot detection.

Category
访问服务器

README

Ghosthand

Human-like cursor browser automation for coding agents, over MCP.

Ghosthand lets any MCP-capable coding agent (Claude Code, Cursor, …) read the page you're looking at and drive it with a visible, human-like cursor — one that's convincing both to a person watching the screen and to behavioral bot detection.

The major agent browser servers (Playwright MCP, browser-use, Stagehand, Skyvern) don't ship human-like cursor movement in their open-source core — stealth is paywalled into cloud tiers. Ghosthand is that missing piece, MIT licensed.

Status: phase 1 (Chrome extension). Phase 2 (macOS OS-cursor for genuinely trusted events) is on the roadmap. See docs/DESIGN.md.

How it works

Three layers, with one shared wire contract (src/protocol):

coding agent ──MCP/stdio──▶ MCP server ──localhost WebSocket──▶ Chrome extension ──▶ your real tab
                            (src/server)                        (extension/)
                                 │
                                 ▼
                          human-path engine (src/path-engine)
            from + to → timed cursor samples with overshoot, log-normal
            velocity, jitter, off-center landing, dwell — fresh every call

The MCP server generates the cursor sample stream; the extension is a thin replayer. The same stream works for the content-script driver, the chrome.debugger stealth driver, and (phase 2) the OS cursor — they all implement one BrowserDriver interface.

Why human-like movement is hard

Modern detectors (DataDome, Castle, reCAPTCHA v3, PerimeterX) flag overly smooth Bézier paths, constant velocity, dead-center clicks, zero dwell, teleporting jumps, and replayed identical paths. The engine addresses each:

  • Fitts's law sets per-move duration from distance and target size.
  • Asymmetric, eased velocity — not a symmetric min-jerk bell.
  • Overshoot-and-correct on long moves.
  • Sub-pixel Gaussian jitter, zero at the endpoints.
  • Off-center landing inside the target.
  • Right-skewed dwell before the press.
  • Per-call entropy — paths are never cached or replayed.

Realism is necessary but not sufficient: content-script events are isTrusted=false, and chrome.debugger still leaks CDP tells. The real evasion endgame is the phase-2 OS cursor (genuine, trusted OS events).

Install

git clone <your-fork-url> ghosthand
cd ghosthand
npm install
npm run build      # builds dist/index.js + extension/dist/*

1. Load the extension

  1. Open chrome://extensions, enable Developer mode.
  2. Load unpacked → select the extension/ folder.
  3. Keep a normal http(s) tab open and focused (not chrome:// or the Web Store — content scripts can't run there).

2. Connect your agent

Claude Code:

claude mcp add ghosthand -- node /absolute/path/to/ghosthand/dist/index.js

Any MCP client (JSON config):

{
  "mcpServers": {
    "ghosthand": {
      "command": "node",
      "args": ["/absolute/path/to/ghosthand/dist/index.js"]
    }
  }
}

The server hosts the extension WebSocket on ws://127.0.0.1:8787 (override with GHOSTHAND_WS_PORT). The extension reconnects automatically.

Tools

Tool What it does
read_page Interactive elements with [ref] handles, roles, rects + visible text.
move_to Human path to a ref or x/y. No click.
click Human move + click. button, double, stealth.
type Type with human key timing; human-clicks a ref to focus first.
scroll Eased scroll by dy/dx.
navigate Point the active tab at a URL.
get_url Current tab URL.
wait_for Wait for a ref or visible text.

Any driving action accepts stealth: true to deliver trusted events through the chrome.debugger driver (this shows Chrome's "debugging this browser" banner).

Measuring realism

Open test-detector/index.html and click the targets by hand, then drive them with the agent. Each click is scored on straightness, velocity variance, dwell, off-center landing, overshoot, and isTrusted — the same features detectors use. Use it to tune the engine.

Development

npm run dev         # run the server with tsx (no build)
npm run typecheck    # tsc --noEmit
npm test             # vitest (path-engine unit tests)
npm run build:ext    # rebuild just the extension

Credits

The path engine builds on the ghost-cursor lineage (Bézier + Fitts) and the mouse-dynamics literature — WindMouse, SapiAgent, BeCAPTCHA-Mouse, and the vendor write-ups from DataDome and Castle on what makes synthetic movement detectable. See docs/DESIGN.md.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选