{
  "markdown": "# Kitewright\n\n**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.\n\n![Kitewright demo — starts in 75 ms, ~8 MB idle, a real MCP endpoint, one-line install](docs/demo.gif)\n\nInstall in one line:\n\n```bash\nclaude mcp add kitewright -- npx -y @kitewright/mcp\n```\n\n## Why — measured, not claimed\n\nHead-to-head vs `@playwright/mcp` 0.0.78, same machine, same Chromium headless-shell build, same page ([full methodology](BENCHMARKS.md)):\n\n| | @playwright/mcp | **Kitewright** |\n|---|---:|---:|\n| Cold start → listening | 354 ms | **75 ms** |\n| Server RSS (idle) | 102–125 MB | **7.6 MB** |\n| Server RSS (after work) | 93 MB | **10.9 MB** |\n| Distribution | 18 MB pkg + Node.js runtime | **6.9 MB static binary** |\n| First navigate (incl. browser launch) | 2623 ms | **822 ms** (session pre-warming) |\n| Warm navigate latency | 80–116 ms | 99–105 ms (tie) |\n| Idle behavior | browser kept alive | **browser reaped after idle TTL**, pre-warmed again on next session |\n\nThe 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.\n\n## Reliability — actionability auto-waiting\n\n`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).\n\n## Performance\n\nExternal-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:\n\n- **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](BENCHMARKS.md)). The pool drains with the browser on idle-reap and refills lazily on next demand, so idle footprint stays at the ~8 MB baseline.\n- **Lite mode.** `browser_navigate {lite:true}` (and the default for `extract` / `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.\n- **Shared disk cache + connection pre-warm.** A stable `--disk-cache-dir` (`KITE_CACHE_DIR`) lets repeat asset fetches hit cache across runs; `KITE_PREWARM_URL` establishes DNS+TLS to a known origin during prewarm.\n\nThe honest framing: the wins are browser launch, page weight, session start, and connection setup — not the network round-trip to a remote origin.\n\n## Architecture\n\n```\ncrates/\n├── engine/    kitewright-engine — CDP core (chromiumoxide): lazy launch, idle reaper,\n│              per-session browser contexts, capped text extraction + AX snapshots.\n│              Shared by all frontends.\n└── server/    kitewright — rmcp Streamable HTTP server exposing the engine as MCP tools.\nbindings/\n└── node/      @kitewright/node — napi-rs bindings exposing a Puppeteer-compatible\n               (experimental) API over the same engine (built separately; kept out\n               of the core cargo workspace). See \"@kitewright/node\" below.\n```\n\nEach 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.\n\n## Install\n\nThe zero-install way — run it straight from **npx**, like `@playwright/mcp`:\n\n```bash\nclaude mcp add kitewright -- npx -y @kitewright/mcp\n```\n\n`npx @kitewright/mcp` resolves the prebuilt `kite` binary for your platform (an\noptional per-platform dependency, esbuild-style) and starts a stdio MCP server —\nno Rust toolchain, no build. See [`npm/kitewright-mcp`](npm/kitewright-mcp).\n\nPrefer the raw `kite` binary? (npx above is the easy path; these need a Rust toolchain.)\n\n```bash\n# From the public repo — builds + installs the `kite` binary:\ncargo install --git https://github.com/kitewright/kitewright kitewright   # → ~/.cargo/bin/kite\n\n# From a local checkout:\ncargo install --path crates/server\n\n# Docker (headless Chromium bundled in the image):\ndocker run --rm -p 8090:8090 kitewright   # build locally: docker build -t kitewright .\n```\n\n> Not yet published to crates.io or Homebrew — `cargo binstall`/`brew` aren't wired up. Use `npx @kitewright/mcp` (no toolchain) or the `cargo install --git` line above.\n\n### Get a browser\n\nKitewright drives Chromium over CDP but does not embed one. It uses a system\nChrome/Chromium when present, honors `BROWSER_EXECUTABLE`, and — if neither is\nfound — falls back to a browser downloaded by `kite install`:\n\n```bash\nkite install    # fetch the latest stable chrome-headless-shell into the kite cache\n```\n\n`kite install` downloads the current Chrome-for-Testing `chrome-headless-shell`\nbuild for your platform into `$KITE_CACHE_DIR` (or the OS cache dir) and the\nengine picks it up automatically — no `BROWSER_EXECUTABLE` needed. Re-running is\na no-op once a build is present. The Docker image already ships Chromium.\n\n## Run & connect\n\n`kite` with no arguments serves MCP over **Streamable HTTP** (networked, default,\nsupports auth + many sessions); `kite --stdio` serves a single session over\n**stdio** for local clients.\n\n```bash\nkite\n# → kitewright listening on http://0.0.0.0:8090/mcp\n```\n\n**HTTP transport** — connect from Claude Code:\n\n```bash\nclaude mcp add kite --transport http http://localhost:8090/mcp\n```\n\n**stdio transport** — MCP client config (Claude Desktop, Cursor, …):\n\n```json\n{\n  \"mcpServers\": {\n    \"kite\": {\n      \"command\": \"kite\",\n      \"args\": [\"--stdio\"]\n    }\n  }\n}\n```\n\n## Configuration\n\n| Env var | Default | Meaning |\n|---|---|---|\n| `MCP_HTTP_BIND` | `0.0.0.0:8090` | Listen address |\n| `MCP_AUTH_TOKEN` | unset | When set, `/mcp` requires `Authorization: Bearer <token>` (401 otherwise). Unset = open access + startup warning |\n| `MCP_RATE_LIMIT_PER_MINUTE` | `300` | Per-client-IP request limit (fixed 60s window); 429 when exceeded |\n| `BROWSER_EXECUTABLE` | auto-detect | Path to chrome / chromium / chrome-headless-shell. When unset: a system Chrome/Chromium is detected, else a `kite install`-managed build in the cache dir |\n| `BROWSER_NO_SANDBOX` | unset | Set (any value) to pass `--no-sandbox` (containers) |\n| `KITE_HEADLESS` | unset | Kite launches a **headed** (visible) browser by default so you can watch automation. Set (any value) to run **headless** — required on servers, CI, and containers with no display, where a headed Chrome fails to launch |\n| `KITE_IDLE_TIMEOUT_SECS` | `1800` | Idle seconds before a headless browser is reaped to free memory. Default 30min keeps a session alive across normal pauses (headed never reaps). A reap that does happen is recovered by cookie **auto-restore**, so an authenticated session survives it. Lower it on a memory-constrained multi-session server |\n| `KITE_ALLOW_SECRET_FILES` | unset | Set (any value) to let `browser_fill_secret` read `file:/path` secrets from disk. **Requires** `KITE_SECRET_DIR` (the directory reads are fenced to) so arbitrary host files can't be read/exfiltrated. `env:` secrets need no opt-in |\n| `KITE_VIEWPORT` | `1440x900` | Default viewport / window size as `WIDTHxHEIGHT` (Chromium's own default is a cramped 800x600). Adjust at runtime with the `browser_resize` tool |\n| `MCP_CONTEXT_POOL` | `2` | Number of pre-warmed blank browser contexts kept ready so a **new** session gets an instantly-usable context+page (zero context-creation latency). `0` disables. The pool refills in the background and drains with the browser on idle-reap (it never keeps the process alive) |\n| `KITE_CACHE_DIR` | `<tmp>/kitewright-cache` | Shared on-disk HTTP cache (`--disk-cache-dir`), stable across launches so repeat asset fetches hit cache. NOTE: per-session isolated contexts (cookie isolation) use an ephemeral cache; this benefits the browser's default context |\n| `KITE_PREWARM_URL` | unset | If set, prewarm navigates a throwaway page to this origin to establish DNS+TLS+connection before the first real navigate. No-op when unset |\n| `BROWSER_PREWARM` | unset | Set (any value) to launch + pre-warm the browser at server boot (otherwise prewarm fires when an MCP session initializes) |\n| `RUST_LOG` | `info` | Log filter |\n\n## Security\n\nKitewright drives a real browser, so treat the endpoint as privileged. The\ndefaults are safe for local use; harden before exposing it.\n\n- **Binds loopback (`127.0.0.1:8090`) by default.** It's only network-reachable\n  if you set `MCP_HTTP_BIND` explicitly. **If you expose it, set `MCP_AUTH_TOKEN`**\n  — without it the `/mcp` endpoint is unauthenticated (logged as a warning at\n  boot). Auth uses a constant-time compare; requests are rate-limited; and\n  cross-origin browser requests are rejected (DNS-rebinding protection).\n- **SSRF is inherent to a browser tool.** A caller can navigate to internal or\n  cloud-metadata addresses (`169.254.169.254`, RFC-1918, `localhost`) — which is\n  *the point* for local/dev automation, but a risk on an exposed instance.\n  Kitewright does not block these (doing so by default would break local\n  automation). On an exposed deployment, put it behind auth and network policy\n  that can't reach sensitive internal endpoints.\n- **Local-file access is off by default.** `file://` navigation requires\n  `KITE_ALLOW_FILE_URLS=1`; `browser_fill_secret` file reads require\n  `KITE_ALLOW_SECRET_FILES=1` **and** a `KITE_SECRET_DIR` fence (reads are\n  canonicalized and must stay under it).\n- **Dependencies** are scanned in CI (Trivy + `cargo audit`). The shipped `kite`\n  binary carries no known-vulnerable crates; see [`.cargo/audit.toml`](.cargo/audit.toml)\n  for two DoS advisories confined to the (server-unused) `kite-pdf` crate.\n\n## Tools (v0.4)\n\nAll tools operate on the session's persistent page.\n\n**Read**\n\n- `browser_navigate {url, lite?}` — title, final URL, visible text (capped). `lite:true` enables **lite mode**: block images/media/fonts + common ad/analytics hosts (doubleclick, google-analytics, GTM, facebook pixel, …) via CDP `Network.setBlockedURLs` for 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_markdown` default to lite when navigating (pixels irrelevant); `screenshot` / `pdf` never block resources\n- `browser_extract {url?, selector, attribute?}` — text/attribute from elements matching a selector\n- `browser_extract_markdown {url?}` — main content as Markdown (\"readability\" mode: headings/links/lists/code/tables, nav/script/style stripped, capped at ~20k chars)\n- `browser_screenshot {url?, full_page?}` — PNG of the current page (`url` navigates first)\n- `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 (CDP `Page.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 — decode `base64` to get the file)\n- `browser_set_content {html, wait_until?}` — load a raw HTML string into the current page (puppeteer `page.setContent`) via CDP `Page.setDocumentContent`; `wait_until` is `load` (default) / `domcontentloaded` / `networkidle0`. Pair with `browser_pdf` for an HTML→PDF render with no server round-trip. Handles large documents\n- `browser_snapshot {diff?}` — accessibility-tree snapshot (roles, names, states) capped at ~15k chars; `diff:true` returns only what changed since the previous snapshot in this session (first call is the baseline)\n\n**Debug**\n\n- `browser_console {clear?}` — console messages (log/warn/error/info) captured on the page since the last call; `clear:true` empties the buffer\n- `browser_network {clear?, filter?}` — network requests (method, url, status, resourceType) captured on the page; `filter` substring-matches the URL\n\n**Interact**\n\n- `browser_click {selector, timeout_ms?}` — scroll into view + click the first match\n- `browser_type {selector, text, clear?, press_enter?, timeout_ms?}` — focus and type into an element\n- `browser_fill_form {fields: [{selector, value}], timeout_ms?}` — fill several inputs in one call (per-field ok/error summary)\n- `browser_fill_secret {selector, secret_ref, press_enter?, timeout_ms?}` — type a secret (password) whose plaintext **never enters the tool call**: `secret_ref` is `env:NAME` (a server env var) or `file:/path` (opt-in via `KITE_ALLOW_SECRET_FILES` + a required `KITE_SECRET_DIR` fence). Resolved server-side, then typed\n- `browser_select_option {selector, value?, label?, timeout_ms?}` — pick an `<option>` by value or visible label (fires `change`)\n- `browser_hover {selector, timeout_ms?}` — move the mouse to an element's center (reveals CSS `:hover` menus)\n- `browser_press_key {key}` — send Enter / Tab / Escape / ArrowDown / … to the focused element\n- `browser_navigate_back {}` — history back, returns the new title + URL\n- `browser_handle_dialog {accept, prompt_text?}` — pre-arm auto-accept/dismiss for the next JS dialog(s)\n- `browser_wait_for {selector?, text?, timeout_ms?}` — poll until a selector matches or text appears (default 10s, max 30s)\n\n**State**\n\n- `browser_save_state {}` — capture cookies + localStorage + URL as a JSON string you can persist\n- `browser_restore_state {state}` — set cookies immediately; apply localStorage on/after navigating to its origin (\"log in once, reuse across sessions\")\n\n**Assert**\n\n- `browser_assert {condition_selector?, condition_text?, should_exist?, timeout_ms?}` — structured `{passed, checked, found, elapsed_ms}` (never errors on a failed condition; `should_exist:false` asserts absence)\n\n### Selector syntax\n\n`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):\n\n- **CSS** (default) — e.g. `#login`, `button.primary`, `input[name=\"email\"]`\n- `text=<visible text>` — first visible element whose trimmed text contains it\n- `role=<role>[name=\"<accessible name>\"]` — element matching an ARIA role + accessible name, e.g. `role=button[name=\"Submit\"]`\n\nRole 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.\n\n## @kitewright/node (Puppeteer-compatible, experimental)\n\n`bindings/node` is a [napi-rs](https://napi.rs) native addon that puts a\n**Puppeteer-shaped** facade over `kitewright-engine` — the browser lifecycle,\nCDP, and waiting heuristics run natively in the shared Rust core, so the JS\nlayer is thin. It targets the common **HTML→PDF** flow (e.g. an invoice/report\nservice that uses Puppeteer only for rendering). For that flow the migration is\na one-line import change:\n\n```js\n// import puppeteer from 'puppeteer'\nimport puppeteer from '@kitewright/node'\n\nconst browser = await puppeteer.launch({ headless: true, args: ['--no-sandbox'] })\nconst context = await browser.createBrowserContext()   // per-invoice isolation\nconst page = await context.newPage()\nawait page.setContent(html, { waitUntil: 'networkidle0', timeout: 0 })\nawait page.evaluate(() => document.fonts.ready)         // promise-returning\nconst pdf = await page.pdf({                            // → Node Buffer\n  format: 'a4', printBackground: true, displayHeaderFooter: true,\n  footerTemplate: legalFooterHtml,                      // legal text + page numbers\n  margin: { top: '20px', bottom: '35px' },\n})\nawait page.close(); await context.close(); await browser.close()\n```\n\nEach `Page` is one persistent engine session in its **own** Chromium browser\ncontext, which is exactly the per-`createBrowserContext()` isolation Puppeteer\npromises. `page.setContent` + `page.pdf(footerTemplate)` produce a valid,\nmulti-page PDF with running footers (verified end-to-end in\n`bindings/node/test/invoice.e2e.mjs`, which mirrors invoice-service's real flow\nand writes `test/out/invoice.pdf`).\n\n### Compatibility matrix\n\n| Supported | Not supported (throws a clear error) |\n| --- | --- |\n| `puppeteer.launch({ headless, args, executablePath })` | request interception (`setRequestInterception`) |\n| `browser.newPage()` / `browser.createBrowserContext()` / `browser.close()` | tracing (`page.tracing`) |\n| `context.newPage()` / `context.close()` | device/viewport emulation (`setViewport`, `emulate`) |\n| `page.setContent(html, { waitUntil })` (`load` / `domcontentloaded` / `networkidle0`) | `page.screenshot` (use the MCP `browser_screenshot` tool) |\n| `page.evaluate(fn \\| string)` incl. promise-returning bodies | `page.waitForSelector`, `addScriptTag`, `exposeFunction` |\n| `page.pdf(options)` — full option set (`format`, `landscape`, `printBackground`, `displayHeaderFooter`, `header/footerTemplate`, `margin`, `scale`, `preferCssPageSize`) → Buffer | `puppeteer.connect` (remote browser) |\n| `page.goto(url)` / `page.close()` | `--no-sandbox` is honored; other Chromium `args` are ignored; `headless:false` is ignored (always headless) |\n\nNotes: `waitUntil: 'networkidle0'` is approximated as load + a short settle\n(inline `setContent` content, no interception). Unsupported methods throw\nrather than silently no-op so callers discover gaps immediately.\n\n### Build (local, this platform)\n\nThe addon is built separately from the core cargo workspace (it is listed under\n`[workspace] exclude`, so `cargo clippy --workspace` / the Rust tests never touch\nthe napi toolchain):\n\n```bash\ncd bindings/node\nnpm install\nnpx napi build --release --js binding.js --dts binding.d.ts   # emits kitewright-node.node\nBROWSER_EXECUTABLE=/path/to/chrome node --test test/invoice.e2e.mjs\n```\n\n## kite-pdf — HTML/Typst → PDF\n\n`kite-pdf` is a focused **document → PDF** render service and CLI built on the\nsame engine (crate `crates/pdf`, binary `kite-pdf`). It has two backends,\nselected at build time via Cargo features and at run time per request:\n\n- **Chromium** — `html`/`url` → PDF via the shared `kitewright-engine` (headless\n  Chromium, the full `Page.printToPDF` option set: header/footer templates,\n  margins, landscape, backgrounds, scale, CSS page size).\n- **Typst** — a [Typst](https://typst.app) `template` + JSON `data` → PDF with\n  **no browser ever spawned**. The compiler and fonts are embedded in the\n  binary; rendering is pure CPU, language-agnostic, and reproducible.\n\n### One crate, three build shapes (same binary name)\n\n| Build | Features | Backends | Approx size | For whom |\n| --- | --- | --- | --- | --- |\n| `kite-pdf` (default) | `chromium` + `typst` | HTML **and** Typst | ~43 MB (macOS arm64, release+LTO) | You want both; one binary renders anything. |\n| `kite-pdf-chromium` | `--no-default-features --features chromium` | HTML only | smallest binary (no Typst/fonts) + runtime browser | You only render HTML/URLs; skip the Typst compiler + bundled fonts. |\n| `kite-pdf-lite` | `--no-default-features --features typst` | Typst only | ~39 MB, **no browser** | You control the template; want a browser-free, distroless service. |\n\n```bash\ncargo build --release -p kite-pdf                                   # both backends\ncargo build --release -p kite-pdf --no-default-features --features chromium\ncargo build --release -p kite-pdf --no-default-features --features typst\n```\n\n### HTTP API\n\n`POST /render` with a JSON body; responds with `application/pdf` bytes (200) or a\nJSON `{ \"error\": \"...\" }` (400 client / 500 server). `GET /healthz` returns the\ncompiled-in backends. Bind address: `KITE_PDF_BIND` (default `0.0.0.0:8091`).\n\n```jsonc\n{\n  \"engine\": \"chromium\" | \"typst\",   // optional; else inferred (html/url→chromium, template→typst)\n  \"html\":   \"<!doctype html>...\",   // chromium\n  \"url\":    \"https://...\",          // chromium\n  \"template\": \"= Invoice ...\",      // typst source\n  \"data\":   { \"number\": \"INV-1\" },  // JSON, exposed to the template as sys.inputs.data\n  \"format\": \"A4\" | \"Letter\" | \"Legal\" | \"A3\",\n  \"landscape\": false,\n  \"print_background\": false,\n  \"display_header_footer\": false,\n  \"header_template\": \"<div>...</div>\",\n  \"footer_template\": \"<div>... <span class=\\\"pageNumber\\\"></span> ...</div>\",\n  \"margin\": { \"top\": \"20px\", \"bottom\": \"40px\", \"left\": \"15px\", \"right\": \"15px\" }\n}\n```\n\nRequesting a backend that was not compiled into the running binary returns a\nclear **400** (e.g. `\"typst backend not compiled in this build — use the full or\n-lite build\"`). In the Typst template, read the injected data with:\n\n```typst\n#let data = json(bytes(sys.inputs.data))\n= Invoice #data.number\n```\n\n```bash\n# Chromium: render an HTML string\ncurl -sX POST localhost:8091/render \\\n  -H 'content-type: application/json' \\\n  -d '{\"html\":\"<h1>Hello</h1>\"}' -o hello.pdf\n\n# Typst: data-driven invoice, no browser touched\ncurl -sX POST localhost:8091/render \\\n  -H 'content-type: application/json' \\\n  -d '{\"template\":\"#let d=json(bytes(sys.inputs.data))\\n= Invoice #d.number\",\"data\":{\"number\":\"INV-7\"}}' \\\n  -o invoice.pdf\n```\n\n> **Note:** the render service ships with **no auth** by default — run it on a\n> trusted network or behind a gateway. (Bearer-auth + rate-limit, mirroring the\n> `kite` server's `HttpGuard`, is a TODO.)\n\n### CLI\n\n```bash\n# Chromium: HTML file → PDF, with a footer template + margins\nkite-pdf render --html-file invoice.html --footer-file footer.html \\\n  --margin-top 20px --margin-bottom 40px -o invoice.pdf\n\n# Typst: template + data → PDF (no browser)\nkite-pdf render --template invoice.typ --data invoice.json -o invoice.pdf\n\n# Run the HTTP service (also the default with no arguments)\nkite-pdf serve\n```\n\n### Docker\n\n```bash\n# Full service (slim Debian + Chromium; both backends). Build from the repo root:\ndocker build -f crates/pdf/Dockerfile      -t kite-pdf      .\n# Browser-free, distroless, Typst-only:\ndocker build -f crates/pdf/Dockerfile.lite -t kite-pdf-lite .\ndocker run -p 8091:8091 kite-pdf\n```\n\n### Honest comparison\n\n- **vs [Gotenberg](https://gotenberg.dev):** kite-pdf is the lightest\n  self-hosted HTML→PDF option — a single small binary, lazy browser lifecycle,\n  reaped when idle. Gotenberg wins when you need **office-document conversion**\n  (DOCX/XLSX/ODT via LibreOffice) and a batteries-included API; kite-pdf\n  deliberately does **not** do office formats.\n- **vs [react-pdf](https://react-pdf.org) / client PDF libs:** the Typst path is\n  **browser-free and language-agnostic** — no Node runtime, no React, no\n  headless Chrome — just a template + JSON from any language over HTTP. You give\n  up React's component model in exchange for a far smaller, faster, reproducible\n  typesetting pipeline.\n- **Where it concedes:** no office-doc (DOCX/XLSX) conversion, and the Chromium\n  backend still needs a browser at runtime (the Typst/`-lite` backend does not).\n\n## Roadmap\n\n- [x] `snapshot` — accessibility-tree snapshot (token-budgeted)\n- [x] `click` / `type` / `press_key`\n- [x] `wait_for` (selector / text polling)\n- [x] `fill_form` / `select_option` / `hover` / `navigate_back` / `handle_dialog`\n- [x] Storage state (`save_state` / `restore_state`) — reuse a login across sessions\n- [x] Role/text selectors (`text=`, `role=…[name=\"…\"]`) alongside CSS\n- [x] `assert` — structured pass/fail primitive for agent-driven feature tests\n- [x] Markdown (readability) extraction mode\n- [x] `pdf` — print the current page to PDF (`Page.printToPDF`)\n- [x] `kite-pdf` — standalone HTML/Typst → PDF service + CLI (dual-backend, three feature-gated build shapes)\n- [x] Actionability auto-waiting (visible / enabled / unobstructed / stable) with cause-specific errors\n- [x] `console` / `network` capture for debugging\n- [x] `snapshot {diff}` — only what changed since the last snapshot\n- [x] Element-handle primitives (`query` / `query_all` → `ElementRef`) — foundation for the npm facade\n- [x] Per-MCP-session browser contexts (cookie isolation) instead of per-call pages\n- [x] Bearer-token auth + rate limiting\n- [x] `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\n- [ ] `bindings/node`: prebuilt per-platform binaries + npm publish\n- [ ] Python bindings (PyO3)\n- [ ] Benchmarks vs playwright-mcp (cold start, RSS, image size) for the README\n- [ ] Prebuilt release binaries (macOS/Linux/Windows) + `cargo binstall` + Homebrew tap\n\n## Non-goals\n\nKitewright is deliberately a lean **agent tool**, not a QA test framework. It will not:\n\n- **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.\n- **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.\n- **Expose an arbitrary-JS `eval` tool.** 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.\n\n## License\n\nMIT\n",
  "bytes": 27074,
  "sha": "46407af23f2e93c4cec9980b48f35fe83dc88495bdfafa98dcd0c5c44674319a",
  "repo_slug": "kitewright/kitewright",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_kitewright_mcp_b8815c3f/readme"
}