Skip to main content
Glama
Web Scraper MCP Server

Web Scraper MCP Server

by bhubadinn
README.md
# Web Scraper MCP Server

A powerful Model Context Protocol (MCP) server that gives AI assistants the ability to scrape, screenshot, and extract structured data from any website.

## Tools

| Tool | Description |
|------|-------------|
| `scrape_url` | Extract text content, metadata, headings, links, and images from any URL |
| `screenshot_url` | Take a PNG screenshot of any page (viewport or full-page) |
| `extract_data` | Extract structured data using CSS selectors, list extraction, or auto-detect tables |
| `get_links` | Get all links from a page, categorized as internal/external |
| `run_script` | Execute custom JavaScript on any page and return the result |
| `check_changes` | Monitor a page for changes over time (compares content hash) |

## Installation

```bash
npm install mcp-web-scraper
```

Or clone and build:

```bash
git clone https://github.com/bhubadinn/mcp-web-scraper.git
cd mcp-web-scraper
npm install
npm run build
```

## Usage with Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "web-scraper": {
      "command": "node",
      "args": ["/path/to/mcp-web-scraper/dist/index.js"]
    }
  }
}
```

## Usage with Claude Code

```bash
claude mcp add web-scraper node /path/to/mcp-web-scraper/dist/index.js
```

## Examples

### Scrape a page
```
Use the scrape_url tool to extract content from https://news.ycombinator.com
```

### Take a screenshot
```
Screenshot https://example.com at 1920x1080 resolution
```

### Extract product data
```
Extract data from https://example-shop.com using:
- list_selector: ".product-card"
- fields: {"name": ".title", "price": ".price", "rating": ".stars"}
```

### Monitor for changes
```
Check if https://status.example.com has changed since last time
```

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `CHROME_PATH` | Path to Chrome/Chromium binary | Auto-detected |

## How It Works

The server launches a headless Chromium browser and creates fresh page instances for each request. Pages are configured with a standard user agent and 1440x900 viewport. Each tool navigates to the target URL, performs its operation, and returns structured results.

## License

MIT

TDQS

B3.3/5.0

Scored across 6 tools

Disambiguation3/5

scrape_url claims to return text, metadata, links, AND structured data, which overlaps heavily with extract_data and get_links. The descriptions hint at specialization (targeted CSS selectors, categorized link lists), but an agent could plausibly pick scrape_url for tasks the other two tools were built for. run_script, screenshot_url, and check_changes are clearly distinct.

Naming Consistency4/5

All names are snake_case verb_noun constructions (scrape_url, extract_data, get_links, run_script, check_changes), so the pattern is predictable. The minor deviation is screenshot_url, which reads as a noun used as a verb alongside otherwise distinct action verbs.

Tool Count5/5

Six tools is a tight, well-scoped surface for a web-scraping server, with each tool mapping to a recognizable capability (fetch, render, parse, link harvest, script, diff). Nothing feels padded or missing at the count level.

Completeness4/5

The lifecycle from raw fetch through parsing, rendering, JS execution, and change detection is covered, which is solid for the domain. Gaps are minor: no multi-page crawl/batch scrape, no form submission or POST support, and no explicit pagination handling.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues