F

Fetch-浏览器

@TheSethRose/Fetch-Browser
4 Stars 1.8k 次浏览 TheSethRose 更新于 2026-08-23

一个无头浏览器MCP服务器,允许AI代理获取网页内容并进行Google搜索,且无需API密钥,支持多种输出格式,如Markdown、JSON、HTML和文本。

该服务暂未提供标准配置,请参考 README 手动接入

可用工具 (2 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

fetch_url 3 个参数 需填 1 项

Fetch content from a URL with proper error handling and response processing

必填参数:url

google_search 4 个参数 需填 1 项

Execute a Google search and return results in various formats

必填参数:query

服务介绍

Fetch Browser

一个强大的无头浏览器MCP服务器,使AI代理能够无需任何API密钥即可获取网页内容和执行Google搜索。采用现代网络标准构建,设计用于与AI平台无缝集成。

特性

  • 无需API密钥:使用先进的无头浏览器方法直接获取内容

  • 智能Google搜索

    • 从Google搜索中提取结构化结果
    • 支持网页和新闻结果
    • 可配置的结果数量(1-100)
    • 完整获取搜索结果的内容
    • 自动重试和错误处理
  • 通用内容抓取

    • 支持任意网页或API端点
    • 多种输出格式(HTML, JSON, 文本, Markdown)
    • 自动检测内容类型
    • 响应大小限制和超时保护
    • 请求速率限制保护
  • 格式转换

    • 清洁的HTML到Markdown转换
    • 美化的JSON响应
    • 结构化的HTML输出
    • 格式正确的纯文本

工具

执行Google搜索并获取结果的完整内容:

{
  query: "your search query",
  responseType: "markdown", // or "json", "html", "text"
  maxResults: 10,          // 1-100 results
  topic: "web"            // or "news"
}

2. URL抓取工具 (fetch_url)

从任意URL获取内容:

{
  url: "https://example.com",
  responseType: "markdown", // or "json", "html", "text"
  timeout: 30000          // optional, in milliseconds
}

安装

通过Smithery

# For Claude
npx -y @smithery/cli install @TheSethRose/fetch-browser --client claude

# For Cursor
npx -y @smithery/cli install @TheSethRose/fetch-browser --client cursor

# For TypeScript
npx -y @smithery/cli install @TheSethRose/fetch-browser --client typescript

手动安装

# Clone the repository
git clone https://github.com/TheSethRose/fetch-browser.git
cd fetch-browser

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm start

开发

# Watch mode with auto-rebuild
npm run watch

# Run with inspector
npm run inspector

# Debug mode
npm run debug

# Debug with watch mode
npm run debug:watch

响应格式

1. Markdown格式

## [Page Title](https://example.com)

Content converted to clean markdown with:
- Lists
- **Bold text**
- *Italic text*
- [Links](https://example.com)

2. JSON格式

{
  "url": "https://example.com",
  "content": "Extracted content...",
  "error": null
}

3. HTML格式

<div class="search-result">
  <h2><a href="https://example.com">Page Title</a></h2>
  <div class="content">
    Original HTML content
  </div>
</div>

4. 文本格式

### https://example.com

Plain text content with preserved formatting
==========

错误处理

  • 带有指数退避的自动重试
  • 请求速率限制保护
  • 超时处理
  • 详细的错误信息
  • 单个结果错误跟踪

安全特性

  • 响应大小限制
  • 请求超时
  • 请求速率限制保护
  • 不需要API密钥或秘密
  • 正确的错误处理

致谢

由Seth Rose创建

许可证

MIT许可证 - 查看LICENSE了解详情

相关 MCP 服务