Playwright Scraper MCP server

Leverages Playwright and BeautifulSoup to enable robust web scraping and content extraction, converting complex JavaScript-heavy web pages into high-quality Markdown with browser automation capabilities.
Back to servers
Provider
Dennis Lin
Release date
Mar 09, 2025
Language
Python
Package
Stats
839 downloads
1 star

This MCP server scrapes web content and converts it to Markdown format. It uses Playwright for headless browser automation, BeautifulSoup for HTML parsing, and Pypandoc for HTML to Markdown conversion, making it capable of handling modern JavaScript-heavy websites.

Installation

Prerequisites

  • Python 3.11 or higher
  • Playwright browser dependencies
  • Pandoc (optional, will be automatically installed by pypandoc if possible)

Using uv (recommended)

When using uv, no specific installation is needed. You'll use uvx to directly run the server.

Using PIP

Alternatively, install via pip:

pip install mcp-playwright-scraper

Browser Dependencies

After installation, you need to install Playwright browser dependencies:

playwright install --with-deps chromium

Configuration

With Claude Desktop

Add this to your claude_desktop_config.json:

Using uvx

"mcpServers": {
  "mcp-playwright-scraper": {
    "command": "uvx",
    "args": ["mcp-playwright-scraper"]
  }
}

Using pip installation

"mcpServers": {
  "mcp-playwright-scraper": {
    "command": "python",
    "args": ["-m", "mcp_playwright_scraper"]
  }
}

With Claude Code

# Using uvx
$ claude mcp add mcp-playwright-scraper -- uvx mcp-playwright-scraper

# Using pip installation
$ claude mcp add mcp-playwright-scraper -- python -m mcp_playwright_scraper

With Zed

Add to your Zed settings.json:

Using uvx

"context_servers": [
  "mcp-playwright-scraper": {
    "command": {
      "path": "uvx",
      "args": ["mcp-playwright-scraper"]
    }
  }
],

Using pip installation

"context_servers": {
  "mcp-playwright-scraper": {
    "command": "python",
    "args": ["-m", "mcp_playwright_scraper"]
  }
},

With Cursor

  1. Open Cursor Settings > Features > MCP
  2. Click "+ Add New MCP Server"
  3. Configure:
    • Name: mcp-playwright-scraper
    • Type: Select stdio
    • Command: Enter either uvx mcp-playwright-scraper or python -m mcp_playwright_scraper

Usage

Once configured, you can use the scraper with a prompt like:

Use the mcp-playwright-scraper to scrape the content from https://example.com and summarize it.

Available Tools

The server implements one tool:

  • scrape_to_markdown: Scrapes content from a URL and converts it to Markdown
    • Required parameter: url (string) - The URL to scrape
    • Optional parameter: verify_ssl (boolean) - Whether to verify SSL certificates (default: true)

Debugging

You can use the MCP inspector to debug the server:

npx @modelcontextprotocol/inspector uvx mcp-playwright-scraper

The Inspector will display a URL you can access in your browser to begin debugging.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later