WebScraper MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WebScraper MCP ServerScrape https://example.com and output markdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WebScraper MCP Server v2.0 (Playwright Edition)
A Model Context Protocol (MCP) server that provides advanced web scraping and HTML to Markdown conversion using Microsoft Playwright. This version automatically detects and handles JavaScript-rendered pages.
๐ What's New in v2.0
๐ Microsoft Playwright - Superior JavaScript rendering with automatic fallback
๐ฏ Smart Detection - Automatically switches to JS rendering when needed
๐ธ Screenshots - Capture page screenshots as base64
โฑ๏ธ Custom Waits - Wait for specific selectors or time periods
๐ Dual Mode - Static scraping for speed, JS rendering for dynamic content
๐ Performance Metrics - Track load times and render methods
Related MCP server: Playwright Server
Features
Core Capabilities
๐ Intelligent Web Scraping: Automatic detection of static vs dynamic pages
๐ HTML to Markdown: Clean, well-formatted Markdown conversion
๐ญ JavaScript Rendering: Full Playwright support for SPA and dynamic content
๐ Link Extraction: Extract all hyperlinks with filtering options
๐ผ๏ธ Image Extraction: Extract images including lazy-loaded ones
๐ฆ Batch Processing: Scrape up to 10 URLs simultaneously
๐ฏ Metadata Extraction: Title, description, author, keywords, and more
โ๏ธ Flexible Options: Control timeouts, redirects, content inclusion
๐ Multiple Formats: Output in Markdown or JSON
๐ธ Screenshot Capture: Get base64 screenshots of pages
Rendering Modes
Static Mode (Default, Fast)
Uses Axios + Cheerio
Suitable for traditional HTML pages
Fastest performance
JavaScript Mode (Auto-detected or Forced)
Uses Playwright with Chromium
Executes JavaScript
Handles SPAs, lazy loading, dynamic content
Auto-activates when static mode returns < 50 words
Installation
# Clone or navigate to the project
cd webscraper-mcp-server-v2
# Install dependencies
npm install
# Install Playwright browsers
npm run install:browsers
# Build the project
npm run buildUsage
Running with stdio (Local)
npm startRunning with HTTP (Remote)
TRANSPORT=http PORT=3000 npm startAvailable Tools
1. webscraper_scrape_page - Advanced Web Scraping
Automatically detects and handles both static and dynamic pages.
New Parameters:
use_javascript(boolean): Force JavaScript renderingwait_for_selector(string): CSS selector to wait forwait_time(number): Additional wait time in millisecondstake_screenshot(boolean): Capture page screenshot
Example - Force JavaScript Rendering:
{
"url": "https://docs.uazapi.com/endpoint/post/instance~init",
"use_javascript": true,
"wait_for_selector": ".content",
"wait_time": 3000,
"take_screenshot": true
}Example - Auto-Detection:
{
"url": "https://example.com/spa-app"
}Automatically switches to JavaScript if static content is insufficient
2. webscraper_extract_links - Link Extraction
New Parameter:
use_javascript(boolean): Use JavaScript rendering for dynamic links
Example:
{
"url": "https://example.com",
"use_javascript": true,
"filter_external": true
}3. webscraper_extract_images - Image Extraction
New Parameter:
use_javascript(boolean): Extract lazy-loaded images
Example:
{
"url": "https://example.com/gallery",
"use_javascript": true,
"limit": 50
}4. webscraper_batch_scrape - Batch Operations
New Parameter:
use_javascript(boolean): Use JavaScript for all URLs
Example:
{
"urls": ["https://page1.com", "https://page2.com"],
"use_javascript": true,
"timeout": 60000
}Configuration
Environment Variables
TRANSPORT: Transport type ('stdio' or 'http', default: 'stdio')PORT: HTTP server port (default: 3000, only for HTTP transport)
Client Configuration (Claude Desktop)
{
"mcpServers": {
"webscraper": {
"command": "node",
"args": ["/path/to/webscraper-mcp-server-v2/dist/index.js"]
}
}
}Output Formats
Markdown Format (Enhanced)
# Page Title
**URL:** https://example.com
**Render Method:** javascript
**Description:** Page description
**Author:** Author Name
**Word Count:** 1500 | **Status:** 200 | **Load Time:** 2340ms
---
[Page content in Markdown...]JSON Format (Enhanced)
{
"url": "https://example.com",
"title": "Page Title",
"content": "Markdown content...",
"renderMethod": "javascript",
"metadata": {
"description": "Page description",
"wordCount": 1500,
"loadTime": 2340,
"screenshot": "base64..." // if requested
}
}Performance Comparison
Feature | Static Mode | JavaScript Mode |
Speed | ~1-3s | ~3-8s |
JavaScript | โ | โ |
SPA Support | โ | โ |
Lazy Loading | โ | โ |
Resource Usage | Low | Medium |
Best For | Traditional HTML | Modern Web Apps |
Use Cases
1. Scraping JavaScript-Heavy Sites
// Site with React/Vue/Angular
{
"url": "https://spa-site.com",
"use_javascript": true,
"wait_for_selector": "#root > div",
"wait_time": 2000
}2. Capturing Visual State
// Get screenshot along with content
{
"url": "https://example.com/dashboard",
"use_javascript": true,
"take_screenshot": true
}3. API Documentation Sites
// Like your UAZ API docs example
{
"url": "https://docs.uazapi.com/endpoint/post/instance~init",
"use_javascript": true,
"wait_for_selector": ".api-content",
"response_format": "json"
}4. E-commerce Product Pages
// Lazy-loaded images and dynamic prices
{
"url": "https://shop.example.com/product/123",
"use_javascript": true,
"wait_time": 3000
}Troubleshooting
Playwright Issues
# Reinstall browsers
npm run install:browsers
# Check Playwright installation
npx playwright --versionLow Word Count on Dynamic Sites
Problem: Getting < 50 words from a JavaScript site?
Solution:
Set
use_javascript: trueexplicitlyUse
wait_for_selectorfor specific elementsIncrease
wait_timeif content loads slowly
Memory Issues
Problem: Browser consuming too much memory?
Solution:
The browser instance is reused and shared
Contexts are closed after each operation
Consider increasing system resources for heavy usage
Advantages over Puppeteer
โ
Better Performance: Playwright is generally faster
โ
More Reliable: Better handling of modern web apps
โ
Auto-waiting: Smarter element waiting
โ
Multiple Browsers: Can use Chromium, Firefox, or WebKit
โ
Modern APIs: Cleaner, more intuitive API
โ
Active Development: Microsoft-backed, frequent updates
Development
Project Structure
webscraper-mcp-server-v2/
โโโ src/
โ โโโ index.ts # Main entry point
โ โโโ types.ts # TypeScript definitions (enhanced)
โ โโโ constants.ts # Configuration constants
โ โโโ schemas/ # Zod validation (updated)
โ โโโ services/ # Playwright-based scraping
โ โโโ tools/ # MCP tool implementations
โโโ dist/ # Compiled JavaScript
โโโ package.json # Dependencies (with Playwright)
โโโ README.mdBuilding
npm run buildTesting
# With MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.jsLimitations
Maximum 10 URLs for batch scraping
Content truncated at 100,000 characters
Request timeout: 1-120 seconds
Chromium browser required (~170MB download)
Supports only HTTP/HTTPS protocols
Requires publicly accessible URLs
Performance Tips
Use Static Mode When Possible: 3-5x faster for traditional sites
Batch Related URLs: More efficient than individual calls
Set Appropriate Timeouts: Longer for slow sites, shorter for fast ones
Use Selectors Wisely: Wait for specific elements instead of fixed times
Limit Screenshot Usage: Screenshots increase response size significantly
Comparison with v1.0
Feature | v1.0 (Cheerio Only) | v2.0 (Playwright) |
Static HTML | โ Fast | โ Fast |
JavaScript | โ | โ Full Support |
Auto-Detection | โ | โ Smart Fallback |
Screenshots | โ | โ Base64 Output |
Lazy Loading | โ | โ Supported |
SPAs | โ Limited | โ Full Support |
License
MIT
Contributing
Contributions welcome! Areas for improvement:
Support for other Playwright browsers (Firefox, WebKit)
PDF generation from pages
Advanced selector strategies
Request interception for blocking ads
Cookie management
Proxy support
Support
For issues or questions, please open an issue on the GitHub repository.
Made with โค๏ธ using Microsoft Playwright and Model Context Protocol
Available Tools
3 toolsextract_imagesA
Extract all images from a web page. Returns a list of images with their URLs, alt text, and metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the web page to extract images from |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the burden of behavioral disclosure. It does state that it returns a list with image URLs, alt text, and metadata, which is a useful behavioral trait. However, it omits details about potential errors, rate limits, handling of dynamic content, or what 'all images' means in edge cases. This is adequate for a simple tool but not fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two concise sentences that directly state the action and the return value. There is no redundant or filler text, and it is front-loaded with the primary action. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with a single required parameter and no output schema, the description provides a complete enough picture: it states what it does and what it returns. It lacks additional context about limitations or prerequisites, but given the simplicity, this is sufficient. A score of 4 reflects a well-rounded description for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already fully describes the single parameter (url) with 100% coverage, stating 'The URL of the web page to extract images from'. The description's phrase 'from a web page' adds no new semantics beyond the schema. Per the rubric, with high schema coverage, a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Extract' with the resource 'all images from a web page', which clearly states the tool's function. It distinguishes from sibling tools like extract_links by focusing specifically on images rather than links. The mention of return contents (URLs, alt text, metadata) further clarifies the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use the tool (when images from a web page are needed), but it does not explicitly mention alternatives or exclusionary criteria. Since the context is straightforward and distinguishes from siblings through the tool name and description, it deserves a score above 'no guidance' but not the full 5 because it lacks explicit 'when not to use' language.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_linksA
Extract all links from a web page. Returns a list of links with their text, URLs, and metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the web page to extract links from |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the return format (list of links with text, URLs, metadata) but does not mention potential side effects, failure modes, or that it is a read-only operation. This is minimal but not misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the core action, and every word adds value. It is concise and well-structured with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description adequately covers purpose and return structure. However, it omits edge-case behavior like error handling or dynamic content, but this does not severely hinder usability for straightforward cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%โthe 'url' parameter is already fully described as 'The URL of the web page to extract links from.' The description repeats this without adding extra semantics, so it meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses a specific verb+resource ('Extract all links from a web page') and clearly differentiates from sibling tools like extract_images and scrape_page by focusing on links. It also specifies the return structure (text, URLs, metadata), making its purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There are no explicit conditions, exclusions, or references to sibling tools, leaving the agent to infer usage solely from the tool name and purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scrape_pageB
Scrape a web page and convert it to Markdown format. Returns the page content, metadata, and extracted information.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the web page to scrape | |
| options | No | Optional scraping configuration |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only states that scraping occurs and that Markdown is returned. It does not mention whether JavaScript rendering is enabled by default, how redirects are handled, rate limits, authentication requirements, or potential blocks. The extensive options in the schema are not reflected in the description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long and front-loads the core purpose. It avoids unnecessary detail and remains efficient, though it could benefit from mentioning key options without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with a nested options object and no output schema or annotations, the description is too sparse. It leaves the agent uncertain about what 'metadata' and 'extracted information' entail, how the tool behaves on dynamic pages, and how it relates to the sibling extraction tools. The description would benefit from naming the available options and clarifying return shape.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides complete descriptions for all parameters (coverage 100%), so the description does not need to explain them. The description's mention of 'extracted information' is vague but does not conflict with schema; however, it adds little detail beyond what the schema already documents.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('Scrape a web page and convert it to Markdown format') and its output (content, metadata, extracted information). It distinguishes itself from the sibling extractors (extract_links, extract_images) by emphasizing full-page conversion rather than specific element extraction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool versus the sibling tools (extract_links, extract_images). It does not specify scenarios or requirements such as needing only links or images, nor does it mention any prerequisites for scraping.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct purpose: scrape_page retrieves page content, extract_links gets hyperlinks, and extract_images gets images. There is clear separation of concerns with no overlapping functionality.
All tool names follow a consistent verb_noun pattern in snake_case (scrape_page, extract_links, extract_images). While 'scrape' and 'extract' differ, they are appropriate verbs for their respective actions, and the pattern is uniform.
Three tools is well-scoped for a focused web scraping server. Each tool covers a core aspect of scraping without redundancy, fitting comfortably within the ideal 3-15 range.
The set covers fundamental scraping needs: content, links, and images. It could be extended with custom selector support or structured data extraction, but the current surface handles basic workflows without dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
All HasData scraping tools in one MCP server: Google, TikTok, Instagram, maps, e-commerce and more.
One MCP server for 180+ live web-data APIs returning clean JSON from sites that block scrapers.
MCP server for web extraction and rendering via AceDataCloud WebExtrator
Free remote MCP server for fetching public web pages through a rotating proxy pool.
Related MCP Servers
- AlicenseBqualityFmaintenanceAn MCP server that retrieves web page content using Playwright headless browser, capable of extracting main content and converting to Markdown format.34,9761,079MIT
- AlicenseBqualityNot gradedmaintenanceA MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.82
- AlicenseCqualityFmaintenanceA comprehensive MCP server that provides powerful web automation tools using Playwright, enabling web scraping, testing, and browser interaction through natural language commands.43815MIT
- AlicenseNot gradedqualityDmaintenanceA powerful MCP server that offers web scraping capabilities unrestricted by robots.txt, supports multiple HTTP methods and custom request Settings.2Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lucasbrito-wdt/webscraper-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server