Cloak

Bot-resistant stealth browser, AES-256 credential vault, layout sensor, and self-improving behaviour patterns. Available as MCP tools in Claude Desktop and as SDK methods.

Requires Playwright: most Cloak tools use a headless Chromium browser. Install with npm install playwright && npx playwright install chromium.

Fetching Pages

cloak_fetch
MCP · SDK
Fetch a URL via stealth headless browser. Strips scripts, ads, and navigation. Returns clean compressed text — typically 90–98% smaller than raw HTML. Results are cached locally for cloak_diff.
url (required) · force: boolean · limit: integer (max chars)
cloak_fetch_smart
MCP · SDK
Smart fetch — checks llms.txt first. If the site publishes an LLM-friendly text file, uses that directly (faster, cleaner). Falls back to stealth browser if not found.
url (required) · force: boolean · skipLlmsCheck: boolean
cloak_diff
MCP · SDK
Returns what semantically changed on a URL since last fetch. Run cloak_fetch at least twice to build history. Useful for monitoring pages for updates without re-reading everything.
url (required)
cloak_render
MCP · SDK
High-fidelity sensor. Renders the page with full JS execution, resolves computed CSS, audits font loading, detects layout gaps, and reports failed assets. Use for debugging visual issues.
url (required) · selectors: string[] · mobile: boolean
example
// Fetch and monitor a page for changes
const r = await cloak.cloak_fetch('https://example.com');
console.log(r.text);        // clean text
console.log(r.tokensSaved); // e.g. 42000

// Next day — see what changed
const diff = await cloak.cloak_diff('https://example.com');
console.log(diff.changes);  // only what's new

Credential Vault

cloak_passport
MCP · SDK
AES-256-GCM encrypted key-value vault. Machine-bound — the vault is unreadable on any other machine. Store API keys, session cookies, OAuth tokens. Omit value to read. Never stored in plaintext.
key (required) · value (omit to read)
example
// Store a credential
cloak.cloak_passport('openai-key', 'sk-proj-...');

// Read it back
const key = cloak.cloak_passport('openai-key');

// In MCP (Claude Desktop):
// "Store my API key in the vault as 'openai-key'"
// "Read 'openai-key' from the vault"

Browser Identities

Persistent browser fingerprint profiles. Each identity has a unique user agent, WebGL noise, canvas fingerprint, timezone, language, and cookie storage. Cookies and visit history persist across sessions.

cloak_identity_create
MCP · SDK
Create a new persistent browser identity. Full fingerprint generated from a seed — deterministic if seed is provided.
name (required) · seed: string (optional, for deterministic fingerprint)
cloak_identity_use
MCP · SDK
Browse a URL using a saved identity. Applies full fingerprint profile, maintains cookies, records visit history.
name (required) · url (required)
cloak_identity_list
MCP · SDK
List all saved identities with their profile summary — last visit, cookie count, visit history.
no parameters

Warmup & Behaviour Injection

Defeat behavioural fingerprinting on Cloudflare, reCAPTCHA v3, and DataDome. Warmup primes trust scores before navigation; behaviour injection simulates human mouse and scroll patterns during a session.

cloak_warmup_session
MCP · SDK
Run a reCAPTCHA v3 session warmup before navigating to a bot-protected URL. Visits a realistic referrer chain, simulates human dwell behaviour, and primes the trust score. Call this before cloak_fetch on aggressively protected sites.
targetUrl (required) · identityName · sites (default: 3) · dwellMs (default: 2500) · primeGoogle (default: true)
cloak_inject_behaviour
MCP · SDK
Inject human-realistic mouse and scroll behaviour into an active browser session. Choose a category (reading, form, shopping, login, idle) or replay a recorded pattern by name.
url (required) · category · patternName · speedFactor (default: 1.0) · synthetic: boolean · durationMs
cloak_warmup_stats
MCP
Show what the warmup strategy does — trust signals built, referrer chains visited, timing breakdown.
no parameters

Pattern Store

Self-improving behaviour pattern library. Patterns are scored on win/loss rates and promoted or pruned automatically. Elite patterns are used preferentially on protected sites.

cloak_pattern_statsShow tier breakdown, win/loss rates, and total sessions recorded across all patterns.
cloak_pattern_listList all patterns with score, tier (elite/active/probation), wins, and losses. Filter by tier.
cloak_pattern_pruneForce prune — removes stale, low-scoring, and aged-out patterns immediately.
cloak_pattern_seedSeed the store with built-in patterns. Only runs if the store is empty.
cloak_load_patternLoad a custom pattern recorded with the browser recorder snippet. Pass the JSON string from the recorder.
cloak_behaviour_statsList all available behaviour patterns and categories currently loaded.

TurboQuant Compression

Compress your memory database's vector storage by up to 10x using 3-bit quantisation. Less than 1% similarity loss in practice.

turbo_quant_compress
MCP · SDK
Migrate your existing memory database to TurboQuant 3-bit compressed vector storage. Run once on an existing database — subsequent writes use compressed storage automatically.
dbPath: string (defaults to VEKTOR_DB_PATH or ~/vektor-slipstream-memory.db)
turbo_quant_stats
MCP · SDK
Show compression statistics for the current embedding configuration — bits per dimension, storage reduction ratio, similarity accuracy.
no parameters

CAPTCHA Handling

cloak_detect_captchaNavigate to a URL and detect if a CAPTCHA is present. Returns type (hcaptcha, recaptcha-v2, recaptcha-v3) and site key.
cloak_solve_captchaDetect and solve any CAPTCHA using vision AI (Claude or GPT-4o). Injects the solution token automatically. Set ANTHROPIC_API_KEY or use provider: "openai".

Note: CAPTCHA solving uses your Claude or OpenAI API key for vision inference. Set ANTHROPIC_API_KEY in your environment. The key is never stored — it's used for a single inference call per CAPTCHA.

SDK Import

javascript
const cloak = require('vektor-slipstream/cloak');

// Fetch
const { text, tokensSaved } = await cloak.cloak_fetch('https://example.com');

// Vault
cloak.cloak_passport('my-key', 'secret-value'); // write
const val = cloak.cloak_passport('my-key');      // read

// Identity
const { CloakIdentity } = cloak;
const id = CloakIdentity.create('researcher-1');
id.save();

// TurboQuant
const stats = cloak.turboQuant.compressionStats(384);
← DXT Troubleshooting →