
Kloakt
io.github.KultMember6BangerPublished by GitHub account KultMember6Bangerv0.1.2Updated Oct 24, 2026
Cloaked headless browser for AI agents — stealth TLS, smart extraction, SPA fallback
Overview
Kloakt is a local headless browser MCP server that lets an assistant extract clean markdown, crawl pages, snapshot page structure, and drive persistent…
- What you can do
- Kloakt exposes 12 MCP tools for browsing and extraction: kloakt_extract returns clean markdown or structured fields via CSS-selector schemas, kloakt_fetch does low-level HTML/text/links/JS-eval fetches, kloakt_scrape runs many URLs in parallel, and kloakt_search and kloakt_crawl discover links and crawl within budget. It also provides kloakt_snapshot for an accessibility/structure tree, kloakt_screenshot for real PNGs via system Chrome, and session tools (open, act, read, list, close) that keep cookies and page state across calls.
- When to use it
- Use it when an assistant needs to read or act on web pages locally: extracting article or documentation content, scraping lists of URLs, working with JavaScript-heavy SPAs, or driving multi-step interactions such as filling and submitting forms in a persistent session.
- Requirements
- Runs as a local process over stdio; the README shows launching it with python3 and a path to mcp_server.py. Install via prebuilt binary, Homebrew, cargo, or source build; building from source needs Rust 1.75+. Screenshots require a locally installed Chrome/Chromium/Edge, overridable with the KLOAKT_CHROME environment variable. No accounts or API keys are declared.
Installation
In SourceWeft
- Open Kloakt in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Kloakt
Cloaked headless browser for AI agents.
Lightweight, stealthy, built in Rust. Based on Obscura.
Kloakt is a headless browser built for AI agents. It runs JavaScript via V8, extracts clean markdown from any page (including SPAs), and exposes tools via MCP for Claude Code and other AI systems.
Beyond one-shot extraction it can drive persistent, stateful sessions (click, type, navigate — cookies and page/JS state persist across calls), emit an accessibility/structure snapshot as an agent-vision substitute, and capture real screenshots via system Chrome — 12 MCP tools in all.
Why Kloakt?
Install
Prebuilt binary (recommended)
One-line install (Linux & macOS). Downloads the right binary for your OS/arch from the latest GitHub Release and installs it to ~/.local/bin (or /usr/local/bin when run as root):
You can pin a version or override the install dir:
Windows: download kloakt-x86_64-windows.zip from the Releases page and extract kloakt.exe onto your PATH.
Homebrew (macOS)
(Until a dedicated tap exists, brew tap KultMember6Banger/kloakt https://github.com/KultMember6Banger/kloakt then brew install kloakt.)
cargo install
Builds the CLI from crates.io (requires Rust toolchain; first build compiles V8, ~5 min):
This installs the kloakt binary. To build with stealth mode, add --features stealth.
Build from source
Requires Rust 1.75+ (rustup.rs). First build takes ~5 min (V8 compiles from source, cached after).
Quick Start
Extract content (AI agent use)
Fetch a page
Start the CDP server
Scrape in parallel
Snapshot page structure (agent vision)
kloakt has no rasterizer, so this is the lightweight "what's on the page and what can I act on" view for agents that work from structure rather than pixels.
Screenshot (via system Chrome)
Persistent sessions
Drive a named session whose cookies and page/JS state survive across separate
invocations, backed by a running kloakt serve daemon:
Smart Extraction
The extract command uses a multi-phase pipeline optimized for AI agents:
- Noise removal — strips cookie banners, ads, popups, nav, social widgets
- Content scoring — text-density algorithm (Readability-like) finds the main content block
- Markdown conversion — DOM-to-markdown with absolute URL resolution
- SPA fallback — when JS rendering fails, extracts from meta tags, Open Graph, JSON-LD, and noscript content
Works on static HTML, server-rendered pages, and pure client-side SPAs (React, Vue, etc.).
Python API
MCP Server (Claude Code)
Kloakt includes an MCP server for use as a Claude Code tool:
Exposes 12 native tools:
Puppeteer / Playwright
Puppeteer
The CDP server embeds a per-session token in the WebSocket path (like Chrome). Connect via
browserURL so the client discovers the token from /json/version automatically — don't
hardcode the ws://.../devtools/browser path.
Playwright
Stealth Mode
Enable with --features stealth.
- Per-session fingerprint randomization (GPU, screen, canvas, audio, battery)
- Realistic
navigator.userAgentData(Chrome 145, high-entropy values) event.isTrusted = truefor dispatched events- Native function masking (
Function.prototype.toString()→[native code]) navigator.webdriver = undefined- Realistic
Accept-Language+ Client Hints (Sec-CH-UA) request headers - Per-session randomized
navigator.languages - TLS fingerprint (JA3) rotation across Chrome 145 Linux / Windows / macOS profiles
- 3,520 tracker domains blocked
CLI Reference
kloakt extract <URL>
Structured extraction with --schema
Pass a JSON object mapping field names to CSS selectors. Suffix a selector with [] to
return all matches as a list, and with @attr to return an attribute instead of text:
This is also exposed through the MCP kloakt_extract tool via an optional schema argument.
kloakt fetch <URL>
kloakt serve
kloakt scrape <URL...>
kloakt snapshot <URL>
Emit an indexed accessibility/structure tree (always JSON) — an agent-vision substitute.
Each node is compact: i (index), tag, depth, vis (visible), and when present click,
role, text, type/value, href, id, name, label.
kloakt screenshot <URL>
Capture a real PNG by delegating to a locally-installed Chrome/Chromium/Edge (kloakt has no
rasterizer). Errors clearly if none is found; override detection with --chrome <path> or the
KLOAKT_CHROME env var.
kloakt session <COMMAND>
Drive a persistent, named session against a running kloakt serve daemon. Cookies and
page/JS state survive across separate invocations (client state in ~/.kloakt/sessions/<name>.json).
Multi-statement JS passed to
evalreturnsnull(the daemon evaluates a single expression); wrap it in an IIFE —(function(){ ...; return v })()— to get a value back.
kloakt benchmark <URL...>
Measure load performance per URL — average/min/max load time, request count, bytes, and DOM
node count — as a table or --json.
Challenge / bot-wall detection
kloakt extract --json includes a "challenge" field reporting a detected captcha or bot
wall (recaptcha, hcaptcha, turnstile, cloudflare, datadome, perimeterx) or
null. This is detection only — kloakt tells you a page is gated so an agent can stop
and back off; it does not attempt to solve or evade challenges. (Also surfaced via the MCP
kloakt_extract output and the Python Page.challenge field.)
Global flags
Security note: by default kloakt refuses to fetch private, loopback, link-local, and cloud-metadata addresses (SSRF protection), and rejects
file://URLs. Use--allow-privateonly when you intentionally need to reach internal services. The CDP server binds to127.0.0.1and validates theHostheader to block DNS-rebinding.
CDP API
Full Chrome DevTools Protocol support for Puppeteer/Playwright compatibility.
License
Apache 2.0 — Based on Obscura by h4ckf0r0day.
Source: README.md at commit 6159897
Tools
0Version history
1- v0.1.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts