Back to MCP directory
publicPublicdnsLocal runtime

sethbang_mcp-screenshot-server

一个基于Puppeteer的MCP服务器实现,提供网页和本地HTML文件的截图功能。

article

README

🚀 MCP 截图服务器

MCP 截图服务器基于 MCP 实现,借助 Puppeteer 捕获网页截图。通过简单的 MCP 工具接口,它能为网页和本地 HTML 文件提供截图功能,满足多样化的截图需求。

✨ 主要特性

  • 🔍 可捕捉任何网页或本地 HTML 文件的截图。
  • 📏 支持可配置的视口宽度和高度。
  • 📄 支持全页面截图。
  • 💾 提供自定义输出路径选项。
  • 🗂️ 能自动管理截图目录。

📦 安装指南

npm install

💻 使用示例

基础用法

服务器提供了一个 take_screenshot 工具,支持以下选项:

{
  url: string;         // 要捕捉的URL(可以是http://, https://或file:///)
  width?: number;      // 视口宽度,单位为像素(1-3840)
  height?: number;     // 视口高度,单位为像素(1-2160)
  fullPage?: boolean;  // 捕捉完整的可滚动页面
  outputPath?: string; // 自定义输出路径(可选)
}

🚧 开发

# 构建项目
npm run build

# 运行MCP检查器进行测试
npm run inspector

📄 许可证

本项目采用 MIT 协议。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client