weblens-mcp
Click on "Deploy 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., "@weblens-mcpscrape https://example.com and return the content as 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.
WebLens MCP
Web scraping and content extraction MCP server for AI agents. Renders any URL — including JavaScript-heavy SPAs — with headless Chromium via Playwright, extracts readable content with Mozilla Readability, captures the page's navigation links, 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— runs as a local stdio MCP server. Playwright downloads its own Chromium on install, so there's nothing else to set up.
Key Features
Single tool — one
fetch_pagecall does everything: render, extract, download, returnBundled browser — Chromium is auto-installed by Playwright; no system Chrome required
Markdown output — returns a local
.mdfile path with images embedded as local pathsArticle extraction — uses Mozilla Readability for clean content
Navigation links — captures the site's menu/sidebar/header links (same-host, deduped)
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
That's it. On install, Playwright downloads a matching Chromium build automatically (~90 MB, cached globally and reused across projects). No system Chrome needed.
Browser
You normally don't need to do anything — Chromium is downloaded on npm install / first npx. If the automatic download was skipped (offline, firewall, or --ignore-scripts), you have two options:
# 1. Install the bundled browser manually with the Playwright CLI
npx playwright install chromium# 2. Or point WebLens at a Chrome/Chromium you already have
CHROMIUM_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"If CHROMIUM_PATH is unset and the bundled browser is missing, WebLens also falls back to any Chrome/Chromium/Edge found in standard OS install locations.
Getting started
Standard config works in most MCP clients (no environment variables needed — Chromium is bundled):
{
"mcpServers": {
"weblens": {
"command": "npx",
"args": ["-y", "weblens-mcp"]
}
}
}Add an
"env": { "CHROMIUM_PATH": "..." }block only to use a specific browser instead of the bundled Chromium.
claude mcp add weblens -- npx -y weblens-mcpOr add to your project's .mcp.json:
{
"mcpServers": {
"weblens": {
"command": "npx",
"args": ["-y", "weblens-mcp"]
}
}
}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"]
# Optional — only to override the bundled Chromium:
# [mcp_servers.weblens.env]
# CHROMIUM_PATH = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"Go to Cursor Settings → MCP → Add 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 |
| Override the browser. By default WebLens uses Playwright's bundled Chromium; set this to use a specific Chrome/Chromium/Edge executable. | Bundled Chromium |
| Set to |
|
Browser resolution order: CHROMIUM_PATH (if set) → Playwright's bundled Chromium → a system Chrome/Chromium/Edge found in standard OS install locations (/Applications/... on macOS, C:\Program Files\... on Windows, /usr/bin/... on Linux).
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 |
| string | yes | Target page URL |
Returns: Absolute path to a .md file in the system temp directory.
Example response:
/var/folders/lp/.../T/weblens-mcp/327c3fda87ce286848a574982ddd0b7c7487f816.mdGenerated markdown format:
# Page Title
Source: https://example.com/article
> Article excerpt or description
Article body text content...
## Navigation
- [Docs](https://example.com/docs)
- [Pricing](https://example.com/pricing)
- [Blog](https://example.com/blog)
## Images

Behavior:
Renders the page with Playwright (headless Chromium)
Blocks media and font requests for faster loading
Extracts article content using Mozilla Readability when possible
Captures navigation links from
nav/header/aside/menu regions (same-host, deduped, up to 50)Downloads page images (skips icons smaller than 50x50px)
Writes markdown with local image paths to the system temp dir (
<os-tmp>/weblens-mcp/)Files older than 6 hours are automatically cleaned up
Local development
npm install
npm run build
node dist/index.jsHow it works
URL
└→ Playwright renders page (headless Chromium)
└→ Extract title, text, HTML, images, navigation links from DOM
└→ Mozilla Readability extracts clean article content
└→ Download images to <os-tmp>/weblens-mcp/
└→ Compose markdown with local image paths
└→ Write .md file, return pathTmp directory
Downloaded assets and markdown files are stored in your system temp directory under weblens-mcp/ (e.g. /tmp/weblens-mcp/ on Linux, /var/folders/.../T/weblens-mcp/ on macOS). Cleanup runs automatically:
On every
fetch_pagecall (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-mcp:/tmp/weblens-mcp",
"weblens-mcp"
]
}
}
}License
ISC
Available Tools
1 toolfetch_pageA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Target page URL. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral weight. It discloses the key output behavior (markdown conversion, image embedding, local file path), but does not mention potential network side effects, JavaScript rendering, page size limits, or error behavior. This is a moderate gap for a tool that fetches external pages.
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 one efficient sentence that front-loads the action ('Fetch and render a web page') and immediately states the concrete return value. Every word contributes necessary information.
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 single-parameter tool with no output schema, the description adequately covers what the agent receives (a markdown file path) and what the tool does. It could additionally mention usage limitations or cleanup expectations, but nothing critical is missing for basic invocation.
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 input schema has 100% description coverage: the single 'url' parameter is documented as 'Target page URL.' The description adds no further semantic detail beyond the schema, so the 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 identifies a specific verb (fetch and render) and resource (web page), and clearly states the output: a local markdown file path with embedded images. With no sibling tools, there is no differentiation burden, and the purpose is 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 clear context about what the tool does, so an agent can infer when to use it. However, it does not explicitly state when not to use it or name alternatives, though none exist in the provided sibling list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.5.1- First observed
fetch_page
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusing it with another tool. Its purpose is clearly stated and unambiguous.
The tool name 'fetch_page' follows a clear snake_case verb_noun pattern. With only one tool, there is no inconsistency.
A single tool feels thin, especially for a server named 'weblens' which implies a boader web toolkit. However, as a focused page-fetching utility, the count is borderline rather than clearly insufficient.
The core operation of fetching and rendering a web page to a local markup file is fully covered. Minor gaps exist like lack of options for custom headers or alternative output formats, but no critical lifecycle is missing for this narrow domain.
Maintenance
Related MCP Connectors
Fetch pages as markdown, search web and news, extract structured data. For AI agents.
Read any web page as clean Markdown for AI agents: fetch, search, metadata, links. SSRF-safe.
Converts any URL to clean, LLM-ready Markdown using real Chrome browsers
Web search, fetch, extract, and research for AI agents. Markdown output + AI-synthesized answers.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides web content fetching capabilities using Playwright browser automation, enabling LLMs to retrieve and process JavaScript-rendered content from web pages and convert HTML to markdown for easier consumption.14MIT
- AlicenseNot gradedqualityAmaintenanceProvides browser-grade web access by rendering pages to markdown, taking screenshots, and fetching images using headless Chromium/Firefox (Playwright) and httpx.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to read web pages reliably, returning clean markdown content, hyperlinks, and metadata without navigation or ad noise.36 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents to fetch any web page as clean markdown or screenshot it, turning URLs into LLM-ready context.26 npmMIT