The Enhanced Web Scraper MCP Server provides comprehensive web scraping, testing, and analysis capabilities across traditional websites, React applications, and React Native web projects.
• Universal Web Scraping: Extract content from any website using CSS selectors with React Native testID/aria-label fallbacks, supporting multiple browsers (Chromium, Firefox, WebKit) and mobile viewport emulation • React Application Testing: Perform multi-step interactions (clicks, fills, taps, swipes, scrolls) on React and React Native web apps with optional hydration waiting and mobile gesture simulation • Deep Component Analysis: Inspect React component trees, props, and state; execute custom JavaScript in React context; wait for specific conditions like navigation or data loading • Enhanced Content Extraction: Retrieve readable content in markdown/text format, comprehensive page information (title, meta tags, performance metrics), and DOM element attributes with computed styles • Development Tools: Monitor Expo/Metro server status, test dropdown interactions with error capture, screenshots, and robust error handling with configurable timeouts • Backward Compatibility: Maintains full support for traditional websites and standard React applications while adding React Native web capabilities
Enables web scraping and automated testing of Create React App applications with support for React hydration detection and component interaction
Provides comprehensive CSS selector support for web scraping with automatic fallback strategies for element targeting across different web frameworks
Offers specialized tools for testing and inspecting Expo web projects, including Metro bundler health checks and React Native web component analysis
Supports web scraping and testing through Firefox browser automation using Playwright
Enables JavaScript execution within React contexts for advanced web application inspection and manipulation
Provides development server monitoring and health checks for Metro bundler in React Native web applications
Supports web scraping and automated testing of Next.js applications with React-specific features like hydration waiting and component inspection
Offers comprehensive React application testing and inspection capabilities, including component tree analysis, state management, and React Native web support with mobile viewport emulation
Enhanced Web Scraper MCP Server
A professional Model Context Protocol (MCP) server for web scraping, React app testing, and React Native web app inspection using Playwright. Fully backward compatible with regular websites and standard React applications.
🚀 Latest Improvements
- 🔥 Context-Optimized Screenshots - Screenshots return only file paths and analysis text (no base64 data) 
- 📊 Enhanced Page Analysis - Detailed element counting, content structure analysis, and page state inspection 
- 🔍 Comprehensive Comparison Tools - Visual similarity analysis with layout, color, and typography detection 
- 💾 File-Based Output - All screenshots saved to - /tmp/with structured analysis data
- 🎯 Smart Content Detection - Automatically detects empty states, loading indicators, and content availability 
- Enhanced Error Handling - Comprehensive input validation and error reporting 
- Optimized Performance - Reduced code duplication and improved efficiency 
- Standardized Timeouts - Configurable timeout constants for reliability 
- Professional Code Structure - ES6+ best practices and maintainable architecture 
🔄 Backward Compatibility
This enhanced server maintains 100% compatibility with:
- ✅ Regular websites (HTML, CSS, JavaScript) 
- ✅ Standard React applications (Create React App, Next.js, etc.) 
- ✅ Traditional web scraping workflows 
- ✅ Existing CSS selectors and interactions 
Plus new enhanced support for:
- 🆕 React Native web applications 
- 🆕 Expo web projects 
- 🆕 Mobile viewport emulation 
- 🆕 Advanced React component inspection 
📋 Tools Overview
| Tool | Purpose | Best For | 
| Context-free screenshot capture | Visual analysis, UI documentation | |
| Visual UI comparison with semantic analysis | UI replication, visual regression testing | |
| Universal web scraping | Content extraction, data collection | |
| React app testing with mobile gestures | UI testing, interaction automation | |
| Page analysis with React insights | Performance monitoring, framework detection | |
| Clean content extraction | Documentation, article processing | |
| Smart element waiting | Dynamic content, loading states | |
| React component analysis | Component debugging, state inspection | |
| React state management | Hydration, navigation, data loading | |
| JavaScript execution in React context | Advanced debugging, custom scripts | |
| Expo development server status | Development workflow, debugging | 
Key Features for AI Visual Analysis
🔥 Context-Free Design
- No Base64 Data: Screenshots return only file paths and analysis text 
- Minimal Context Usage: Dramatically reduced token consumption per screenshot 
- File-Based Storage: All images saved to - /tmp/for external access
- Structured Analysis: Rich text analysis without heavy image data 
🔍 Smart Content Detection
- Empty State Detection: Automatically identifies when pages have no meaningful content 
- Table Population Verification: Counts table rows to verify data is actually displaying 
- Loading State Recognition: Detects and waits for loading indicators to disappear 
- Content Structure Analysis: Provides detailed breakdown of page elements 
📁 File-Based Output
Every visual tool provides:
- 📊 Analysis Text: Element counts, text content, structural analysis 
- 📁 File Path: Saved screenshot location for external viewing 
- 🎯 Pass/Fail Status: Built-in success criteria for automated workflows 
🎯 Migration & Testing Support
Perfect for:
- UI Migration Verification: Compare source vs target implementations 
- Mock Data Validation: Verify that mock data is actually displaying 
- Visual Regression Testing: Ensure UI changes don't break layouts 
- Component Testing: Validate React components render correctly 
📊 Success Metrics Integration
- Configurable Similarity Thresholds: Built-in pass/fail criteria for visual comparisons 
- Populated Data Requirements: Detects empty states that prevent meaningful comparison 
- Comprehensive Reporting: Detailed analysis for debugging visual differences 
Available Tools
1. take_screenshot - Context-Free Screenshot Capture
Captures screenshots with comprehensive analysis while keeping context usage minimal.
Returns:
- 📊 Comprehensive Analysis: Element counts, page structure, content preview 
- 📁 File Path: Screenshot saved to - /tmp/screenshot-[timestamp].png
- 🎯 Content Status: Pass/fail indicators for populated data 
Example Output:
2. compare_screenshots - Context-Free Visual Comparison
Compares two pages with comprehensive analysis while maintaining minimal context usage.
Returns:
- 📊 Visual Similarity Score: Percentage match with pass/fail status 
- 🏗️ Structural Comparison: Element counts, table rows, content structure 
- 🎨 Layout Analysis: Alignment differences, positioning issues 
- 📁 File Paths: Both screenshots saved to - /tmp/for external viewing
Example Output:
3. scrape_page - Universal Web Scraping
Works with any website - regular HTML, React apps, or React Native web.
Regular website example:
React Native web example:
4. test_react_app - Universal React Testing
Works with any React application - standard React or React Native web.
Standard React app example:
React Native web example:
5. get_page_info - Enhanced Page Analysis
Provides comprehensive information for any web page with React-specific insights.
6. extract_content - Clean Content Extraction
Extract clean, readable content from web pages without HTML/CSS clutter. Perfect for documentation, articles, and structured content consumption.
Output Example:
Features:
- Clean Structure - Preserves headings, paragraphs, lists, code blocks 
- Link Extraction - Categorizes links as internal, external, anchor, or download 
- Content Filtering - Removes navigation, ads, sidebars automatically 
- Multiple Formats - Markdown or plain text output 
7. wait_for_element - Smart Element Waiting
Intelligent element waiting with automatic selector strategy fallbacks.
React Native Web Specific Tools
8. inspect_react_app - React Component Analysis
Deep inspection of React applications (works best with React Native web).
9. wait_for_react_state - React State Management
Wait for React-specific conditions like hydration, navigation, data loading.
10. execute_in_react_context - JavaScript Execution
Execute JavaScript in React context for advanced inspection.
11. check_expo_dev_server - Expo Development Tools
Check Expo/Metro bundler status for development workflows.
Selector Strategy Priority
The server uses intelligent selector strategies:
- Primary: Direct CSS selector (e.g., - #button,- .class,- input[name='email'])
- Fallback 1: TestID attribute ( - [data-testid="button"])
- Fallback 2: Accessibility label ( - [aria-label="Button"])
- Fallback 3: AccessibilityLabel ( - [accessibilityLabel="Button"])
This ensures regular CSS selectors work normally while providing React Native web compatibility.
Usage Examples
Context-Free Visual Verification
Context-Free Migration Comparison
Regular Website Scraping
Standard React App Testing
React Native Web App Testing
Clean Content Extraction
Installation
Usage with Amazon Q Developer
Benefits of Context-Free Design
🔥 Dramatically Reduced Context Usage
- Before: 50-200KB base64 data per screenshot 
- After: Only text analysis (~1-2KB per screenshot) 
- Result: 50-100x reduction in context consumption 
📁 File-Based Workflow
- Screenshots saved to - /tmp/with timestamps
- External tools can access images directly 
- No context pollution from image data 
- Structured analysis data remains in conversation 
🎯 Better AI Workflows
- More screenshots possible per conversation 
- Focus on analysis rather than data transfer 
- Cleaner conversation history 
- Faster response times 
Troubleshooting
Error Handling
- Input Validation - Server validates required parameters and provides clear error messages 
- Timeout Configuration - Default timeouts are optimized but can be adjusted per request 
- Browser Cleanup - Automatic resource cleanup prevents memory leaks 
Regular Websites
- Use standard CSS selectors ( - .class,- #id,- tag[attribute])
- Set - mobileViewport: false(default) for desktop sites
- Set - waitForHydration: false(default) for non-React sites
React Applications
- Set - waitForHydration: truefor better reliability
- Use semantic selectors when possible 
- Check browser console for React errors 
React Native Web
- Use - testIDattributes in your components
- Enable - mobileViewportor specify- device
- Set - waitForHydration: true
- Use - inspect_react_appto see available elements
License
MIT
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Enables web scraping, React app testing, and React Native web app inspection using Playwright with multi-browser support. Provides backward compatibility with regular websites while offering enhanced features for React applications including mobile viewport emulation and component analysis.
- 🚀 Latest Improvements
- 🔄 Backward Compatibility
- 📋 Tools Overview
- Key Features for AI Visual Analysis
- Available Tools- 1. take_screenshot - Context-Free Screenshot Capture
- 2. compare_screenshots - Context-Free Visual Comparison
- 3. scrape_page - Universal Web Scraping
- 4. test_react_app - Universal React Testing
- 5. get_page_info - Enhanced Page Analysis
- 6. extract_content - Clean Content Extraction
- 7. wait_for_element - Smart Element Waiting
 
- React Native Web Specific Tools
- Selector Strategy Priority
- Usage Examples
- Installation
- Usage with Amazon Q Developer
- Benefits of Context-Free Design
- Troubleshooting
- License