CortexScout (cortex-scout) — Search and Web Extraction Engine for AI Agents
Overview
CortexScout provides a single, self-hostable Rust binary that exposes search, extraction, and stateful browser automation capabilities over MCP (stdio) and an optional HTTP server. Output formats are structured and optimized for downstream LLM use.
A unified web extraction and stateful automation engine for AI. Replaces heavy testing frameworks with token-optimized browser control, deep research, and HITL.
Yıldızlar
70
Araçlar
—
Çalışma süresi
—
It is built to handle the practical failure modes of web retrieval (rate limits, bot challenges, JavaScript-heavy pages) through progressive fallbacks: native retrieval → Chromium CDP rendering → Stateful E2E Testing → HITL workflows.
Tools (Capability Roster)
Area
MCP Tools / Capabilities
Search
web_search (URL discovery) or web_search(include_content=true) (search+content in one call)
Legacy names remain callable as compatibility aliases (web_search_json, web_fetch_batch, web_crawl, fetch_then_extract, human_auth_session). Agents should prefer the unified primary tools above.
Ecosystem Integration
While CortexScout runs as a standalone tool today, it is designed to integrate with CortexDB and CortexStudio for multi-agent scaling, shared retrieval artifacts, and centralized governance.
🎭 The "Playwright Killer" (Stateful Browser Automation)
CortexScout includes a built-in, stateful CDP automation engine designed specifically for AI Agents, completely replacing heavy frameworks like Playwright or Cypress for E2E testing workflows.
The Silent Omni-Tool (scout_browser_automate): Instead of calling dozens of browser tools, agents pass one array of steps. The runtime now covers Playwright-style action families in one call: navigation, hover/click/type/wait, locator-driven actions, assertions, tabs, screenshots/PDF, file upload, form fill, dialog policy, coordinate mouse actions, route mocking, console/network capture, and cookie/storage CRUD.
Persistent Agent Profile: Automation runs silently in the background (--headless=new) using a dedicated isolated profile (~/.cortex-scout/agent_profile). It maintains cookies, localStorage, and session state across tool calls without causing SingletonLock collisions with your active desktop browser.
QA Mock, Trace, And Verification Engine: Agents can install route mocks (mock_api, route_list, unroute) with response header overrides/stripping, trace flows (trace_start, trace_stop, trace_export), capture console/network logs, checkpoint browser state, and run both CSS and locator-based assertions plus Playwright-style verification helpers.
The Agent Auth Portal (scout_agent_profile_auth): If the silent agent encounters a CAPTCHA or complex OAuth login (like Google/Microsoft) on a new domain, this tool launches the agent's profile in a visible window. You solve the CAPTCHA once, the cookies are saved, and the agent returns to silent automation forever.
The main tradeoff versus raw Playwright MCP is packaging, not capability shape: Cortex Scout keeps the browser surface inside one stateful omni-tool so agents spend fewer turns and fewer tokens coordinating multi-step flows.
Anti-Bot Efficacy & Validation
This repository includes captured evidence artifacts that validate extraction and HITL flows against representative protected targets.
If you also want the optional HTTP server binary, build it explicitly with cargo build --release --bin cortex-scout.
Local MCP smoke test:
python3 publish/ci/smoke_mcp.py
This runs a newline-delimited JSON-RPC stdio session against the local cortex-scout-mcp binary and exercises the main public tools with safe example inputs.
MCP Integration (VS Code / Cursor / Claude Desktop)
Add a server entry to your MCP config.
VS Code (mcp.json — global, or settings.json under mcp.servers):
The hard timeout guard vars below are required in MCP configs. They are the safety rail that prevents a bad page, stalled browser launch, or stuck scrape stage from holding the whole MCP session open indefinitely.
Default behavior is direct/no-proxy. Add IP_LIST_PATH and PROXY_SOURCE_PATH only if you want proxy tools available. If you want proxy_control available without routing normal traffic through proxies, point IP_LIST_PATH at an empty ip.txt file and let agents populate it on demand.
Important: Always use RUST_LOG=warn, not info. At info level, the server emits hundreds of log lines per request to stderr, which can confuse MCP clients that monitor stderr.
Windows: Windows has no env command. Use the command+env object format instead — see docs/IDE_SETUP.md.
With deep research (LLM synthesis via OpenRouter / any OpenAI-compatible API):
Log level. Keep warn for MCP stdio — info floods stderr and confuses MCP clients
HTTP_TIMEOUT_SECS
30
Per-request read timeout (seconds)
HTTP_CONNECT_TIMEOUT_SECS
10
TCP connect timeout (seconds)
OUTBOUND_LIMIT
16
Max concurrent outbound HTTP connections
MAX_CONTENT_CHARS
10000
Max characters returned per scraped page
CORTEX_SCOUT_TOOL_TIMEOUT_SECS
tool-specific
Hard upper bound for every MCP/HTTP tool call. When exceeded, Cortex Scout cancels the tool and returns a structured timeout response instead of hanging
CORTEX_SCOUT_TOOL_TIMEOUT_SECS_<TOOL>
unset
Per-tool override, for example CORTEX_SCOUT_TOOL_TIMEOUT_SECS_SCRAPE_URL=90 or CORTEX_SCOUT_TOOL_TIMEOUT_SECS_VISUAL_SCOUT=20
CORTEX_SCOUT_SCRAPE_STAGE_TIMEOUT_SECS
stage-specific
Shared timeout for heavy scrape stages such as CDP fetch, native scrape, semantic shaving, and history logging
CORTEX_SCOUT_SCRAPE_STAGE_TIMEOUT_SECS_<STAGE>
unset
Per-stage override, for example CORTEX_SCOUT_SCRAPE_STAGE_TIMEOUT_SECS_CDP_INITIAL_ATTEMPT=30
Browser / Anti-bot
Variable
Default
Description
CHROME_EXECUTABLE
auto-detected
Override path to Chromium/Chrome/Brave binary
SEARCH_CDP_FALLBACK
true
Retry search engine fetches via native Chromium CDP when blocked
SEARCH_TIER2_NON_ROBOT
unset
Set 1 to allow hitl_web_fetch as last-resort search escalation
MAX_LINKS
100
Max links followed per page crawl
Search
Variable
Default
Description
SEARCH_ENGINES
google,bing,duckduckgo,brave
Active engines (comma-separated)
SEARCH_MAX_ENGINES_PER_QUERY
3
Max engines queried per search before health-based rotation picks the next set
SEARCH_MAX_RESULTS_PER_ENGINE
10
Results per engine before merge/dedup
SEARCH_ENGINE_STAGGER_MS
125
Delay between per-engine launches to reduce bursty anti-bot triggers
SEARCH_COMMUNITY_TRIGGER_RESULTS
4
Only run Reddit/HN community expansion when primary search returns fewer than this many results
SEARCH_SHARED_CACHE
true
Share successful search results across concurrent Cortex Scout processes on the same host
SEARCH_SHARED_CACHE_TTL_SECS
300
TTL for the shared cross-process search cache
SEARCH_HOST_MIN_GAP_MS
engine-tuned
Cross-process minimum spacing between search-engine requests from the same host IP
SEARCH_HOST_MAX_GAP_MS
engine-tuned
Cross-process maximum spacing/jitter between search-engine requests from the same host IP
SCRAPE_HOST_MIN_GAP_MS
900
Cross-process minimum spacing between scrape requests to the same host
SCRAPE_HOST_MAX_GAP_MS
1800
Cross-process maximum spacing/jitter between scrape requests to the same host
CORTEX_SCOUT_HOST_GUARD_DISABLED
false
Set 1 only if you explicitly want to disable shared host-level throttling
Proxy
Variable
Default
Description
IP_LIST_PATH
—
Optional path to ip.txt (one proxy per line: http://, socks5://). Leave unset to disable proxy support entirely, or point at an empty file to keep proxy tools available but inactive by default
PROXY_SOURCE_PATH
—
Optional path to proxy_source.json (used by proxy_control grab)
Semantic Memory (LanceDB)
Variable
Default
Description
LANCEDB_URI
—
Directory path for persistent research memory. Omit to disable
CORTEX_SCOUT_MEMORY_DISABLED
0
Set 1 to disable memory even when LANCEDB_URI is set
MODEL2VEC_MODEL
built-in
HuggingFace model ID or local path for embedding (e.g. minishlab/potion-base-8M)
Deep Research
Variable
Default
Description
DEEP_RESEARCH_ENABLED
1
Set 0 to disable the deep_research tool at runtime
OPENAI_API_KEY
—
API key for LLM synthesis. Omit for key-less local endpoints (Ollama)
Model identifier (must be supported by the endpoint)
DEEP_RESEARCH_SYNTHESIS
1
Set 0 to skip LLM synthesis (search+scrape only)
DEEP_RESEARCH_HOP_TIMEOUT_SECS
90
Per-hop scrape timeout. When exceeded, deep_research returns partial results instead of hanging until the MCP caller times out
DEEP_RESEARCH_SYNTHESIS_MAX_TOKENS
1024
Max tokens for synthesis response. Use 4096+ for large-context models
DEEP_RESEARCH_SYNTHESIS_MAX_SOURCES
8
Max source documents fed to LLM synthesis
DEEP_RESEARCH_SYNTHESIS_MAX_CHARS_PER_SOURCE
2500
Max characters extracted per source for synthesis
HTTP Server only
Variable
Default
Description
CORTEX_SCOUT_PORT / PORT
5000
Listening port for the HTTP server binary (cortex-scout)
Agent Best Practices
Recommended operational flow:
Call memory_search before any new research run — skip live fetching if similarity ≥ 0.60 and skip_live_fetch is true.
For topic discovery use web_search for URL-only discovery, or web_search(include_content=true) to search and scrape top results in one round-trip.
For known URLs use web_fetch(mode="single") with output_format="clean_json", and set query + strict_relevance=true to keep only relevant sections.
On 403/429: call proxy_control with action:"grab" to refresh the proxy list, then retry with use_proxy:true.
For auth-gated pages: run visual_scout when auth_risk_score >= 0.4, then use hitl_web_fetch(auth_mode="challenge") for CAPTCHA walls or hitl_web_fetch(auth_mode="auth") for login walls.
For deep research: deep_research handles multi-hop search + scrape + LLM synthesis automatically. Tune depth (1–3) and max_sources per run cost budget.
For UI automation and E2E testing: use scout_browser_automate with step arrays for tabs, locator assertions, screenshots/PDF, route mocks, file uploads, and browser-state setup. If blocked by first-time login/CAPTCHA, call scout_agent_profile_auth, then resume automation.
FAQ
Why does deep_research with Ollama or qwen3.5 sometimes fail or fall back to heuristic mode?
Some reasoning-capable local models return OpenAI-compatible /v1/chat/completions responses with message.reasoning populated but message.content empty. Cortex Scout now retries local Ollama endpoints through native /api/chat with think:false when that pattern is detected.
Recommended config for local 4B-class Ollama models:
llm_api_key: "" in cortex-scout.json is valid and means "no auth required"
Keep synthesis_max_sources at 1-2
Keep synthesis_max_chars_per_source around 600-1000
Keep synthesis_max_tokens around 512-768
If you still see slow or unstable synthesis, reduce synthesis_max_sources before increasing token limits.
Why do I see Chromium profile lock errors?
Each headless request uses a unique temporary profile, so normal scraping and deep_research are safe from profile lock races. Only HITL flows (like hitl_web_fetch) using a real browser profile can hit a lock if you run them concurrently or have Brave/Chrome open on the same profile. To avoid: run HITL calls one at a time, and close all browser windows before reusing a profile.
Checklist:
Use a recent build (2026-03-05 or newer)
Avoid persistent profile paths unless you need a logged-in session
Run HITL/profile flows sequentially
Close all browser windows before reusing a profile
Let Cortex Scout use its own temp profiles for concurrent research
My MCP client connects but tools fail or time out immediately. What should I check first?
Check these before anything else:
Use RUST_LOG=warn, not info.
On macOS/Linux env-style configs, pass the binary path directly after the env assignments. Do not insert "--" in mcp.json args.
On Windows, do not use env; use command plus an env object.
Make sure the binary path points to a current build.
A unified web extraction and stateful automation engine for AI. Replaces heavy testing frameworks with token-optimized browser control, deep research, and HITL.
Henüz araç listesi yok. Uzak sunucular ilk sağlık kontrolünden sonra bir liste alır.
SSS
Sorular
Cortex Scout nasıl kurulur?
Bu sayfadan Cursor, Claude Desktop, Claude Code veya VS Code için stdio yapılandırmasını kopyalayın. PlugMCP proxy'sini değil, yayıncının kurulumunu kullanır.
Cortex Scout için API anahtarı gerekiyor mu?
Bu kayıtta gerekli bir ortam değişkeni listelenmiyor.
Cortex Scout hangi aktarımı kullanıyor?
Cortex Scout yerel olarak stdio üzerinden çalışır.
Cortex Scout en son ne zaman kontrol edildi?
Son kontrol: 2026-10-28. A unified web extraction and stateful automation engine for AI. Replaces heavy testing frameworks with token-optimized browser control, deep research, and HITL.