What is Playwright-MCP-Fetch: Parse & Convert Web Content?
Playwright-MCP-Fetch is a tool that bridges web content extraction and formatting through the Model Context Protocol (MCP). It leverages Playwright to fetch raw website data and convert it into structured formats like Markdown, plain text, or JSON. This makes it ideal for developers needing to process dynamic web content programmatically.
How to use Playwright-MCP-Fetch: Parse & Convert Web Content?
Start by installing the tool from source or via Docker. First, clone the repository and set up dependencies:
git clone https://github.com/kevinwatt/playwright-mcp-fetch.git
cd playwright-mcp-fetch
pip install -r requirements.txt
playwright install
Next, run the MCP server using playwright-mcp-fetch-sse. To interact with it, use HTTP POST requests or the SSE client example provided. For instance, converting a webpage to Markdown requires a simple API call:
curl -X POST http://localhost:3000/api/call-tool \
-H "Content-Type: application/json" \
-d '{"name": "fetch_markdown", "arguments": {"url": "https://example.com"}}'