ScreenshotOne

官方

使用ScreenshotOne渲染网站截图

你可以用 ScreenshotOne MCP 做什么?

  • 渲染网站截图 — 通过 render-website-screenshot 请求任意 URL 的截图,并提供 full_page、block_ads 和 image_quality 等选项。
  • 将页面内容提取为 Markdown — 使用 extract-website-markdown 获取任意网页的干净、可读的 Markdown 版本,以便进行分析。
  • 获取整页切片 — 请求 full_page=true 和 full_page_slices=true,以接收较小的垂直图像 URL,用于分析长页面。
  • 检查 API 使用配额 — 调用 get-usage 查看当前 ScreenshotOne API 配额和并发使用情况。

文档

ScreenshotOne MCP 服务器

这是 ScreenshotOne 的 MCP(模型上下文协议) 服务器的官方实现。

关于其构建原因以及对 MCP 未来的一些思考。

ScreenshotOne 还提供官方托管的 MCP 服务器。请参阅 ScreenshotOne MCP 集成 获取设置说明和最新更新。

ScreenshotOne Server MCP server

工具

  • render-website-screenshot:渲染网站截图,并按请求返回临时截图、内容和切片 URL。
  • extract-website-markdown:渲染网站并直接以文本形式返回其清理后的 Markdown。
  • get-usage:获取 ScreenshotOne API 配额和并发使用情况。

截图工具提供以下重点选项:

  • url
  • block_banners(默认为 true)
  • block_ads(默认为 true)
  • image_quality(默认为 80)
  • full_page(默认为 false)
  • full_page_slices(默认为 false;需要 full_page=true)
  • metadata_content(默认为 false)
  • metadata_content_format(html 或 markdown;需要 metadata_content=true)

元数据内容和整页切片的选项名称和值与 ScreenshotOne API 一致。该工具不暴露响应类型或缓存控制选项;它始终请求 JSON 响应并禁用 API 缓存。

设置 metadata_content=true 和 metadata_content_format=markdown 以接收随截图一起返回的临时 Markdown 内容 URL。设置 full_page=true 和 full_page_slices=true 以接收较小的垂直截图 URL。当 AI 代理需要分析可能无法作为单张大图可靠处理的长页面时,优先使用切片。

成功捕获后,将以文本和结构化内容的形式返回所请求的 URL:

{
    "url": "https://<screenshotone-cache-domain>/...",
    "content": {
        "url": "https://<screenshotone-cache-domain>/...",
        "expires": "Sun, 07 Sep 2026 12:00:00 GMT",
        "format": "markdown"
    },
    "slices": [
        {
            "index": 0,
            "offset_y": 0,
            "width": 1280,
            "height": 4000,
            "url": "https://<screenshotone-cache-domain>/..."
        }
    ]
}

这些 URL 是临时的。截图 URL 最长可用四小时,而元数据内容包含其精确的过期时间。请下载任何需要保留的工件。

extract-website-markdown 仅接受 url。它是 ScreenshotOne 的 format=markdown API 请求的专注快捷方式,并直接在一条 MCP 文本响应中返回生成的 Markdown。当代理需要在不截图的情况下阅读或分析页面内容时,请使用它。

使用方法

构建

始终先安装依赖并构建:

npm install && npm run build

获取您的 ScreenshotOne API 密钥

在 ScreenshotOne 注册并获取您的 API 密钥。

使用 npx 运行

直接从 npm 包运行 CLI,无需克隆仓库:

SCREENSHOTONE_API_KEY=your_api_key npx --yes @screenshotone/mcp

与 Claude for Desktop 配合使用

将以下内容添加到您的 ~/Library/Application\ Support/Claude/claude_desktop_config.json:

{
    "mcpServers": {
        "screenshotone": {
            "command": "npx",
            "args": ["--yes", "@screenshotone/mcp"],
            "env": {
                "SCREENSHOTONE_API_KEY": "<your api key>"
            }
        }
    }
}

独立运行或用于其他项目

SCREENSHOTONE_API_KEY=your_api_key node build/index.js

许可证

ScreenshotOne MCP Server 根据 MIT 许可证 授权。