npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

weblens-mcp

v0.3.0

Published

MCP server for web scraping, page rendering, and content extraction — renders any URL (including SPAs) with Playwright, extracts readable content, downloads images locally, and returns clean markdown. Built for Claude, Cursor, Copilot, and any MCP-compati

Readme

WebLens MCP

Web scraping and content extraction MCP server for AI agents. Renders any URL — including JavaScript-heavy SPAs — with headless Chrome via Playwright, extracts readable content with Mozilla Readability, downloads images locally, and returns a clean markdown file. Works with Claude, Claude Code, Cursor, Copilot, VS Code, Codex, and any MCP-compatible client.

npx -y weblens-mcp — zero config, just add your Chrome path and go.

Key Features

  • Single tool — one fetch_page call does everything: render, extract, download, return
  • Markdown output — returns a local .md file path with images embedded as local paths
  • Article extraction — uses Mozilla Readability for clean content
  • Asset download — page images are downloaded to a local tmp directory automatically
  • Auto cleanup — downloaded files are purged after 6 hours

Requirements

  • Node.js 20 or newer
  • Chrome or Chromium installed on the system

Getting started

Standard config works in most MCP clients:

{
  "mcpServers": {
    "weblens": {
      "command": "npx",
      "args": ["-y", "weblens-mcp"],
      "env": {
        "CHROMIUM_PATH": "/usr/bin/google-chrome"
      }
    }
  }
}
claude mcp add weblens -- npx -y weblens-mcp

Or add to your project's .mcp.json:

{
  "mcpServers": {
    "weblens": {
      "command": "npx",
      "args": ["-y", "weblens-mcp"],
      "env": {
        "CHROMIUM_PATH": "/usr/bin/google-chrome"
      }
    }
  }
}

Follow the MCP install guide, use the standard config above.

Create or edit ~/.codex/config.toml:

[mcp_servers.weblens]
command = "npx"
args = ["-y", "weblens-mcp"]

[mcp_servers.weblens.env]
CHROMIUM_PATH = "/usr/bin/google-chrome"

Go to Cursor SettingsMCPAdd new MCP Server. Use command type with the command npx -y weblens-mcp.

code --add-mcp '{"name":"weblens","command":"npx","args":["-y","weblens-mcp"]}'

Configuration

| Environment Variable | Description | Default | |---|---|---| | CHROMIUM_PATH | Path to Chrome/Chromium executable. Auto-detected if not set. | Auto-detect | | INSECURE_TLS | Set to 1 to accept self-signed certificates. | 0 (disabled) |

Auto-detection checks these paths in order:

/usr/bin/google-chrome
/usr/bin/google-chrome-stable
/usr/bin/chromium
/usr/bin/chromium-browser

Tool

fetch_page

Fetch and render a web page. Returns the absolute path to a local markdown file containing the page content with downloaded images embedded as local file paths.

Parameters:

| Parameter | Type | Required | Description | |---|---|---|---| | url | string | yes | Target page URL |

Returns: Absolute path to a .md file in the local tmp directory.

Example response:

/home/user/project/dist/.tmp/weblens/327c3fda87ce286848a574982ddd0b7c7487f816.md

Generated markdown format:

# Page Title

Source: https://example.com/article

> Article excerpt or description

Article body text content...

## Images

![alt text](/home/user/project/dist/.tmp/weblens/abc123.png)
![another image](/home/user/project/dist/.tmp/weblens/def456.jpg)

Behavior:

  • Renders the page with Playwright (headless Chrome)
  • Blocks media and font requests for faster loading
  • Extracts article content using Mozilla Readability when possible
  • Downloads page images (skips icons smaller than 50x50px)
  • Writes markdown with local image paths to dist/.tmp/weblens/
  • Files older than 6 hours are automatically cleaned up

Local development

npm install
npm run build
node dist/index.js

How it works

URL
 └→ Playwright renders page (headless Chrome)
     └→ Extract title, text, HTML, images from DOM
         └→ Mozilla Readability extracts clean article content
             └→ Download images to dist/.tmp/weblens/
                 └→ Compose markdown with local image paths
                     └→ Write .md file, return path

Tmp directory

Downloaded assets and markdown files are stored in dist/.tmp/weblens/. Cleanup runs automatically:

  • On every fetch_page call (throttled to every 5 minutes)
  • Files older than 6 hours (by mtime) are deleted
  • No external cron or scheduler needed

Docker

{
  "mcpServers": {
    "weblens": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm", "--init",
        "-v", "/tmp/weblens:/app/dist/.tmp/weblens",
        "weblens-mcp"
      ]
    }
  }
}

License

ISC