Skip to main content
Glama
mcp-web-reader

mcp-web-reader

by aranshayan

mcp-web-reader

CI npm License: MIT

An MCP server that lets Claude read web pages as clean Markdown — article extraction (Mozilla Readability), tables, absolute links — with the guard rails a tool that fetches model-chosen URLs needs.

  • SSRF protection on by default. Blocks localhost, private ranges, link-local/cloud-metadata (169.254.169.254), CGNAT, IPv6 loopback/ULA, IPv4-mapped IPv6 and NAT64. Hostnames are validated at connect time (defeats DNS rebinding) and every redirect hop is re-validated.

  • Polite. Honours robots.txt, identifies itself with a clear User-Agent.

  • Bounded. Response size cap, request timeout, redirect limit, content-type allowlist (text/HTML/JSON/XML only).

  • Paginated. Long pages are read in pieces with start_index.

  • Honest about failures. 4xx/5xx responses come back as errors with the status, not as page content (allow_error_status reads the error page anyway). Bot checks from Vercel, Cloudflare, Imperva, DDoS-Guard and AWS WAF are named as such, with a note that retrying will not help.

  • Pure JS, no browser, no native dependencies. (Pages that need JavaScript to render are not supported.)

Quick start

{
  "mcpServers": {
    "web": { "command": "npx", "args": ["-y", "@aranshayan/mcp-web-reader"] }
  }
}

Claude Code: claude mcp add web -- npx -y @aranshayan/mcp-web-reader. Requires Node.js 22+.

Related MCP server: web-reader-mcp

Tools

Tool

Description

fetch_page

Page → Markdown (or text). Options: main_content, max_chars, start_index, allow_error_status.

extract_links

Unique absolute http(s) links, optionally same-domain only.

page_metadata

Title, description, canonical URL, language, Open Graph.

All tools are readOnlyHint. Fetched content is untrusted: the server instructs the model to treat it as data, not instructions, but prompt injection remains a risk with any web-reading tool — pair it with --allowed-domains for sensitive agents.

Options

Flag

Default

--allow-private

off

Permit localhost / private networks (for local docs sites).

--ignore-robots

off

Skip robots.txt. Only with permission.

--allowed-domains a.com,b.org

any

Restrict to these domains and subdomains.

--blocked-domains …

none

Never fetch these.

--timeout-ms

15000

Per request.

--max-bytes

5 MiB

Max download size.

--user-agent

mcp-web-reader/x (+repo)

Environment: MCP_WEB_ALLOW_PRIVATE, MCP_WEB_IGNORE_ROBOTS, MCP_WEB_ALLOWED_DOMAINS, MCP_WEB_BLOCKED_DOMAINS.

Tests

npm test covers the IP classifier (IPv4/IPv6 edge cases), URL policy, extraction, pagination, size/type limits, robots.txt, redirect loops, proof that blocked requests never reach the server, and the built CLI over stdio. Against the live internet, npm run build && npm run smoke reads 12 stable public pages (docs sites, a large RFC, a redirect, a JSON API) through the built CLI and checks each one. The "Live smoke test" workflow runs it weekly and on demand, never on pull requests, so a site that is down cannot block a merge. The list is in scripts/smoke-sites.json.

License

MIT

Available Tools

3 tools
fetch_pageFetch page as MarkdownA
Read-onlyIdempotent

Download a web page and return its main content as clean Markdown (navigation, ads and scripts removed). Long pages are paginated with max_chars / start_index. Respects robots.txt and blocks private-network addresses.

Inputs: url (required), format, max_chars, start_index, +2 more.

page_metadataPage metadataA
Read-onlyIdempotent

Return a page's title, description, canonical URL, language and Open Graph data without converting the body.

Inputs: url (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a clearly different output: fetch_page returns cleaned body content, extract_links returns link lists, and page_metadata returns metadata only. There is little risk of confusion because their outputs and use cases are distinct.

    Naming Consistency4/5

    All names use snake_case, and two follow a clear verb_noun pattern (fetch_page, extract_links). page_metadata is a noun phrase rather than verb_noun, which is a minor inconsistency but still readable and predictable.

    Tool Count5/5

    Three tools are well-scoped for a web-reading server: one fetches content, one extracts links, and one extracts metadata. Each has a distinct role, and no tool feels redundant.

    Completeness4/5

    The surface covers the core web-reading needs: page content, links, and metadata. Minor gaps include raw HTML/header access or selector-based extraction, but agents can generally work around these for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to fetch and process web content securely, including HTML-to-markdown conversion, reader mode, metadata extraction, RSS/sitemap parsing, and robots.txt-aware requests with SSRF protection.
      15
      253 npm
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables reading web pages and PDFs as clean Markdown, extracting main content and letting agents query for relevant passages, outline sections, search in-page, and list links while respecting robots.txt and blocking private addresses.
      4
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to read web pages as clean markdown or JSON, crawl sites, search the web with results already read, monitor pages for changes, and run multi-step browser tasks under configurable limits.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI clients to read public webpages as Markdown or HTML, discover links, extract structured JSON, and perform bounded crawls.
      AGPL 3.0