MCP Hub
Back to servers

ScrapeLab MCP

Enables undetectable web scraping and browser automation for AI agents with 84 tools including stealth navigation, element extraction, network interception, and auto cookie consent dismissal. Bypasses anti-bot systems like Cloudflare and DataDome while providing LLM-ready markdown output and full Chrome DevTools Protocol access.

glama
Updated
Apr 6, 2026
ScrapeLab MCP

ScrapeLab MCP

The most complete stealth browser MCP server for AI agents.

84 tools. Undetectable by anti-bot systems. Full CDP access.
LLM-ready markdown. Auto cookie consent dismiss (100+ CMPs).
Accessibility snapshots, PDF export, HAR capture, network hooks, element cloning.

MCP License Python Tools


What is this?

An MCP server that gives AI agents (Claude, Cursor, Windsurf, etc.) a fully undetectable browser with 84 automation tools. Built on nodriver + Chrome DevTools Protocol + FastMCP.

Why not Playwright MCP? Playwright is detectable. Sites with Cloudflare, DataDome, or any anti-bot system will block it. ScrapeLab uses nodriver (the successor of undetected-chromedriver) — no navigator.webdriver flag, no automation fingerprints, no detection.

Key differentiators

FeatureScrapeLab MCPPlaywright MCPStealth Browser MCP
Anti-bot bypass (Cloudflare, DataDome)YesNoYes
Markdown output (LLM-ready)YesYesNo
Cookie consent auto-dismiss (100+ CMPs)YesNoNo
Accessibility snapshotsYesYesNo
PDF exportYesYesNo
HAR exportYesNoNo
Network interception + hooksDeep (Python hooks)Routes onlyDeep
Element cloning (styles, events, animations)Full CDPNoFull CDP
Progressive element cloningYesNoYes
Tools846190
Modular sections (enable/disable)YesCapabilitiesYes

LLM-Ready Markdown

get_page_content returns clean markdown instead of raw HTML — 98-99% smaller, ready for LLM consumption.

ModeEngineBest forSize reduction
readability=False (default)html2textFull page structure, navigation, all content~98%
readability=TruetrafilaturaArticle/main content only, precision extraction~99%

Both modes strip scripts, styles, SVGs, cookie banners, navigation chrome, and HTML comments before conversion.

Cookie Consent Auto-Dismiss

Every navigate call automatically dismisses cookie/GDPR consent popups. No manual clicks, no leftover overlays blocking your scraper.

Three-layer system:

  1. DuckDuckGo autoconsent — 2863 rules covering 100+ consent management platforms (iubenda, Cookiebot, OneTrust, Quantcast, TrustArc, etc.)
  2. CMP JS API fallback — Calls platform APIs directly from the main page (_sp_.destroyMessages(), OneTrust.AllowAll(), __tcfapi, Didomi, Cookiebot) — handles cross-origin iframe popups like SourcePoint
  3. DOM click fallback — Catches multi-step consent flows (e.g. iubenda's 2-click Italian flow) by re-clicking accept buttons

Disable per-instance with spawn_browser(auto_dismiss_consent=False).


Quickstart

1. Clone and install

git clone https://github.com/competitorch/ScrapeLabMCP.git
cd ScrapeLabMCP
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2. Add to your MCP client

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "scrapelab-mcp": {
      "command": "/path/to/ScrapeLabMCP/.venv/bin/python",
      "args": ["/path/to/ScrapeLabMCP/src/server.py"]
    }
  }
}

Claude Code CLI:

claude mcp add-json scrapelab-mcp '{
  "type": "stdio",
  "command": "/path/to/.venv/bin/python",
  "args": ["/path/to/src/server.py"]
}'

3. Use it

You: "Open a browser and navigate to example.com"
You: "Take a screenshot and get the accessibility snapshot"
You: "Get the page content as markdown"
You: "Export the page as PDF"
You: "Show me all network requests and export as HAR"

Tools Reference (84 tools)

Browser Management (10 tools)

ToolDescription
spawn_browserLaunch undetectable browser instance (headless, proxy, custom UA, auto-consent)
navigateNavigate to URL with wait conditions + auto cookie consent dismiss
close_instanceClean shutdown of browser instance
list_instancesList all active browser instances
get_instance_stateFull page state (URL, cookies, storage, viewport)
go_back / go_forwardBrowser history navigation
reload_pageReload with optional cache bypass
get_accessibility_snapshotStructured accessibility tree — the fastest way for an LLM to understand a page
save_as_pdfExport page as PDF with full layout control

Element Interaction (11 tools)

ToolDescription
query_elementsFind elements by CSS/XPath with visibility info
click_elementNatural click with fallback strategies
type_textHuman-like typing
paste_textInstant paste via CDP
scroll_pageDirectional scrolling
wait_for_elementSmart wait with timeout
execute_scriptRun JavaScript in page context
select_optionDropdown selection
get_element_stateElement properties and bounding box
take_screenshotScreenshot (viewport, full page, or element)
get_page_contentHTML, text, or markdown (readability=True for article extraction)

Element Extraction (8 tools)

Deep extraction with optional save_to_file=True on every tool.
Style extraction supports method="js" or method="cdp" for maximum accuracy.

ToolDescription
extract_element_styles300+ CSS properties, pseudo-elements, inheritance chain
extract_element_structureDOM tree, attributes, data attributes, children
extract_element_eventsEvent listeners, inline handlers, framework detection
extract_element_animationsCSS animations, transitions, transforms, keyframes
extract_element_assetsImages, backgrounds, fonts, icons, videos
extract_related_filesLinked CSS/JS files, imports, modules
clone_element_completeMaster clone: all of the above in one call (method="comprehensive" or "cdp")

Progressive Cloning (10 tools)

Lazy-load element data on demand — start lightweight, expand what you need.

ToolDescription
clone_element_progressiveBase structure with element_id for on-demand expansion
expand_styles / expand_events / expand_childrenExpand specific data categories
expand_css_rules / expand_pseudo_elements / expand_animationsExpand detailed styling data
list_stored_elements / clear_stored_element / clear_all_elementsManage stored elements

Network & Traffic (12 tools)

Deep network monitoring with interception, search, and standard export formats.

ToolDescription
list_network_requestsAll captured requests with type filtering
get_request_details / get_response_details / get_response_contentInspect individual requests
search_network_requestsSearch by URL pattern, method, status, body content
modify_headersModify request headers for future requests
set_network_capture_filters / get_network_capture_filtersControl what gets captured
export_network_data / import_network_dataJSON export/import
export_harExport as HAR 1.2 — importable in Chrome DevTools, Postman, Fiddler

Dynamic Hooks (7 tools)

AI-generated Python functions that intercept and modify network traffic in real-time.

ToolDescription
create_dynamic_hookFull hook with custom Python function
create_simple_dynamic_hookTemplate hook (block, redirect, add_headers, log)
list_dynamic_hooks / get_dynamic_hook_details / remove_dynamic_hookManage hooks
get_hook_documentationDocs for writing hooks (overview, requirements, examples, patterns)
validate_hook_functionValidate hook code before deploying

CDP Functions (12 tools)

Direct Chrome DevTools Protocol access for advanced automation.

ToolDescription
execute_cdp_commandRaw CDP command execution
discover_global_functions / discover_object_methodsDiscover page APIs
call_javascript_function / execute_function_sequenceCall JS functions
inject_and_execute_scriptInject and run scripts
inspect_function_signatureInspect function signatures
create_persistent_functionFunctions that survive navigation
create_python_binding / execute_python_in_browserPython-in-browser via py2js
get_execution_contexts / list_cdp_commands / get_function_executor_infoCDP introspection

Cookies & Storage (3 tools)

ToolDescription
get_cookies / set_cookie / clear_cookiesCookie management

Tab Management (5 tools)

ToolDescription
new_tab / list_tabs / switch_tab / close_tab / get_active_tabFull tab lifecycle

Debugging (5 tools)

ToolDescription
get_debug_view / clear_debug_view / export_debug_logs / get_debug_lock_statusDebug system
validate_browser_environment_toolDiagnose platform and browser issues

Modular Architecture

Load only what you need:

# Full suite (84 tools)
python src/server.py

# Core only — browser + element interaction
python src/server.py --minimal

# Disable specific sections
python src/server.py --disable-cdp-functions --disable-progressive-cloning

# List all sections
python src/server.py --list-sections

Sections

SectionToolsDescription
browser-management10Core browser ops, accessibility, PDF
element-interaction11Click, type, scroll, screenshot, markdown
element-extraction8Deep element cloning with save_to_file
network-debugging12Network monitoring, HAR export
cdp-functions12Raw CDP access
progressive-cloning10Lazy element expansion
cookies-storage3Cookie management
tabs5Tab management
debugging5Debug tools
dynamic-hooks7Network hook system

Environment Variables

VariableDefaultDescription
SCRAPELAB_IDLE_TIMEOUT5Minutes before idle browser instances are auto-closed
PORT8000Port for HTTP/SSE transport

Troubleshooting

No compatible browser found — Install Chrome, Chromium, or Edge. Run validate_browser_environment_tool() to diagnose.

Too many tools for your use case — Use --minimal or --disable-<section>.

Browser instances piling up — Instances auto-close after 5 minutes of inactivity (configurable via SCRAPELAB_IDLE_TIMEOUT).


License

MIT — see LICENSE.


Built by Edoardo Nardi
Stealth engine powered by nodriver

Reviews

No reviews yet

Sign in to write a review