opc-web-scrape-mcp
v1.0.0
Published
MCP server wrapping Playwright — scrape pages, take screenshots, extract links for AI agents
Maintainers
Readme
🌐 opc-web-scrape-mcp
MCP Server wrapping Playwright — web scraping, screenshots, and link extraction for AI agents
Overview
opc-web-scrape-mcp leverages Playwright (69K+ stars) to provide AI agents with headless browser capabilities: scrape page text content, capture full-page screenshots, and extract structured link data.
Tools
| Tool | Description |
|------|-------------|
| scrape_page | Extract text content from any web page with CSS selector support |
| take_screenshot | Capture full-page or viewport screenshots in PNG |
| extract_links | Extract all links from a page with optional regex filtering |
Prerequisites
npm install playwright
npx playwright install chromiumInstallation
npm install opc-web-scrape-mcpUsage
As an MCP server
{
"mcpServers": {
"web-scrape": {
"command": "npx",
"args": ["opc-web-scrape-mcp"]
}
}
}Example: scrape_page
Input: { "url": "https://example.com", "selector": "main" }
Output: Full text content of the <main> elementExample: take_screenshot
Input: { "url": "https://example.com", "full_page": true, "width": 1440, "height": 900 }
Output: Screenshot saved: ./screenshots/screenshot_1700000000.pngExample: extract_links
Input: { "url": "https://github.com/trending", "filter": "github.com/[^/]+/[^/]+$" }
Output: [{ href: "https://github.com/user/repo", text: "repo description" }, ...]Features
- Headless Chromium — Real browser rendering, JavaScript execution, SPAs
- CSS selector targeting — Extract specific elements or full page content
- Full-page screenshots — Capture scrollable content beyond the viewport
- Link extraction — Structured link data with optional regex filtering
- Network idle wait — Waits for dynamic content to load before extraction
License
MIT
