Web Fetch MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add web-fetch -- npx -y @xiaozhuabcd1234/web-fetch-mcp
README.md

An MCP server for web scraping and Bing search capabilities.

web-fetch-mcp

一个 Model Context Protocol (MCP) 服务器,为 AI 助手提供强大的网页抓取和搜索功能。

功能特性

  • 网页抓取:提取页面摘要、元数据、链接和文本内容
  • 动态页面支持:使用 Puppeteer 自动检测和渲染 SPA(单页应用)
  • SEO 元数据:提取 Open Graph、Twitter Card 和传统 Meta 标签
  • 网页搜索:内置 Bing 搜索集成
  • 智能检测:自动判断页面是否需要无头浏览器渲染

工具列表

工具 描述
fetch_page_summary 获取页面标题、链接和图片概览
fetch_page_metadata 提取 SEO 标签和 Open Graph 元数据
fetch_links 提取页面所有超链接
fetch_links_headless 使用无头浏览器提取链接(适用于动态页面)
fetch_page_text 提取页面主要文本内容
fetch_page_text_headless 使用无头浏览器提取文本(适用于动态页面)
search_web 使用 Bing 搜索引擎搜索

安装

使用 npm/npx(推荐)

# 全局安装
npm install -g @xiaozhuabcd1234/web-fetch-mcp

# 运行
npx web-fetch-mcp

使用 Bun

bun install @xiaozhuabcd1234/web-fetch-mcp

从源码运行

git clone https://github.com/xiaozhuabcd1234/web-fetch-mcp.git
cd web-fetch-mcp
bun install
bun run src/index.ts

使用方法

Claude Desktop 集成

添加到 claude_desktop_config.json

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

项目结构

web-fetch-mcp/
├── src/
│   ├── index.ts           # MCP 服务器入口
│   ├── browser.ts         # Puppeteer 浏览器管理
│   ├── web-scraper.ts     # 核心抓取工具
│   ├── search.ts          # 网页搜索接口
│   └── search-engines/
│       └── bing.ts        # Bing 搜索实现

核心模块

  • browser.ts:管理 Puppeteer 浏览器实例,支持隐身模式和可配置选项
  • web-scraper.ts:使用 Cheerio 进行 HTML 解析,包含 SPA 检测启发式算法
  • search.ts:统一的搜索接口,支持多搜索引擎

环境要求

  • Bun 1.0+
  • Node.js 18+(备用方案)
  • Chromium/Chrome 浏览器(用于 Puppeteer)

环境变量

变量 描述 默认值
CHROME_PATH Chrome 可执行文件路径 自动检测

开源协议

GPL-3.0-only - 详见 LICENSE 文件。

Tools (7)

fetch_page_summaryRetrieves the page title, links, and image overview.
fetch_page_metadataExtracts SEO tags and Open Graph metadata.
fetch_linksExtracts all hyperlinks from a page.
fetch_links_headlessExtracts links using a headless browser for dynamic pages.
fetch_page_textExtracts the main text content of a page.
fetch_page_text_headlessExtracts text content using a headless browser for dynamic pages.
search_webPerforms a web search using the Bing search engine.

Environment Variables

CHROME_PATHPath to the Chrome or Chromium executable for Puppeteer.

Configuration

claude_desktop_config.json
{"mcpServers": {"web-fetch": {"command": "npx", "args": ["-y", "@xiaozhuabcd1234/web-fetch-mcp"]}}}

Try it

Search for the latest updates on the Model Context Protocol using Bing.
Extract the main text content from this URL: https://example.com
Get the SEO metadata and Open Graph tags for the provided webpage.
Find all the links on this documentation page to help me navigate the site structure.
Use the headless browser to fetch the full text of this dynamic SPA website.

Frequently Asked Questions

What are the key features of Web Fetch?

Extracts page summaries, metadata, and full text content.. Supports dynamic SPA rendering using Puppeteer.. Built-in Bing search engine integration.. Automatic detection of whether a page requires headless browser rendering.. Extracts Open Graph, Twitter Card, and standard Meta tags..

What can I use Web Fetch for?

Automating research by searching the web and summarizing relevant articles.. Extracting structured SEO data from competitor websites for analysis.. Gathering content from dynamic, JavaScript-heavy websites that standard scrapers miss.. Building a knowledge base by scraping and cleaning text from multiple web sources..

How do I install Web Fetch?

Install Web Fetch by running: npx web-fetch-mcp

What MCP clients work with Web Fetch?

Web Fetch works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Web Fetch docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare