SM

screenshotone/mcp

浏览器自动化

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

38 stars 11 forks 质量 81 趋势 20MIT

ScreenshotOne API 的 MCP 服务器的 CLI 版本

概览

ScreenshotOne 的官方实现了 MCP(模型上下文协议)服务器。 关于它为何被建造,以及对MCP未来的一些想法。 - render-website-screenshot:渲染网站截图并返回为图片。 一定要先安装依赖并构建: 在ScreenshotOne注册并获取你的API密钥。 将以下内容添加到您的~/Library/Application\ Support/Claude/claude_desktop_config.json: ScreenshotOne MCP 服务器采用 MIT 许可证授权。

概述(AI 翻译)

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

关于它为何被建造,以及对MCP未来的一些想法。

ScreenshotOne 还提供官方托管的 MCP 服务器。有关设置说明和最新更新,请参见 ScreenshotOne MCP 集成。

工具

  • 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 一致。

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

README

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

ScreenshotOne MCP Server

An official implementation of an MCP (Model Context Protocol) server for ScreenshotOne.

A few more words about why it was built and some thoughts about the future of MCP.

ScreenshotOne also offers an official hosted MCP server. See the ScreenshotOne MCP integration for setup instructions and the latest updates.

Tools

  • render-website-screenshot: Render a website screenshot and return temporary screenshot, content, and slice URLs as requested.
  • extract-website-markdown: Render a website and return its cleaned Markdown directly as text.
  • get-usage: Get ScreenshotOne API quota and concurrency usage.

The screenshot tool exposes these focused options:

  • url
  • block_banners (defaults to true)
  • block_ads (defaults to true)
  • image_quality (defaults to 80)
  • full_page (defaults to false)
  • full_page_slices (defaults to false; requires full_page=true)
  • metadata_content (defaults to false)
  • metadata_content_format (html or markdown; requires metadata_content=true)

The option names and values for metadata content and full-page slices match the ScreenshotOne API. The tool does not expose response-type or cache controls; it always requests a JSON response with API caching disabled.

Set metadata_content=true and metadata_content_format=markdown to receive a temporary Markdown content URL with the screenshot. Set full_page=true and full_page_slices=true to receive smaller vertical screenshot URLs. Slices are preferred when an AI agent needs to analyze a long page that may not be handled reliably as one large image.

A successful capture returns the requested URLs as text and structured content:

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

The URLs are temporary. The screenshot URL is available for up to four hours, while metadata content includes its exact expiration time. Download any artifact you need to keep.

extract-website-markdown accepts only url. It is a focused shortcut for ScreenshotOne’s format=markdown API request and returns the resulting Markdown directly in one MCP text response. Use it when the agent needs to read or analyze page content without a screenshot.

Usage

Build it

在 GitHub 查看完整 README

安装

npx --yes @screenshotone/mcp
新手?先看 mcpskill.org 教程 →

配置

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