
Kitewright
io.github.kitewright由 GitHub 帳號 kitewright 發布v0.1.1更新於 Oct 24, 2026
Lightweight browser automation for AI agents: navigate, screenshot, extract, PDF. One small binary.
概覽
Kitewright 是輕量的瀏覽器自動化 MCP 伺服器,讓助理導覽網頁、擷取內容、截圖與輸出 PDF。
- 可以做什麼
- 導覽頁面並取得標題、最終網址與可見文字,可選擇阻擋圖片、媒體與廣告網域的精簡模式。擷取符合選擇器的文字或屬性,或將頁面主內容轉為 Markdown。截圖為 PNG,或將頁面、原始 HTML 輸出為 PDF。點擊、輸入、填寫表單、選取選項、懸停與按鍵,並在動作前等待元素可互動。讀取主控台訊息與網路請求,取得無障礙樹快照,並儲存或還原 cookie 與 localStorage 狀態。
- 適用情境
- 當助理需要實際操作網頁時使用:導覽頁面、擷取內容或轉成 Markdown、截圖、輸出 PDF,或填寫表單與點擊。也適合在資源有限的環境中,以比 Node.js 加 Playwright 更輕量的方式執行瀏覽器自動化。
- 執行需求
- 以 npm 套件在本機執行,需 Node.js 與 npx;伺服器本身不內建瀏覽器,需系統 Chrome/Chromium、以 BROWSER_EXECUTABLE 指定路徑,或先執行 kite install 下載。在無顯示環境需設定 KITE_HEADLESS。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Kitewright,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Kitewright
Browser automation for AI agents as a single small binary. An MCP server (Streamable HTTP + stdio) that gives LLM clients navigate / screenshot / extract — without carrying the Node.js + Playwright stack.
[Kitewright demo — starts in 75 ms, ~8 MB idle, a real MCP endpoint, one-line install]
Install in one line:
Why — measured, not claimed
Head-to-head vs @playwright/mcp 0.0.78, same machine, same Chromium headless-shell build, same page (full methodology):
The browser itself (Chromium) costs the same in any language — warm latency is a tie because both speak CDP to the same browser. The wins are everything around it: startup, distribution, idle footprint, and lifecycle management. The honest gap: playwright-mcp ships ~25 tools today, we ship 21 — closing that is the roadmap.
Reliability — actionability auto-waiting
click / type / fill_form / select_option / hover don't fire blindly. Before acting, the engine polls (100 ms, up to a 5 s per-op budget) until the target element is present, visible (not display:none / visibility:hidden / zero-size), enabled (no disabled / aria-disabled), not covered by another element at its click point, and geometrically stable across two consecutive frames. A settled element passes on the first poll, so this is invisible when things are fine — but when an action can't happen, you get a cause-specific error (not found / not visible / disabled / covered / unstable) instead of a silent misclick or a generic timeout. Transient CDP errors are retried twice. Pass timeout_ms on any interaction tool to override the 5 s per-op budget (e.g. a short timeout to fail fast when you expect an element to already be there).
Performance
External-site latency is network-bound — DNS + TLS + TTFB (~400–600 ms) is a floor no tool beats, and Kitewright does not claim to. What it does attack is every controllable cost around the network:
- Prewarm + warm-context pool. The moment an MCP session initializes, the server launches the browser and fills a small pool of pre-created blank browser contexts (
MCP_CONTEXT_POOL, default 2) in the background. A new session is then handed a ready context+page, so its first navigate pays zero browser-launch and zero context-creation cost. Measured localhost first-navigate: ~31 ms prewarmed vs ~709 ms cold (Apple Silicon; details). The pool drains with the browser on idle-reap and refills lazily on next demand, so idle footprint stays at the ~8 MB baseline. - Lite mode.
browser_navigate {lite:true}(and the default forextract/extract_markdown) blocks images/media/fonts + ad/analytics hosts before the load — 30–70 % faster DOM-ready on heavy pages by skipping the bulk of the bytes. Screenshots/PDF never block resources. - Shared disk cache + connection pre-warm. A stable
--disk-cache-dir(KITE_CACHE_DIR) lets repeat asset fetches hit cache across runs;KITE_PREWARM_URLestablishes DNS+TLS to a known origin during prewarm.
The honest framing: the wins are browser launch, page weight, session start, and connection setup — not the network round-trip to a remote origin.
Architecture
Each MCP session owns one persistent page inside its own Chromium browser context (cookie isolation between agents): log in once, keep clicking. The page and context are closed when the session ends; the browser itself is still reaped after the idle TTL and transparently relaunched on the next call.
Install
The zero-install way — run it straight from npx, like @playwright/mcp:
npx @kitewright/mcp resolves the prebuilt kite binary for your platform (an
optional per-platform dependency, esbuild-style) and starts a stdio MCP server —
no Rust toolchain, no build. See npm/kitewright-mcp.
Prefer the raw kite binary? (npx above is the easy path; these need a Rust toolchain.)
Not yet published to crates.io or Homebrew —
cargo binstall/brewaren't wired up. Usenpx @kitewright/mcp(no toolchain) or thecargo install --gitline above.
Get a browser
Kitewright drives Chromium over CDP but does not embed one. It uses a system
Chrome/Chromium when present, honors BROWSER_EXECUTABLE, and — if neither is
found — falls back to a browser downloaded by kite install:
kite install downloads the current Chrome-for-Testing chrome-headless-shell
build for your platform into $KITE_CACHE_DIR (or the OS cache dir) and the
engine picks it up automatically — no BROWSER_EXECUTABLE needed. Re-running is
a no-op once a build is present. The Docker image already ships Chromium.
Run & connect
kite with no arguments serves MCP over Streamable HTTP (networked, default,
supports auth + many sessions); kite --stdio serves a single session over
stdio for local clients.
HTTP transport — connect from Claude Code:
stdio transport — MCP client config (Claude Desktop, Cursor, …):
Configuration
Security
Kitewright drives a real browser, so treat the endpoint as privileged. The defaults are safe for local use; harden before exposing it.
- Binds loopback (
127.0.0.1:8090) by default. It's only network-reachable if you setMCP_HTTP_BINDexplicitly. If you expose it, setMCP_AUTH_TOKEN— without it the/mcpendpoint is unauthenticated (logged as a warning at boot). Auth uses a constant-time compare; requests are rate-limited; and cross-origin browser requests are rejected (DNS-rebinding protection). - SSRF is inherent to a browser tool. A caller can navigate to internal or
cloud-metadata addresses (
169.254.169.254, RFC-1918,localhost) — which is the point for local/dev automation, but a risk on an exposed instance. Kitewright does not block these (doing so by default would break local automation). On an exposed deployment, put it behind auth and network policy that can't reach sensitive internal endpoints. - Local-file access is off by default.
file://navigation requiresKITE_ALLOW_FILE_URLS=1;browser_fill_secretfile reads requireKITE_ALLOW_SECRET_FILES=1and aKITE_SECRET_DIRfence (reads are canonicalized and must stay under it). - Dependencies are scanned in CI (Trivy +
cargo audit). The shippedkitebinary carries no known-vulnerable crates; see.cargo/audit.tomlfor two DoS advisories confined to the (server-unused)kite-pdfcrate.
Tools (v0.4)
All tools operate on the session's persistent page.
Read
browser_navigate {url, lite?}— title, final URL, visible text (capped).lite:trueenables lite mode: block images/media/fonts + common ad/analytics hosts (doubleclick, google-analytics, GTM, facebook pixel, …) via CDPNetwork.setBlockedURLsfor a faster DOM-ready on heavy pages (30–70 % on heavy sites — text-only, do not use before a screenshot). Sticky for the session until changed.extract/extract_markdowndefault to lite when navigating (pixels irrelevant);screenshot/pdfnever block resourcesbrowser_extract {url?, selector, attribute?}— text/attribute from elements matching a selectorbrowser_extract_markdown {url?}— main content as Markdown ("readability" mode: headings/links/lists/code/tables, nav/script/style stripped, capped at ~20k chars)browser_screenshot {url?, full_page?}— PNG of the current page (urlnavigates first)browser_pdf {url?, format?, landscape?, print_background?, display_header_footer?, header_template?, footer_template?, margin_top?, margin_bottom?, margin_left?, margin_right?, scale?, prefer_css_page_size?}— print to PDF (CDPPage.printToPDF); the full puppeteer option set including running headers/footers (legal text, page numbers) and CSS-unit margins ("35px"/"20mm"). Returns a JSON envelope{format, bytes, base64}(MCP has no native PDF type — decodebase64to get the file)browser_set_content {html, wait_until?}— load a raw HTML string into the current page (puppeteerpage.setContent) via CDPPage.setDocumentContent;wait_untilisload(default) /domcontentloaded/networkidle0. Pair withbrowser_pdffor an HTML→PDF render with no server round-trip. Handles large documentsbrowser_snapshot {diff?}— accessibility-tree snapshot (roles, names, states) capped at ~15k chars;diff:truereturns only what changed since the previous snapshot in this session (first call is the baseline)
Debug
browser_console {clear?}— console messages (log/warn/error/info) captured on the page since the last call;clear:trueempties the bufferbrowser_network {clear?, filter?}— network requests (method, url, status, resourceType) captured on the page;filtersubstring-matches the URL
Interact
browser_click {selector, timeout_ms?}— scroll into view + click the first matchbrowser_type {selector, text, clear?, press_enter?, timeout_ms?}— focus and type into an elementbrowser_fill_form {fields: [{selector, value}], timeout_ms?}— fill several inputs in one call (per-field ok/error summary)browser_fill_secret {selector, secret_ref, press_enter?, timeout_ms?}— type a secret (password) whose plaintext never enters the tool call:secret_refisenv:NAME(a server env var) orfile:/path(opt-in viaKITE_ALLOW_SECRET_FILES+ a requiredKITE_SECRET_DIRfence). Resolved server-side, then typedbrowser_select_option {selector, value?, label?, timeout_ms?}— pick an<option>by value or visible label (fireschange)browser_hover {selector, timeout_ms?}— move the mouse to an element's center (reveals CSS:hovermenus)browser_press_key {key}— send Enter / Tab / Escape / ArrowDown / … to the focused elementbrowser_navigate_back {}— history back, returns the new title + URLbrowser_handle_dialog {accept, prompt_text?}— pre-arm auto-accept/dismiss for the next JS dialog(s)browser_wait_for {selector?, text?, timeout_ms?}— poll until a selector matches or text appears (default 10s, max 30s)
State
browser_save_state {}— capture cookies + localStorage + URL as a JSON string you can persistbrowser_restore_state {state}— set cookies immediately; apply localStorage on/after navigating to its origin ("log in once, reuse across sessions")
Assert
browser_assert {condition_selector?, condition_text?, should_exist?, timeout_ms?}— structured{passed, checked, found, elapsed_ms}(never errors on a failed condition;should_exist:falseasserts absence)
Selector syntax
click / type / fill_form / select_option / hover / wait_for / extract / assert accept three selector forms (the same forms back the internal element-handle API — query / query_all returning ElementRef handles with .click() / .type_str() / .text() / .attribute() / .bounding_box() — that will underpin the Wave-3 Puppeteer-style npm facade):
- CSS (default) — e.g.
#login,button.primary,input[name="email"] text=<visible text>— first visible element whose trimmed text contains itrole=<role>[name="<accessible name>"]— element matching an ARIA role + accessible name, e.g.role=button[name="Submit"]
Role resolution is a pragmatic JS heuristic (implicit-role element map + accessible name from aria-label / aria-labelledby / associated <label> / text / value / placeholder / title / alt), not a full ARIA computed-name implementation — it covers the common interactive roles agents target. Plain CSS extract still returns all matches; a text=/role= extract returns the single resolved element.
@kitewright/node (Puppeteer-compatible, experimental)
bindings/node is a napi-rs native addon that puts a
Puppeteer-shaped facade over kitewright-engine — the browser lifecycle,
CDP, and waiting heuristics run natively in the shared Rust core, so the JS
layer is thin. It targets the common HTML→PDF flow (e.g. an invoice/report
service that uses Puppeteer only for rendering). For that flow the migration is
a one-line import change:
Each Page is one persistent engine session in its own Chromium browser
context, which is exactly the per-createBrowserContext() isolation Puppeteer
promises. page.setContent + page.pdf(footerTemplate) produce a valid,
multi-page PDF with running footers (verified end-to-end in
bindings/node/test/invoice.e2e.mjs, which mirrors invoice-service's real flow
and writes test/out/invoice.pdf).
Compatibility matrix
Notes: waitUntil: 'networkidle0' is approximated as load + a short settle
(inline setContent content, no interception). Unsupported methods throw
rather than silently no-op so callers discover gaps immediately.
Build (local, this platform)
The addon is built separately from the core cargo workspace (it is listed under
[workspace] exclude, so cargo clippy --workspace / the Rust tests never touch
the napi toolchain):
kite-pdf — HTML/Typst → PDF
kite-pdf is a focused document → PDF render service and CLI built on the
same engine (crate crates/pdf, binary kite-pdf). It has two backends,
selected at build time via Cargo features and at run time per request:
- Chromium —
html/url→ PDF via the sharedkitewright-engine(headless Chromium, the fullPage.printToPDFoption set: header/footer templates, margins, landscape, backgrounds, scale, CSS page size). - Typst — a Typst
template+ JSONdata→ PDF with no browser ever spawned. The compiler and fonts are embedded in the binary; rendering is pure CPU, language-agnostic, and reproducible.
One crate, three build shapes (same binary name)
HTTP API
POST /render with a JSON body; responds with application/pdf bytes (200) or a
JSON { "error": "..." } (400 client / 500 server). GET /healthz returns the
compiled-in backends. Bind address: KITE_PDF_BIND (default 0.0.0.0:8091).
Requesting a backend that was not compiled into the running binary returns a
clear 400 (e.g. "typst backend not compiled in this build — use the full or -lite build"). In the Typst template, read the injected data with:
Note: the render service ships with no auth by default — run it on a trusted network or behind a gateway. (Bearer-auth + rate-limit, mirroring the
kiteserver'sHttpGuard, is a TODO.)
CLI
Docker
Honest comparison
- vs Gotenberg: kite-pdf is the lightest self-hosted HTML→PDF option — a single small binary, lazy browser lifecycle, reaped when idle. Gotenberg wins when you need office-document conversion (DOCX/XLSX/ODT via LibreOffice) and a batteries-included API; kite-pdf deliberately does not do office formats.
- vs react-pdf / client PDF libs: the Typst path is browser-free and language-agnostic — no Node runtime, no React, no headless Chrome — just a template + JSON from any language over HTTP. You give up React's component model in exchange for a far smaller, faster, reproducible typesetting pipeline.
- Where it concedes: no office-doc (DOCX/XLSX) conversion, and the Chromium
backend still needs a browser at runtime (the Typst/
-litebackend does not).
Roadmap
-
snapshot— accessibility-tree snapshot (token-budgeted) -
click/type/press_key -
wait_for(selector / text polling) -
fill_form/select_option/hover/navigate_back/handle_dialog - Storage state (
save_state/restore_state) — reuse a login across sessions - Role/text selectors (
text=,role=…[name="…"]) alongside CSS -
assert— structured pass/fail primitive for agent-driven feature tests - Markdown (readability) extraction mode
-
pdf— print the current page to PDF (Page.printToPDF) -
kite-pdf— standalone HTML/Typst → PDF service + CLI (dual-backend, three feature-gated build shapes) - Actionability auto-waiting (visible / enabled / unobstructed / stable) with cause-specific errors
-
console/networkcapture for debugging -
snapshot {diff}— only what changed since the last snapshot - Element-handle primitives (
query/query_all→ElementRef) — foundation for the npm facade - Per-MCP-session browser contexts (cookie isolation) instead of per-call pages
- Bearer-token auth + rate limiting
-
bindings/node: napi-rs Puppeteer-compatible facade (@kitewright/node, experimental) — launch/newPage/createBrowserContext/setContent/evaluate/pdf/goto/close; HTML→PDF flow proven end-to-end -
bindings/node: prebuilt per-platform binaries + npm publish - Python bindings (PyO3)
- Benchmarks vs playwright-mcp (cold start, RSS, image size) for the README
- Prebuilt release binaries (macOS/Linux/Windows) +
cargo binstall+ Homebrew tap
Non-goals
Kitewright is deliberately a lean agent tool, not a QA test framework. It will not:
- Support multiple browser engines. CDP / Chromium only, by design — no Firefox or WebKit. Speaking one protocol to one engine is what keeps the binary tiny and the lifecycle simple.
- Ship a test runner, fixtures, trace viewer, or video capture. Those belong to QA frameworks (Playwright Test, Cypress). Kitewright gives an agent primitives (
snapshot,assert, storage state); the agent — or a thin script — is the runner. - Expose an arbitrary-JS
evaltool. Executing agent- or model-authored JavaScript against live sessions (with restored cookies) is a security footgun. Selector resolution and helpers run curated, fixed JS only.
License
MIT
來源:README.md,提交 e15d129
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分