How vibheksoni/stealth-browser-mcp works
Stealth Browser MCP exposes browser automation and inspection tools to MCP agents. The principal workflow is an agent tool call through the server, browser-instance management and Chrome interaction, then a structured result or large-response file fallback. Separate branches provide DOM interaction, element cloning, network capture/hooks, and CDP execution. The graph retains the documented feature modules, but several links are dashed because their implementations were not sampled; they indicate unverified integration, not a confirmed call chain.
Main entry points: server.py Tool Server · browser_manager.py Browser Manager · comprehensive_element_cloner.py Complete Extraction · file_based_element_cloner.py File Cloning
Components 23
MCP Entry
- Tool Server
src/server.py - Response Fallback
src/response_handler.py
Browser Runtime
- Browser Manager
src/browser_manager.py - DOM Interaction
src/dom_handler.py - Browser Models
src/models.py - Instance Storage
src/persistent_storage.py - Platform Detection
src/platform_utils.py - Process Cleanup
src/process_cleanup.py
Inspection Tools
- Element Cloning
src/element_cloner.py - Complete Extraction
src/comprehensive_element_cloner.py - CDP Cloning
src/cdp_element_cloner.py - File Cloning
src/file_based_element_cloner.py - Progressive Cloning
src/progressive_element_cloner.py - Network Inspection
src/network_interceptor.py - CDP Commands
src/cdp_raw.py - CDP Functions
src/cdp_function_executor.py
Hooking And State
- Dynamic Hooks
src/dynamic_hook_system.py - Hook AI Interface
src/dynamic_hook_ai_interface.py - Hook Learning
src/hook_learning_system.py - JS Value Conversion
src/js_values.py - Debug Logging
src/debug_logger.py
Other components
- MCP Agent
- Chrome Browser
Connections 23
- MCP Agent → Tool Server: calls tools
README.md - Tool Server → Browser Manager: manages browsers
src/server.py - Browser Manager → Chrome Browser: controls browser
- Browser Manager → Process Cleanup: cleans processes
src/browser_manager.py - Browser Manager → Dynamic Hooks: cleans hooks
src/browser_manager.py - Tool Server → DOM Interaction: dispatches interaction
src/server.py - Tool Server → Element Cloning: dispatches extraction
src/server.py - Tool Server → Complete Extraction: dispatches extraction
src/server.py - Tool Server → CDP Cloning: dispatches cloning
src/server.py - Tool Server → File Cloning: dispatches file cloning
src/server.py - Tool Server → Progressive Cloning: dispatches cloning
src/server.py - Tool Server → Network Inspection: dispatches inspection
src/server.py - Tool Server → CDP Commands: dispatches commands
- Tool Server → CDP Functions: dispatches execution
src/server.py - Tool Server → Dynamic Hooks: dispatches hook tools
- Tool Server → Response Fallback: formats results
src/server.py - Complete Extraction → JS Value Conversion: converts results
src/comprehensive_element_cloner.py - Element Cloning → JS Value Conversion: converts results
src/element_cloner.py - Progressive Cloning → Complete Extraction: uses extraction
src/progressive_element_cloner.py - File Cloning → Complete Extraction: uses extraction
src/file_based_element_cloner.py - File Cloning → Element Cloning: uses extraction
src/file_based_element_cloner.py - Hook AI Interface → Dynamic Hooks: configures hooks
src/dynamic_hook_ai_interface.py - Hook AI Interface → Hook Learning: uses learning
src/dynamic_hook_ai_interface.py