Fetcher

Fetcher

使用无头浏览器Playwright抓取网页内容的MCP Server。

Fetch MCP 是一个使用 Playwright 无头浏览器获取网页内容的服务。

快速开始

使用 npx 直接运行:

# 标准模式
npx -y github:jae-jae/fetch-mcp

# 调试模式(显示浏览器窗口)
npx -y github:jae-jae/fetch-mcp --debug

配置 MCP

在 Claude Desktop 配置文件中添加:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["-y", "github:jae-jae/fetch-mcp"]
    }
  }
}

主要功能

fetch_url - 获取单个网页内容

# 基本用法
fetch_url(url="https://example.com")

# 高级选项
fetch_url(
  url="https://example.com",
  timeout=30000,         # 超时时间(毫秒)
  waitUntil="load",      # 导航完成条件
  extractContent=True,   # 智能提取主要内容
  maxLength=10000,       # 最大内容长度
  returnHtml=False       # 返回Markdown而非HTML
)

fetch_urls - 并行获取多个网页内容

# 基本用法
fetch_urls(urls=["https://example1.com", "https://example2.com"])

# 支持与fetch_url相同的其他参数

开发相关

# 安装依赖
npm install

# 安装Playwright浏览器
npm run install-browser

# 构建服务
npm run build

# 调试
npm run inspector