goshawk 标志

goshawk

社区
dondai1234

A browser in the agent's hand. 9 MCP tools, self-diagnosing verdicts, single Go binary.

发布者dondai1234
代码仓库goshawk
语言Go
复刻数
2
星标数
30
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    goshawk 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 30 个 Star 和 2 个 Fork。

🪿 goshawk

A browser in the agent's hand. 9 tools. One verdict per action. Zero guessing.

Navigate, read, click, fill, log in, scrape. Pure Go, single binary, no Node, no Python, no Docker. Built on Chrome DevTools Protocol + MCP. Works with Claude Code, Cursor, OpenCode, Pi, anything that speaks MCP.

Go License: MIT Version GitHub stars

bash
go install github.com/dondai1234/goshawk/v4/cmd/goshawk@latest

Install · The 9 tools · Self-diagnosing verdicts · Comparison · Token cost · What goshawk can't do

Why goshawk

Most browser MCP servers give the agent a raw page snapshot and let it figure out what happened. The agent burns 3 to 5 calls investigating: did the click work? is the page blank? what went wrong? goshawk closes that loop.

  • 🔬 Self-diagnosing verdicts: every action returns a confidence-scored verdict. When something goes wrong, the verdict explains why and what to do next. "did you mean Sign in?" when you type "Sgn in". "errors visible: Email is required. Fix and retry" when a form fails. Zero extra tool calls, no LLM in the loop, pure heuristics.
  • 🪶 9 tools, ~3.4K tokens: dense a11y-tree snapshots (ref-lines, not aria dumps), intent-first actions, one verdict per call. More capability than tools shipping 6K+ tokens.
  • 🦅 Intent-first: act intent="Sign in" finds the button. act fields={"Username":"john","Password":"hunter2"} fills a whole form in one call. Name what you want, not how to find it.
  • 🛡️ Self-healing refs: refs from see/find survive re-renders. When React re-creates a node with the same role+name, goshawk auto-heals the ref. No stale-selector failures.
  • 🍪 Cookie banners auto-dismissed: on every navigate. Consent redirects auto-recovered. The a11y tree comes back clean, not cluttered with "Accept cookies" overlays.
  • 📄 Blank page detection: when a page loads empty (slow SPA, rate-limit, JS not hydrated), the verdict says BLANK PAGE with what to try. One call, not five.
  • 🔐 One-call login: login username= password= handles single-step and multi-step, verifies the resulting state, detects 2FA, SSO redirects, remember-me, forgot-password. Reports state, not HTTP status.
  • 🎭 Named profiles: isolated cookies, auth, storage. Switch identities in one call. Logins survive restarts with persistent profiles.
  • 🦿 Single Go binary: 14 MB. No Node runtime, no Python venv, no Docker. go install and done.

goshawk is for the agent. You install it once; the agent drives the browser through 9 tools.


🧰 The 9 tools

ToolOne-liner
navNavigate to a URL and get an orientation back: page type, auth, primary actions WITH refs, counts. Auto-dismisses cookie banners, detects CHALLENGE and BLANK PAGE. waitSelector= for slow SPAs.
seeInspect the current page. Levels: brief, refs, text, outline (CSS selectors for js), full, shot.
actInteract: click, fill, select, hover, key, upload, or batch form fill (fields={}). Returns a self-diagnosing verdict. Don't re-see after.
jsRun JavaScript, get clean JSON. Helpers: $(sel), text(x), table(sel), links(sel), wait(fn,ms), more.
findLocate elements: role=/text= filters the a11y tree, selector="css" queries the DOM directly.
tabsList, switch, close, label tabs.
historySession action log. errors=true for failures, last=N for recent steps.
sessionreset (relaunch), clear (wipe cookies+storage), profile (named identities: create/switch/export/import).
loginOne-call login. Detects fields, fills, submits, verifies state. Handles multi-step. Reports: logged in / 2FA / CHALLENGE / error / SSO.

🔬 Self-diagnosing verdicts

The feature that sets goshawk apart. Three layers, zero extra tool calls:

Layer 1: "Did you mean?"

When act intent="Sgn in" finds no exact match, goshawk returns the 3 closest matches by Levenshtein distance:

no element named "Sgn in" found; did you mean: "Sign in" (button, r4), "Sign in to GitHub" (heading, r2)?

The agent retries with the right name. No see + find + see investigation loop.

Layer 2: "What blocked it?"

When an action fires but confidence is uncertain or likely, goshawk scans the page for visible error messages, HTML5 validation failures, and blocking modals:

verdict: [uncertain] no visible effect
errors visible: "Email is required". Fix those fields and retry
modal "Login Required" opened - call see to inspect

Layer 3: "What now?"

Each diagnostic is an actionable suggestion, not just a description. The agent knows exactly what to do next without another call.

Pure heuristics. No LLM in the loop. No extra API calls. Works across React, Vue, Angular, vanilla.


🎯 Confidence-scored verdicts

Every act returns a verdict with a confidence tag:

TagMeaningWhen
[confirmed]DOM changed or XHR 2xx firedThe action definitely worked
[likely]Content shifted or XHR firedSomething happened, verify if critical
[uncertain]No visible effectCheck with see or the diagnostics

Navigation is always confirmed. Bot challenges are always uncertain. No more guessing whether a click landed.


📝 Batch form filling

Fill an entire form in one call:

act fields={"Username":"john","Password":"hunter2","Remember me":"true","Country":"United States"}

Each label is resolved to a form field (a11y name + DOM fallback). The type is auto-detected: text, checkbox, radio, select, slider, file. The right action is performed for each. One re-snapshot, validation errors reported.


🔐 One-call login

login username="john" password="hunter2" url="https://example.com/login"

Detects the username + password + submit fields, fills them, submits, and verifies the resulting state. Handles:

  • Single-step (username + password on one page)
  • Multi-step (username first, then password appears)
  • 2FA (stops and reports what's needed)
  • SSO redirects (reports the domain)
  • Remember-me checkbox (reports, doesn't auto-toggle)
  • Forgot-password link (reports it)
  • OAuth buttons (reports, doesn't auto-click)

Verifies state, not HTTP status. A silent failure is reported, not hidden.


🛡️ Self-healing refs

Refs from see and find are stable across re-renders. When a framework re-creates a DOM node with the same role + name (React key change, Vue v-if toggle), goshawk searches the current tree and auto-heals the ref. No stale-selector failures mid-flow.

Refs are per-tab and cleared on navigation. They survive re-renders within a page.


🍪 Cookie banners and consent redirects

Cookie/consent banners are auto-dismissed on every navigate. The a11y tree comes back clean, not cluttered with overlay elements.

If a site redirects to a full-page consent statement (common for EU users), goshawk detects the redirect, tries broader dismissal, and re-navigates to the original URL. If it can't recover, the verdict says CONSENT REDIRECT: original -> current with what to try.


📄 Blank page detection

When a page loads but renders empty (slow SPA hydration, rate-limiting, JS error), goshawk detects it and reports clearly:

BLANK PAGE: no interactive elements or headings detected.
The page may be a slow SPA still loading, may require JS execution,
or may have a rendering issue. Use js to check or see in a moment.

Before: the agent sees interactive: 0, calls see, then find, then see full, then js. 4 to 5 wasted calls. After: one call, the verdict explains what happened.

waitSelector= on nav gives a native waitForSelector for slow SPAs: wait for #dashboard to render before returning the orientation.


🎭 Named profiles

Isolated browser identities. Different logins, cookies, storage. Switch in one call.

session mode=profile action=create name="work"
session mode=profile action=switch name="work"
session mode=profile action=list
session mode=profile action=export        # dump cookies+storage as JSON
session mode=profile action=import data="..."  # restore from JSON

By default, goshawk persists to <os config dir>/goshawk so logins and cookies survive server restarts. The agent doesn't re-login each run. Use --no-persist for throwaway sessions.


🚀 Install

bash
go install github.com/dondai1234/goshawk/v4/cmd/goshawk@latest

Then add to your MCP client config:

json
{
  "mcpServers": {
    "goshawk": {
      "command": "goshawk",
      "args": ["mcp"]
    }
  }
}

Requires Chrome or Chromium installed. goshawk connects via CDP.

FlagDefaultPurpose
--headlesstrue--headless=false for real GPU fingerprint (hard anti-bot)
--user-data-dir<config>/goshawkPersistent profile dir. Logins survive restarts.
--no-persistfalseThrowaway temp profile
--proxy-servernoneProxy URL. Residential proxy fixes most IP-reputation blocks.
--user-agentChrome defaultOverride User-Agent
--viewport1366,768Window size W,H
--no-stealthfalseDisable anti-detection patches
--no-cookie-dismissfalseDisable cookie banner auto-dismiss
--no-evalfalseDisable the js tool
--op-timeout20sPer-operation timeout
--idle-timeout10mAuto-close Chrome after idle period
--allow-insecure-schemesfalseAllow file://, data:, etc.

📊 Comparison

goshawkPlaywright MCPBrowser-usePuppeteer MCP
LanguageGo (single binary)Node.jsPythonNode.js
Tools917+varies10+
Token cost~3.4K~6K+varies~5K+
Self-diagnosing verdictsyesnono (uses LLM)no
Confidence scoringyesnonono
Batch form fillyes (fields=)nonono
Named profilesyesnonono
Self-healing refsyesnonono
Cookie banner auto-dismissyesnonono
Blank page detectionyesnonono
One-call loginyesnonono
Intent-first actionsyesno (selectors)yes (LLM)no (selectors)
Per-call LLMnonoyesno
Runtime depsChrome onlyNode + PlaywrightPython + PlaywrightNode + Puppeteer

🪙 Token cost

Most browser MCP servers cost 5 to 8K tokens just to exist. goshawk's 9 tools cost ~3.4K tokens at tools/list (measured from the live MCP JSON response, 13623 chars). The connect-time instructions (~66 tokens) are injected once at handshake, not repeated every turn.

A nav orientation on a typical page returns ~60 to 80 tokens. A see refs on a page with 10 interactive elements returns ~40 tokens. Dense by design: ref-lines, not aria dumps.


🔧 Things to know first

ThingWhat to know
Chrome must be installedgoshawk connects via CDP to Chrome/Chromium. No Chrome, no browser.
One profile per processChrome locks the profile dir. Run concurrent clients with separate --user-data-dir paths.
20s op timeoutIf a page hasn't loaded in 20s, it's dead. Raise --op-timeout for known slow targets.
Headless may trigger bot detectionUse --headless=false for sites with aggressive anti-bot. A residential proxy (--proxy-server) is the #1 fix for IP blocks.
js tool can be disabledStart with --no-eval to block arbitrary page JS. The other 8 tools still work.

🚧 What goshawk can't do

LimitWhat happens instead
Hard CAPTCHAs (Turnstile, hCaptcha)Reported as CHALLENGE in the verdict. The agent knows to stop, not retry blindly.
Shadow DOM piercingjs with $(sel) reaches open shadow roots. Closed shadow roots need selector= on act or find.
Iframe accessSame-origin iframes are reachable. Cross-origin iframes are blocked by browser security.
No screenshots in headlesssee shot captures the page, but some sites render differently headless. Use --headless=false for visual fidelity.
Rate-limited sitesHN, Reddit, and others may serve "Sorry" pages under heavy headless use. The BLANK PAGE verdict catches this.

If goshawk saves you tool calls, star the repo: it helps others find it.

GitHub stars

MIT · Changelog · Issues

安装

TypingMind
{
  "mcpServers": {
    "goshawk": {
      "command": "goshawk",
      "args": [
        "mcp"
      ]
    }
  }
}

将 goshawk MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 goshawk 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 goshawk 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 goshawk MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "goshawk": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 goshawk MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 goshawk MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 goshawk 帮我完成这项任务吗?
goshawk
当然。我已阅读。
以下是我使用 goshawk 得到的结果。

常见问题

goshawk MCP 服务器有什么用途?

goshawk 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 goshawk MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 goshawk,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 goshawk MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 goshawk 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 goshawk MCP 连接到 TypingMind?

goshawk 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

goshawk MCP 在 TypingMind 中提供哪些工具?

goshawk 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 goshawk MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 goshawk 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇