Stealth Browser MCP

repository·master·Indexed 23 days ago

https://github.com/vibheksoni/stealth-browser-mcp

An undetectable browser automation MCP server providing CDP-level access via nodriver to bypass bot detection services like Cloudflare. It enables AI agents to perform high-fidelity UI cloning, real-time network interception, and automation of protected portals (banking, government, social media) while avoiding detection. Features include direct Chrome DevTools Protocol integration, Python execution within the browser environment, and native Model Context Protocol support for clients like Claude Desktop.

Tokens
14.1K
Snippets
14
Records
96
Agent score
81%

What's inside stealth-browser-mcp

  1. Verify stealth capabilities against bot detection systems

    master

    The stealth-browser-mcp project is designed to bypass industry-standard bot detection systems. You can verify its effectiveness by testing it against the following major detection vectors:

    • Cloudflare Challenge: Bypasses JavaScript challenges, TLS fingerprinting, and behavioral analysis (e.g., nowsecure.nl).
    • CreepJS Fingerprint Analysis: Maintains a 0% detection rate for both 'Headless' and 'Stealth' flags by providing consistent hardware (GPU, RAM), platform, and WebRTC fingerprints.
    • Sannysoft Bot Detection: Passes all 20 standard detection tests, including PHANTOM_UA, SELENIUM_DRIVER, and CHR_DEBUG_TOOLS.
    • Intoli Headless Detection: Successfully masks WebDriver presence and provides consistent WebGL, plugin, and permission profiles.
    • Platform Login Walls: Capable of bypassing aggressive login walls and CAPTCHA integrations (like Arkose Labs) on major platforms such as X.com (Twitter) to scrape data behind modals.
  2. Core Capabilities of Stealth Browser MCP

    master

    The Stealth Browser MCP is designed for high-stealth automation and deep browser interaction. Key capabilities include:

    • Cloudflare Bypass: Accessing sites protected by Cloudflare that typically block standard automation tools.
    • UI Element Extraction: Perfect cloning of specific UI components (e.g., Stripe pricing tables).
    • Protected Portal Automation: Navigating sensitive sites like banking portals without triggering bot detection.
    • Real-Time Network Interception: Intercepting and analyzing API calls from Single Page Applications (SPAs).
    • Python Execution: Running Python code directly within the Chrome browser environment via AI chat.
  3. Compare Stealth Browser MCP with other automation tools

    master

    Stealth Browser MCP is designed to bypass advanced bot detection mechanisms that typically block standard automation frameworks like Playwright, Selenium, and Puppeteer.

    Key advantages include:

    • Cloudflare & Bot Protection: High success rates in bypassing Cloudflare, Queue-It, and other bot protection services.
    • High-Security Access: Capable of accessing banking portals, government sites (IRS, DMV), and restricted e-commerce areas (Nike SNKRS, Supreme) without being flagged as an automated browser.
    • Social Media Reliability: Designed to avoid account bans on platforms like LinkedIn and Instagram.
    • Technical Superiority: Provides direct Chrome DevTools Protocol (CDP) integration with 88 specialized tools, whereas competitors typically offer ~15-20 tools.
    • AI-Native: Built with native MCP protocol support for immediate use with Claude, GPT, and other MCP clients.
  4. Notable use cases for Stealth Browser MCP

    master

    Stealth Browser MCP can be used for a variety of automation and data extraction tasks, including:

    • Marketplace automation: Automating registrations and workflows on specific marketplaces.
    • Compliance reporting: Automating data collection across multiple portals for regulatory workflows.
    • Price monitoring: Real-time price tracking across e-commerce sites.
    • UI prototyping: Cloning production UI elements for rapid design iteration.
    • API discovery: Intercepting and mapping undocumented API endpoints.
    • Accessibility auditing: Automated testing of web accessibility across sites.
  5. How to use Pre-Document Scripts for Anti-Bot Spoofing

    master

    To bypass anti-bot checks that run during the initial page parse (such as WebGL renderer/vendor spoofing or navigator property patches), you must use add_script_to_evaluate_on_new_document before calling navigate.

    • Main-world spoofing: Keep world_name=None to ensure the patch affects the main browser APIs.
    • Immediate execution: Set run_immediately=True if the patch needs to run in the current document as well as on new documents.
  6. Capabilities of Stealth Browser MCP extraction

    master

    When performing complex web tasks like UI cloning, Stealth Browser MCP utilizes the Chrome DevTools Protocol (CDP) to achieve high-fidelity results. Key technical capabilities include:

    • Undetectable Automation: Bypasses bot detection to navigate complex sites.
    • CDP-Level Accuracy: Extracts complete computed style properties (e.g., 2,800+ CSS properties in the demo).
    • DOM Analysis: Identifies specific sections (e.g., section:first-of-type) and captures full nested HTML structures.
    • Framework Detection: Retrieves React event handlers and other framework bindings.
    • Responsive Extraction: Analyzes media queries and responsive breakpoints.
    • Professional Generation: Produces semantic HTML and modern CSS (using clamp(), backdrop-filter, and custom properties) that is production-ready.
  7. Understand the core technical advantages of Stealth Browser MCP

    master

    Stealth Browser MCP achieves its capabilities through four primary architectural pillars:

    1. Real Browser Engine: Built on nodriver (an undetected Chrome fork), it eliminates automation flags and webdriver properties to provide genuine browser fingerprints.
    2. CDP-Level Access: Uses direct Chrome DevTools Protocol integration for pixel-perfect element extraction and advanced network interception.
    3. AI-First Design: Native support for the Model Context Protocol (MCP), allowing it to work out-of-the-box with AI agents without custom API wrappers.
    4. Enterprise-Grade Features: Supports executing Python code directly within the browser context via py2js integration and features a progressive element cloning system.
  8. Common Use Cases for Stealth Browser MCP

    master

    Developers and AI agents can leverage this tool for several automated workflows:

    • Lead Generation: Undetected LinkedIn lead scraping.
    • Monitoring: Ticketmaster seat monitoring or e-commerce price tracking.
    • Data Mining: Real estate data mining and social media content extraction.
    • Automation: Automating interactions with government portals.
  9. Configure the MCP client env block

    master

    When adding stealth-browser-mcp to an MCP client (like Claude Desktop), use the env block to pass configuration like authentication tokens and file upload permissions.

    Example configuration for a Windows environment:

    {
      "mcpServers": {
        "stealth-browser-mcp": {
          "command": "C:\\path\\to\\stealth-browser-mcp\\venv\\Scripts\\python.exe",
          "args": ["C:\\path\\to\\stealth-browser-mcp\\src\\server.py"],
          "env": {
            "STEALTH_BROWSER_MCP_AUTH_TOKEN": "replace-with-a-long-random-token",
            "BROWSER_IDLE_TIMEOUT": "900",
            "BROWSER_FILE_UPLOAD_ALLOWED_DIRS": "C:\\Users\\me\\uploads;C:\\Users\\me\\Documents"
          }
        }
      }
    }
    {
      "mcpServers": {
        "stealth-browser-mcp": {
          "command": "C:\\path\\to\\stealth-browser-mcp\\venv\\Scripts\\python.exe",
          "args": ["C:\\path\\to\\stealth-browser-mcp\\src\\server.py"],
          "env": {
            "STEALTH_BROWSER_MCP_AUTH_TOKEN": "replace-with-a-long-random-token",
            "BROWSER_IDLE_TIMEOUT": "900",
            "BROWSER_FILE_UPLOAD_ALLOWED_DIRS": "C:\\Users\\me\\uploads;C:\\Users\\me\\Documents"
          }
        }
      }
    }
  10. Reliability and Best Practices for Browser Automation

    master

    Follow these rules to improve the stability of your automation scripts:

    • Selector Stability: Prefer stable CSS selectors, ARIA roles, visible text, or specific attributes over brittle, auto-generated class names.
    • State Management: Never assume a page has finished loading or rendering. Always use wait_for_element or check page state before acting.
    • Stateful Tooling: Always pass the exact instance_id, request IDs, and selectors returned by previous tool outputs to subsequent calls.
    • Handling Large Data: If a tool output is too large, request a narrower selector, apply filters, or use file-backed extraction responses.
    • Security Warning: Do not expose unauthenticated HTTP transport to public networks. Always use STEALTH_BROWSER_MCP_AUTH_TOKEN if the server is not in a trusted local environment.
  11. Setup Stealth Browser MCP for UI cloning

    master

    To use the cloning capabilities demonstrated in the Augment Code demo, you must first install the Stealth Browser MCP repository:

    1. Clone the repository:
    git clone https://github.com/vibheksoni/stealth-browser-mcp.git
    1. Follow the installation instructions provided in the main README.md of the repository to configure the MCP server with your AI client (e.g., Claude Desktop).