Skip to content

Latest commit

ย 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ DeepCloak

Local-first research with explicit fetch decisions and evidence.

A CLI and MCP wrapper around local-deep-research and CloakBrowser. It retries selected failed fetches in a browser and records the result. Success depends on the source and its access controls.

PyPI CI License: MIT Python 3.11+ MCP native PRs welcome GitHub stars Watch on YouTube

English ยท ํ•œ๊ตญ์–ด ยท ็ฎ€ไฝ“ไธญๆ–‡

Quickstart ยท How it works ยท Use from an agent (MCP) ยท Why we built it ยท Changelog

DeepCloak running: it detects a Cloudflare Turnstile, escalates, and bypasses it โ€” then writes a cited report


The problem

You ask a research tool a question. Half the best sources sit behind a Bot Wall โ€” Cloudflare, Datadome, a Turnstile, a reCAPTCHA. Every other tool gets a 403, silently drops those pages, and hands you a thinner report. You never even learn what it missed.

What DeepCloak does

When a plain fetch hits a Bot Wall, DeepCloak Escalates that one URL to a Stealth Fetch and Bypasses the wall โ€” recovering the content other agents abandon. Then it tells you, at the bottom of every report, exactly how many walls it broke through.

It's a thin, local-first orchestrator over two great projects: local-deep-research (the research loop) and CloakBrowser (the stealth browser). Use it as a CLI, an MCP server, or a Claude skill. MIT.

๐ŸŒ‘ Why we built this

The open web is quietly closing. More of the best writing now sits behind a bot check, and AI research agents โ€” the tools we increasingly trust to read the web for us โ€” go blind at exactly those doors, without ever saying so. A report that silently skips every walled source isn't neutral; it's wrong in a way you can't see.

DeepCloak's stance is simple: your agent should be able to read what a person with a browser can read โ€” and it should be honest about how it got there. It attempts a Stealth Fetch when needed and prints an Evidence Record of the result. The process runs locally; search engines receive queries, source websites receive requests, and a configured cloud LLM receives research context. Choose a local LLM when that context must stay on the machine. Capability and transparency, MIT-licensed, no lock-in.

โœจ Why it's different

Plain deep research DeepCloak
Reads the open web โœ… โœ…
Reads Cloudflare / Datadome / Turnstile / reCAPTCHA pages โŒ dropped silently โœ… Bypassed
Tells you which sources were walled โŒ โœ… Evidence Record
Local-first (no API key required) โœ… โœ…
Fast on open pages โ€” โœ… plain-first, stealth only when needed

Verified live โ€” not mocked. The clip above is an unedited screen recording (captured with ffmpeg, no compositing) of a real deepcloak run against a local LLM (Qwen) + SearXNG โ€” no API key. It Escalates on each Bot Wall and Bypasses 8 Cloudflare/Turnstile walls in one pass, then writes a cited report. Full clip: docs/media/demo-real.mp4; a raw asciinema session is also kept at docs/media/demo.cast. Wall counts vary per run (8โ€“20) because the open web does.

๐Ÿš€ Quickstart

pip install deepcloak
deepcloak setup                       # one-time: downloads the stealth browser
export OPENAI_API_KEY=...             # or ANTHROPIC_API_KEY / GEMINI_API_KEY โ€” or --provider ollama
deepcloak "How does Cloudflare Turnstile detect bots?" --depth detailed --out report.md

You get a cited report.md ending with a ๐Ÿ›ก๏ธ Bypassed N bot-walled sources section, plus a report.md.evidence.json sidecar.

๐Ÿง  How it works

search (DuckDuckGo, no setup) โ”€โ–ถ candidate URLs
        โ”‚
        โ–ผ  for each page:
   plain fetch โ”€โ–ถ Bot Wall detected? โ”€โ”€noโ”€โ”€โ–ถ use it (fast)
                        โ”‚ yes
                        โ–ผ
                  Escalate โ”€โ–ถ Stealth Fetch (CloakBrowser) โ”€โ–ถ Bypass
        โ”‚
        โ–ผ
research loop (local-deep-research) โ”€โ–ถ cited report + Evidence Records

Stealth is heavy, so DeepCloak tries a cheap plain fetch first and only launches the stealth browser when it actually detects a Bot Wall (--stealth auto, the default). Use --depth detailed/report to fetch full pages where Bypasses happen.

๐Ÿค– Connect it to your agent (MCP)

DeepCloak runs as a stdio MCP server exposing deep_research(query, depth, provider, model), quick_summary(query, provider, model), get_evidence(run_id), and list_models(provider).

Claude Code โ€” add to your project's .mcp.json (an example ships in this repo):

{ "mcpServers": { "deepcloak": { "command": "deepcloak", "args": ["mcp"] } } }

Codex โ€” add to ~/.codex/config.toml:

[mcp_servers.deepcloak]
command = "deepcloak"
args = ["mcp"]

Then your agent can call deep_research and read bot-walled sources directly. Prefer a slash-style skill? Drop skill/SKILL.md into ~/.claude/skills/deepcloak/.

โš™๏ธ Configuration

Flag Default Notes
--depth detailed quick / detailed / report
--engine duckduckgo searxng / auto
--stealth auto always / off
--provider / --model auto-detected OPENAI_API_KEY โ†’ ANTHROPIC_API_KEY โ†’ GEMINI_API_KEY โ†’ OPENROUTER_API_KEY; or ollama / lmstudio / llamacpp / openai-endpoint (--base-url)
--respect-robots off honor robots.txt
--proxy โ€” SOCKS5 for the Stealth Fetch
--json off print the full result (report + Evidence Records + settings) as JSON

Picking a model: list what a provider offers with deepcloak models --provider openrouter (works for every provider; local servers via --base-url), then pass --model <id>. With several credentials in your environment and a real terminal, DeepCloak simply asks. Settings persist in ~/.config/deepcloak/config.toml (override with $DEEPCLOAK_CONFIG); precedence: CLI flags > environment > config file.

Run history: finished runs are saved to ~/.local/share/deepcloak/runs/ โ€” browse with deepcloak runs, replay a report with deepcloak show <id> (--json for the full record).

โš ๏ธ Responsible use

DeepCloak Bypasses bot-detection. You are responsible for having the right to access whatever you fetch. robots.txt is ignored by default; pass --respect-robots to honor it (ADR-0002). Don't use it to violate sites' terms or the law.

๐Ÿ—บ๏ธ Roadmap

  • More Bot Wall signatures + smarter Escalation heuristics
  • More search backends beyond DuckDuckGo / SearXNG
  • Cache Bypassed pages across runs
  • Richer Evidence Record export (HTML / JSON schema)

Ideas welcome โ€” start a Discussion or open a feature request.

๐Ÿ› ๏ธ Built on

local-deep-research (MIT) + CloakBrowser (MIT), via pip โ€” no vendored code. Domain glossary in CONTEXT.md; design decisions in docs/adr/; contributing guide in CONTRIBUTING.md.

๐Ÿ“„ License

MIT โ€” see LICENSE and NOTICE.

If DeepCloak read a page your last tool gave up on, drop a โญ โ€” it helps others find it.

Built by Mrbaeksang ยท baeksang.dev ยท contact@baeksang.dev

Star History Chart

About

Local-first research tool with explicit fetch decisions, source evidence, and cited reports. CLI and MCP interfaces. Python, MIT.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

60 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages