PM

pietz/mcp-web-tools

浏览器自动化

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

46 stars 2 forks 质量 55 趋势 12

该软件包提供了一个强大的MCP服务器,为LLM提供网页访问能力,超越了简单的搜索、取用和提取内容的方法。

概览

该软件包提供了一个强大的MCP服务器,为LLM提供网页访问能力,超越了简单的搜索、取用和提取内容的方法。 我创建这个包是因为大多数支持LLM网页访问的MCP服务器表现不如预期感到沮丧。我想修正的一些不足包括: - [x] 无需API密钥即可获得良好的搜索结果 - [x] 更复杂的JavaScript网站的复杂取用 - [x] 以格式良好的Markdown提取内容 - [x] 支持从PDF中提取内容 - [x] 支持加载和显示图片 - [x] 捕捉渲染后的网页截图以提供视觉上下文 - [x] 用于高级场景的使用选项,如加载原始 HTML 或者也可以设置Brave Search API密钥: 提供一个复杂性搜索API密钥,以优先处理其新鲜且引用丰富的索引: 你可以混合两个环境变量,无缝地从Perplexity切换到Brave。

概述(AI 翻译)

该软件包提供了一个强大的MCP服务器,为LLM提供网页访问能力,超越了简单的搜索、取用和提取内容的方法。

引言

我创建这个包是因为大多数支持LLM网页访问的MCP服务器表现不如预期感到沮丧。我想修正的一些不足包括:

  • [x] 无需API密钥的良好搜索结果
  • [x] 更复杂的JavaScript网站的复杂取用
  • [x] 在格式良好的Markdown中提取内容
  • [x] 支持从PDF中提取内容
  • [x] 支持加载和显示图像
  • [x] 捕捉渲染后的网页截图以提供视觉上下文
  • [x] 高级案例的使用选项,如加载原始 HTML

安装

克劳德桌面

克劳德·科德

或者也可以设置Brave Search API密钥:

提供一个复杂性搜索API密钥,以优先处理其新鲜且引用丰富的索引:

你可以混合两个环境变量,无缝地从Perplexity切换到Brave。

内部

该软件包用 Python 编写,内置强大的库和服务以提升结果。

寻找

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

README

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

MCP Web Tools

This package provides a powerful MCP server to equip LLMs with web access, going beyond naive methods of searching, fetching and extracting content.

Introduction

I created this package out of the frustration that most MCP servers enabling web access to LLMs, didn’t perform as well as I hoped. Some of these shortcomings I wanted fix, include:

  • [x] Good search results without requiring an API key
  • [x] Sophisticated fetching for more complex JavaScript sites
  • [x] Extracting content in nicely formatted Markdown
  • [x] Support for extracting content from PDFs
  • [x] Support for loading and displaying images
  • [x] Capture rendered webpage screenshots for visual context
  • [x] Usage options for advanced cases like loading raw HTML

Installation

Claude Desktop

Claude Code

claude mcp add web-tools uvx mcp-web-tools

Or to also set the Brave Search API key:

claude mcp add web-tools uvx mcp-web-tools -e BRAVE_SEARCH_API_KEY=

Provide a Perplexity Search API key to prioritize their fresh, citation-rich index:

claude mcp add web-tools uvx mcp-web-tools -e PERPLEXITY_API_KEY=

You can mix both environment variables to fall back from Perplexity to Brave seamlessly.

Internals

The package is written in Python using powerful libraries and services under the hood to improve results.

Searching

We use the Perplexity Search API when a PERPLEXITY_API_KEY is configured. It delivers ranked snippets with citations from Perplexity’s continuously refreshed index. If no Perplexity key is available, we fall back to the Brave Search API (via BRAVE_SEARCH_API_KEY), then a lightweight Google workaround, and finally DuckDuckGo. While we recommend adding at least one API key, the chained fallbacks continue working for most workloads.

Fetching

The fetching of web content is based on Zendriver, a fork of nodriver for next level webscraping and performance. It should stay undetected for most anti-bot solutions and fetch content even from complex JS-based sites.

Extracting

For web extraction, we use Trafilatura which consistently outperforms other alternatives for extracting content from HTML pages. For PDFs, we use PyMuPDF4LLM which similarly extracts content in an easy-to-read format for LLMs, with advanced layout support.

Screenshots

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →