JSPM

playwright-mcp-enhanced-simple

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q26102F
    • License Apache-2.0

    Enhanced Playwright MCP with intelligent browser console message filtering

    Package Exports

    • playwright-mcp-enhanced-simple
    • playwright-mcp-enhanced-simple/cli.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (playwright-mcp-enhanced-simple) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    playwright-mcp-enhanced-simple

    Enhanced Playwright MCP with intelligent browser console message filtering capabilities.

    🚀 Features

    Enhanced browser_console_messages Tool

    • Keyword filtering: Support regex and string matching
    • Level filtering: Filter by log levels (error, warning, info, log, debug)
    • Limit control: Restrict number of returned messages
    • Formatted output: Better structured output for AI analysis

    📦 Installation

    npm install -g playwright-mcp-enhanced-simple

    🔧 Usage

    Start the Enhanced MCP Server

    playwright-mcp-enhanced-simple --extension

    Enhanced Console Messages API

    // Find undefined errors only
    browser_console_messages({
      onlyErrors: true,
      keyword: "undefined",
      limit: 5
    })
    
    // Find network-related errors
    browser_console_messages({
      level: "error",
      keyword: "/404|500|fetch/i"
    })
    
    // Get all warnings
    browser_console_messages({
      level: "warning"
    })

    🎯 Benefits

    • 🎯 95%+ token savings for AI analysis
    • ⚡ Faster error localization
    • 🔍 More precise log filtering
    • 📊 Better structured output
    • ✅ Fully backward compatible

    📋 New Parameters

    Parameter Type Description Example
    keyword string Keyword filter (supports regex) "undefined" or `"/error
    level string Filter by log level "error", "warning", "info", "log", "debug", "all"
    limit number Maximum number of messages to return 10

    🔄 Backward Compatibility

    • ✅ All existing parameters preserved
    • ✅ All new parameters are optional
    • ✅ No breaking changes

    📝 Examples

    Scenario 1: Quick JavaScript Error Location

    browser_console_messages({
      onlyErrors: true,
      keyword: "undefined",
      limit: 5
    })
    // Returns: Only 5 undefined errors

    Scenario 2: Network Request Analysis

    browser_console_messages({
      level: "error",
      keyword: "/404|500|fetch/i",
      limit: 10
    })
    // Returns: All network-related errors

    Scenario 3: Get All Warnings

    browser_console_messages({
      level: "warning"
    })
    // Returns: All warning-level logs

    🏗️ Based On

    This package is based on the official Playwright with enhanced filtering capabilities.

    📄 License

    Apache-2.0

    🤝 Contributing

    Contributions are welcome! Please feel free to submit a Pull Request.


    Made with ❤️ by land007