JJ

jae-jae/fetcher-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1087 stars 100 forks 质量 71 趋势 23MIT

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

概览

中文 |德语 |西班牙语 |法语 |日本語 |한국어 |葡萄牙人 |Русский 使用 Playwright 无头浏览器获取网页内容的 MCP 服务器。 🌟 : OllaMan - 强大的 Ollama AI 模型管理器。 - : 与传统网页抓取器不同,Fetcher MCP 使用 Playwright 执行 JavaScript,使其能够处理动态网页内容和现代网页应用。 - :内置可读性算法自动从网页中提取主要内容,去除广告、导航及其他非必要元素。 - :支持 HTML 和 Markdown 输出格式,便于与多种下游应用集成。 - : fetch_urls工具支持多个URL的并发获取,显著提升批处理效率。 - : 自动屏蔽不必要的资源(图片、样式表、字体、媒体),以减少带宽使用并提升性能。

概述(AI 翻译)

中文 | 德语 | 西班牙语 | 法语 | 日本語 | 한국어 | 葡萄牙人 | Русский

费彻MCP

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

🌟 推荐:OllaMan——强大的Ollama AI模型管理器。

优点

  • JavaScript 支持:与传统网页爬虫不同,Fetcher MCP 使用 Playwright 执行 JavaScript,使其能够处理动态网页内容和现代网页应用。

  • 智能内容提取:内置可读性算法自动从网页中提取主要内容,去除广告、导航及其他非必要元素。

  • 灵活输出格式:支持HTML和Markdown输出格式,便于与多种下游应用集成。

  • 并行处理:fetch_urls 工具支持多个 URL 的并发获取,显著提升批处理效率。

  • 资源优化:自动屏蔽不必要的资源(图片、样式表、字体、媒体),以减少带宽使用并提升性能。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

中文 | Deutsch | Español | français | 日本語 | 한국어 | Português | Русский

Fetcher MCP

MCP server for fetch web page content using Playwright headless browser.

🌟 Recommended: OllaMan - Powerful Ollama AI Model Manager.

Advantages

  • JavaScript Support: Unlike traditional web scrapers, Fetcher MCP uses Playwright to execute JavaScript, making it capable of handling dynamic web content and modern web applications.

  • Intelligent Content Extraction: Built-in Readability algorithm automatically extracts the main content from web pages, removing ads, navigation, and other non-essential elements.

  • Flexible Output Format: Supports both HTML and Markdown output formats, making it easy to integrate with various downstream applications.

  • Parallel Processing: The fetch_urls tool enables concurrent fetching of multiple URLs, significantly improving efficiency for batch operations.

  • Resource Optimization: Automatically blocks unnecessary resources (images, stylesheets, fonts, media) to reduce bandwidth usage and improve performance.

  • Robust Error Handling: Comprehensive error handling and logging ensure reliable operation even when dealing with problematic web pages.

  • Configurable Parameters: Fine-grained control over timeouts, content extraction, and output formatting to suit different use cases.

Quick Start

Run directly with npx:

npx -y fetcher-mcp

First time setup - install the required browser by running the following command in your terminal:

npx playwright install chromium

HTTP and SSE Transport

Use the --transport=http parameter to start both Streamable HTTP endpoint and SSE endpoint services simultaneously:

npx -y fetcher-mcp --log --transport=http --host=0.0.0.0 --port=3000

After startup, the server provides the following endpoints:

  • /mcp - Streamable HTTP endpoint (modern MCP protocol)
  • /sse - SSE endpoint (legacy MCP protocol)

Clients can choose which method to connect based on their needs.

Debug Mode

Run with the --debug option to show the browser window for debugging:

npx -y fetcher-mcp --debug

Configuration MCP

Configure this MCP server in Claude Desktop:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

在 GitHub 查看完整 README

安装

npx -y fetcher-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "fetcher": { "command": "npx", "args": ["-y", "fetcher-mcp"] } } }