Skip to main content
Glama
yet-another-web-scraper-mcp

yet-another-web-scraper-mcp

by KhaledDev

Yet another web scraper MCP

A minimal MCP server that lets an LLM drive a real Chromium browser to scrape websites, collect structured rows, and export them to CSV.

Setup

uv sync
uv run playwright install chromium

Related MCP server: Ruishu MCP

Running

uv run main.py

This starts the MCP server over stdio. Point your MCP client (e.g. Claude Desktop / Claude Code) at uv run --directory <this folder> main.py.

No need to clone this repo. The npm package still runs the Python implementation under the hood via uv (which it will tell you how to install if it's missing), but gives a familiar one-line install/run command that works the same on Windows, macOS, and Linux:

npx -y yet-another-web-scraper-mcp

Add it to your MCP client config, e.g. Claude Desktop's claude_desktop_config.json:

{
  "mcpServers": {
    "web-scraper": {
      "command": "npx",
      "args": ["-y", "yet-another-web-scraper-mcp"]
    }
  }
}

On first run, npm install triggers a postinstall step that runs uv sync and downloads the Chromium browser for Playwright. This can take a minute the very first time.

Requires uv and Python 3.13+ to be resolvable on the machine; npm alone cannot provide the Python runtime.

Adding it to CLI coding agents

Claude Code

claude mcp add web-scraper -- npx -y yet-another-web-scraper-mcp

Codex CLI: add to ~/.codex/config.toml:

[mcp_servers.web-scraper]
command = "npx"
args = ["-y", "yet-another-web-scraper-mcp"]

Gemini CLI: add to ~/.gemini/settings.json (or a project's .gemini/settings.json):

{
  "mcpServers": {
    "web-scraper": {
      "command": "npx",
      "args": ["-y", "yet-another-web-scraper-mcp"]
    }
  }
}

Cursor: add to .cursor/mcp.json (project-level) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "web-scraper": {
      "command": "npx",
      "args": ["-y", "yet-another-web-scraper-mcp"]
    }
  }
}

Windsurf: same mcpServers JSON shape as Cursor above, in Windsurf's MCP config panel or ~/.codeium/windsurf/mcp_config.json.

Any other MCP-compatible client that takes a raw command/args pair (stdio transport) can point at the same npx -y yet-another-web-scraper-mcp command; the JSON snippets above are all equivalent to that one line.

Tools

  • open_browser(headless=True) / close_browser(): start/stop the browser.

  • navigate(url): go to a URL, returns cleaned page content.

  • click(selector): click a CSS-selected element (e.g. a "next page" button), returns the resulting cleaned content.

  • get_page_content(max_length): re-read the current page's HTML, with <script> and <svg> tags stripped out since they're noise for an LLM.

  • get_page_links(): list {text, href} for links on the page.

  • add_record(record): append one scraped row (dict of column -> value).

  • get_records(): review everything collected so far.

  • export_csv(filename): write the collected rows to a CSV via pandas.

Typical flow: open_browser -> navigate -> get_page_content / get_page_links -> click to page through results -> add_record per item -> export_csv when done -> close_browser.

Available Tools

15 tools
add_recordA

Add one row of scraped data (column name -> value) to the in-memory dataset.

Inputs: record (required). Returns: result

clear_recordsA

Discard all rows collected so far. Use this when starting over, e.g. you've been exploring one source and want to switch to another without mixing rows.

Inputs: no named parameters. Returns: result

clickA

Click an element by CSS selector (e.g. a pagination button) and return the resulting page's cleaned content.

On stateful pages (large SPA/ASP.NET markup) re-returning the whole page every click is wasteful. Pass result_selector (a CSS selector, e.g. "table#resultsGrid tbody") to get back only that part of the post-click page.

If the click triggers a client-side fetch (e.g. a filter or "load more" button) rather than a full reload, pass wait_for_selector/wait_for_idle the same way as navigate so the returned content isn't read too early.

Inputs: selector (required), timeout_ms, wait_for_idle, result_selector, +1 more. Returns: result

close_browserA

Close the Chromium browser instance.

Inputs: no named parameters. Returns: result

export_csvA

Write all collected rows to a CSV file (via pandas) and return its path.

Inputs: filename. Returns: result

find_repeating_elementsA

Scan the current page for groups of repeated sibling elements (product cards, list items, search results, ...) and return candidate CSS selectors for each group, with a count and a text sample.

Use this on an unfamiliar site instead of eyeballing raw HTML for class names: pick a promising selector from the results and feed it to get_list (as container_selector) to actually extract the data.

Inputs: min_count. Returns: result

get_json_ldA

Return schema.org structured data (JSON-LD) embedded in the current page, e.g. Recipe/Product/Article objects. Many sites (WordPress recipe plugins, e-commerce) embed clean structured data this way. Check here before falling back to get_page_content.

Inputs: no named parameters. Returns: result

get_listA

Extract one record per element matching container_selector (e.g. a product card in a grid), pulling fields out of each one. This is the div/card equivalent of get_table for sites that don't use markup.

fields maps an output field name to a CSS selector relative to each container, e.g. {"title": ".product-title a", "price": "[data-a-color='base']"}. Use "" to target the container itself, or append "@attr" to read an attribute instead of text, e.g. "link": "a@href" or "image": "img@src".

Because each field is looked up independently within its own container, results never get misaligned the way separate get_page_content calls + manual zipping do when some cards are missing a field (e.g. a strikethrough "was" price only some products have). Not sure of the right selectors? Call find_repeating_elements first.

Inputs: fields (required), container_selector (required). Returns: result

get_page_contentA

Return the current page's HTML with // tags stripped out.

If selector is given (a CSS selector, e.g. ".recipe-card" or "#content"), only the matching element(s) are returned instead of the whole page, which avoids truncation on large pages. If the content is longer than max_length, it's truncated and the response tells you the offset to pass on the next call to read the following chunk.

If the page looks like a Cloudflare/Akamai/CAPTCHA challenge page rather than real content, a "bot-challenge page" warning is prepended (only on the first chunk, offset=0).

Inputs: offset, selector, max_length. Returns: result

get_recordsA

Return every row collected so far, for review before exporting.

Inputs: no named parameters. Returns: result

get_tableA

Parse an HTML table on the current page into rows of {column_header: cell_text}, using the first matching element's first as headers.

selector picks which table (default: the first on the page, e.g. "table#programsGrid"). A cell containing a link also gets a <header>_href key. Use this instead of eyeballing get_page_content for tabular data: it does the row/cell transcription for you, so pass the results straight to add_record instead of hand-copying values.

Inputs: selector. Returns: result

open_browserB

Launch the Chromium browser. Call this once before navigating anywhere.

Inputs: headless. Returns: result

wait_forA

Wait for selector to appear and/or network activity to go idle, without navigating or clicking. Use this if a previous get_page_content/get_list read caught the page before client-side content finished loading.

Inputs: idle, selector, timeout_ms. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 15 tools

    Disambiguation5/5

    Each tool maps to a distinct action: browser lifecycle (open/close), navigation/clicking/waiting, content retrieval (navigate/get_page_content/click), extraction (get_table/get_list/get_json_ld/get_page_links/find_repeating_elements), and data management (add/get/clear/export). While navigate, click, and get_page_content all return cleaned content, their triggering actions are distinct and clearly described, so an agent can pick the right one.

    Naming Consistency5/5

    All tool names are snake_case and follow a verb-first pattern: open_browser, close_browser, navigate, click, wait_for, get_*, add_record, clear_records, export_csv, find_repeating_elements. No mixing of camelCase or inconsistent verb styles. The single-word verbs (navigate, click) are minor deviations but remain clear and consistent.

    Tool Count5/5

    15 tools is within the typical 3-15 well-scoped range. Each tool addresses a distinct need in the scraping workflow, from browser control to extraction to data export, so none feels redundant or missing.

    Completeness4/5

    The surface covers the full scraping lifecycle: launch, navigate, interact (click/wait), extract (content/table/list/JSON-LD/links), and manage/export data. A few advanced scenarios like infinite-scroll (no scroll tool) or form filling are not covered, but these are minor gaps for a generic scraper and workarounds exist (e.g., click for load-more buttons).

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      An MCP server that enables LLM applications to control web browsers via Browserbase, supporting features like web navigation, screenshots, cookie management, and persistent contexts.
      17
      -
    • F
      license
      A
      quality
      A
      maintenance
      An MCP server that bridges LLMs with dynamic real-world data by leveraging Chrome DevTools Protocol to intercept and reconstruct network traffic, enabling AI agents to extract high-quality structured data from complex web environments.
      3
      89
      -
    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that provides browser automation capabilities, enabling LLMs to control a web browser for navigation, interaction, and data extraction.
      32
      86 npm
      14
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for web scraping and browser automation, enabling AI agents to extract clean, token-efficient content from web pages.
      1
      MIT