Skip to main content
Glama

Yet Another WebFetch MCP Alternative

English | 中文


English

A local MCP server that fetches any http/https webpage, extracts the main content, and converts it to Markdown. Designed as a drop-in replacement for Claude Code's built-in WebFetch tool, which may fail under certain network / proxy environments (e.g., "Unable to verify if domain is safe").

Features

  • Content extraction — Mozilla Readability for article pages; falls back to full-page conversion for non-article content.

  • HTML → Markdown — powered by turndown; preserves headings and code blocks.

  • Auto proxy detection — picks up Windows / macOS / Linux system proxy automatically (env vars also supported).

  • Truncation — defaults to 50,000 characters to prevent context overflow.

  • 20s timeout, redirect-follow, browser User-Agent.

  • SSRF protection — http/https only; blocks localhost and private IP ranges (IPv4 & IPv6).

Installation

Requires Node.js ≥ 20.

git clone <repo-url> Yet-Another-WebFetch-MCP-Alternative
cd Yet-Another-WebFetch-MCP-Alternative
npm install

Setup with Claude Code

Add the following to ~/.claude.json under mcpServers (user-level) or to a project-local .mcp.json:

{
  "mcpServers": {
    "webfetch": {
      "type": "stdio",
      "command": "node",
      "args": ["<path-to-repo>\\index.js"]
    }
  }
}

Note: On Windows, avoid using npx as the command — it silently fails in non-TTY environments.

Reload the window (Ctrl+Shift+PDeveloper: Reload Window), then type /mcp in a conversation to verify the connection.

Usage

The tool is registered as fetch_web.

Parameter

Required

Description

url

Yes

Full URL, http or https

maxChars

No

Max characters returned, default 50000

timeout

No

Timeout in milliseconds, default 20000

Claude will invoke the tool automatically when it needs to fetch a webpage — no manual prompting required.

Proxy

The server auto-detects the system proxy on all three platforms:

Platform

Detection method

Windows

Registry Internet Settings\ProxyServer

macOS

scutil --proxy

Linux

GNOME gsettings

To override manually, set the HTTPS_PROXY or HTTP_PROXY environment variable in the MCP config:

{
  "webfetch": {
    "type": "stdio",
    "command": "node",
    "args": ["<path-to-repo>\\index.js"],
    "env": {
      "HTTPS_PROXY": "http://127.0.0.1:7890"
    }
  }
}

Testing

npm test          # Handshake & tool list test (no network required)
LIVE=1 npm test   # End-to-end fetch against docs.tavily.com

Known Limitations

  • No JavaScript rendering — dynamic pages only return the initial HTML (same as most scraping tools).

  • Non-UTF-8 pages may produce garbled output in edge cases.

  • Sites with strict anti-bot measures may return error pages or block requests.

  • Domains unreachable from the local network (e.g., DNS-blocked in certain regions) cannot be fetched.

License

MIT


Related MCP server: superFetch MCP Server

中文

一款本地 MCP 服务器:抓取任意 http/https 网页,提取正文并转换为 Markdown。作为 Claude Code 内置 WebFetch 工具的替代——内置 WebFetch 在部分网络 / 代理环境下会报 "Unable to verify if domain is safe" 而不可用。

特性

  • 正文提取 — 基于 Mozilla Readability,非文章页面自动回退全文转换。

  • HTML → Markdown — 基于 turndown,保留标题与代码块。

  • 自动代理检测 — 自动读取 Windows / macOS / Linux 系统代理,也支持环境变量覆盖。

  • 截断 — 默认 50000 字符,防止上下文溢出。

  • 20s 超时、重定向跟随、浏览器 UA。

  • SSRF 防护 — 仅 http/https,拒绝本机与内网地址(含 IPv6)。

安装

需要 Node.js ≥ 20。

git clone <仓库地址> Yet-Another-WebFetch-MCP-Alternative
cd Yet-Another-WebFetch-MCP-Alternative
npm install

接入 Claude Code

~/.claude.jsonmcpServers(用户全局)或项目根目录 .mcp.json 中加入:

{
  "mcpServers": {
    "webfetch": {
      "type": "stdio",
      "command": "node",
      "args": ["<仓库路径>\\index.js"]
    }
  }
}

注意: Windows 下不要用 npx 作为 command(无 TTY 环境下会静默失败)。

保存后重载窗口(Ctrl+Shift+PDeveloper: Reload Window),在对话中输入 /mcp 确认连接状态。

使用

工具名为 fetch_web

参数

必填

说明

url

完整 URL,http 或 https

maxChars

返回内容最大字符数,默认 50000

timeout

超时毫秒数,默认 20000

Claude 会在需要抓取网页时自动调用,无需手动引导。

代理

服务器自动检测三平台系统代理:

平台

检测方式

Windows

注册表 Internet Settings\ProxyServer

macOS

scutil --proxy

Linux

GNOME gsettings

如需手动覆盖,在 MCP 配置中设置 HTTPS_PROXYHTTP_PROXY 环境变量:

{
  "webfetch": {
    "type": "stdio",
    "command": "node",
    "args": ["<仓库路径>\\index.js"],
    "env": {
      "HTTPS_PROXY": "http://127.0.0.1:7890"
    }
  }
}

测试

npm test          # 握手与工具清单测试(不依赖网络)
LIVE=1 npm test   # 额外做一次端到端抓取(docs.tavily.com)

已知限制

  • 不渲染 JavaScript — 动态页面只能拿到初始 HTML(与多数抓取工具一致)。

  • 非 UTF-8 编码页面在极端情况下可能乱码。

  • 严格反爬站点可能被拦截或返回错误页。

  • 本机网络 DNS 不可达的域名无法抓取。

许可证

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    -
    maintenance
    An MCP server for web content extraction that converts HTML pages into clean, LLM-optimized Markdown using Mozilla's Readability. It supports batch processing, intelligent multi-page crawling, and configurable caching while respecting robots.txt standards.
    Last updated
    132
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that fetches web pages and extracts clean, AI-friendly Markdown content using Mozilla Readability. It provides secure web access for LLMs with built-in SSRF protection and automated content cleaning for improved context retrieval and summarization.
    Last updated
    1
    259
    MIT

View all related MCP servers

Related MCP Connectors

  • Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.

  • Jina AI Reader/Search MCP — turn any URL into clean LLM-ready markdown, plus web search.

  • Firecrawl MCP — wraps the Firecrawl API (firecrawl.dev) for web

View all MCP Connectors

Latest Blog Posts

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/ChesterNotChest/Yet-Another-WebFetch-MCP-Alternative'

If you have feedback or need assistance with the MCP directory API, please join our Discord server