Token导航 LogoToken导航TokenDH.com
Playwright Scraper MCP服务 logo
浏览器工具stdio官方级别未说明来源级核验

Playwright Scraper MCP服务

MCP Server

一个基于Playwright和BeautifulSoup的MCP服务器,用于抓取网页内容并将其转换为Markdown格式。

工具数

1

提示词数

0

GitHub Stars

11

资源数

0
浏览器自动化Markdown转换PythonClaude数据提取Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

dennisgl

提供方

dennisgl

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install mcp-playwright-scraper

详细介绍

mcp剧作家scraper

一种模型上下文协议(MCP)服务器,可以抓取web内容并将其转换为Markdown。

概述

此MCP服务器提供了一个简单的工具,用于抓取网络内容并将其转换为Markdown格式。它使用:

  • 剧作家:用于无头浏览器自动化,以处理包括JavaScript密集型网站在内的现代网页
  • 美丽汤:用于HTML解析和清理
  • 皮潘多克:用于高质量的HTML到Markdown转换

工具

服务器实现了一个工具:

  • scrape_to_markdown:从URL中抓取内容并将其转换为Markdown

- 必需参数: url (string)-要抓取的URL - 可选参数: verify_ssl (boolean)-是否验证SSL证书(默认值:true)

安装

使用紫外线(推荐)

使用时 uv 不需要特定的安装。我们将 使用 uvx 直接运行 *mcp剧作家scraper*.

使用PIP

或者,您可以安装 mcp-playwright-scraper 通过pip:

pip install mcp-playwright-scraper

安装后,您可以使用以下命令将其作为脚本运行:

python -m mcp_playwright_scraper

先决条件

  • Python 3.11或更高版本
  • Playwright浏览器依赖关系
  • Pandoc(可选,如果可能的话,将由pypandoc自动安装)

安装后,您需要安装Playwright浏览器依赖项:

playwright install --with-deps chromium

配置

使用Claude Desktop

将此添加到您的 claude_desktop_config.json:

Using uvx

"mcpServers": {
  "mcp-playwright-scraper": {
    "command": "uvx",
    "args": ["mcp-playwright-scraper"]
  }
}

Using pip installation

"mcpServers": {
  "mcp-playwright-scraper": {
    "command": "python",
    "args": ["-m", "mcp_playwright_scraper"]
  }
}

使用Claude代码

# Basic syntax
$ claude mcp add mcp-playwright-scraper -- uvx mcp-playwright-scraper

# Alternatively, with pip installation
$ claude mcp add mcp-playwright-scraper -- python -m mcp_playwright_scraper

Development/Unpublished Servers Configuration

"mcpServers": {
  "mcp-playwright-scraper": {
    "command": "uv",
    "args": [
      "--directory",
      "/path/to/mcp-playwright-scraper",
      "run",
      "mcp-playwright-scraper"
    ]
  }
}

使用方法 泽德

添加到您的Zed settings.json:

Using uvx

"context_servers": [
  "mcp-playwright-scraper": {
    "command": {
      "path": "uvx",
      "args": ["mcp-playwright-scraper"]
    }
  }
],

Using pip installation

"context_servers": {
  "mcp-playwright-scraper": {
    "command": "python",
    "args": ["-m", "mcp_playwright_scraper"]
  }
},

使用游标

  1. 打开光标设置

- 导航到光标设置>功能>MCP - 点击“+添加新MCP服务器”按钮

  1. 配置服务器

- 姓名: mcp-playwright-scraper - 类型:选择 stdio - 命令:输入以下命令之一:

Using uvx

uvx mcp-playwright-scraper

Using pip installation

python -m mcp_playwright_scraper

用法

在Claude Desktop中配置后,您可以显式地使用scraper并显示如下提示:

Use the mcp-playwright-scraper to scrape the content from https://example.com and summarize it.

调试

您可以使用MCP检查器调试服务器:

npx @modelcontextprotocol/inspector uvx mcp-playwright-scraper

或者,如果您已将软件包安装在特定目录中或正在其上开发:

cd path/to/mcp-playwright-scraper
npx @modelcontextprotocol/inspector uv run mcp-playwright-scraper

启动后,检查器将显示一个URL,您可以在浏览器中访问该URL以开始调试。

发展

建筑与出版

准备分发包裹:

  1. 同步依赖关系并更新锁文件:
uv sync
  1. 构建包分发:
uv build

这将在 dist/ 目录。

  1. 发布到PyPI:
uv publish

注意:您需要通过环境变量或命令标志设置PyPI凭据:

  • 令牌: --tokenUV_PUBLISH_TOKEN
  • 或用户名/密码: --username/UV_PUBLISH_USERNAME--password/UV_PUBLISH_PASSWORD

许可证

此MCP服务器根据Apache许可证2.0版获得许可。您可以根据Apache许可证2.0的条款和条件自由使用、修改和分发软件。有关更多详细信息,请参阅项目存储库中的LICENSE文件或访问http://www.apache.org/licenses/LICENSE-2.0.

目录标签

目录标签

浏览器自动化Markdown转换PythonClaude数据提取网页抓取本地部署

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP