Skip to content

Feature Request: Add direct page content extraction method #1455

@IAliceBobI

Description

@IAliceBobI

Feature Comparison with Other MCPs

After comparing Playwright MCP with BrowserOS MCP and Chrome DevTools MCP, I noticed Playwright MCP lacks a direct page content extraction method.

Comparison Table

Feature Playwright MCP BrowserOS MCP Chrome DevTools MCP
Direct content extraction ❌ Requires code ✅ get_page_content ❌ Requires JS
CSS selector filtering ❌ Requires code ✅ selector param
Viewport-only extraction ❌ Requires code ✅ viewportOnly param
browser_run_code ✅ Excellent!
browser_evaluate ✅ evaluate_script ✅ evaluate_script
browser_wait_for ❌ Manual polling ✅ wait_for

Missing Features in Playwright MCP

Direct page content extraction without writing code

Currently, users must write JavaScript even for simple content extraction. BrowserOS MCP provides a much simpler API with get_page_content.

Proposed API

browser_get_content: {
  selector?: string;      // CSS selector to filter content
  viewportOnly?: boolean; // Only visible content
  includeLinks?: boolean; // Format links as markdown
  fullPage?: boolean;     // Include content beyond viewport
}

Playwright MCP Strengths 🌟

  • browser_run_code is incredibly powerful - allows full access to Playwright's API
  • Great browser_wait_for functionality
  • Excellent snapshot accessibility tree
  • Proper tab management

Suggestion

Consider adding a browser_get_content method for simple content extraction use cases where writing code feels like overkill. This would complement the existing powerful browser_run_code for advanced scenarios!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions