SM

sethbang/mcp-screenshot-server

浏览器自动化

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

38 stars 15 forks 质量 87 趋势 20Apache-2.0

sethbang/mcp-screenshot-server 是从 https://github.com/sethbang/mcp-screenshot-server. 导入的 MCP 服务器候选

概览

sethbang/mcp-screenshot-server 是从 https://github.com/sethbang/mcp-screenshot-server. 导入的 MCP 服务器候选

概述(AI 翻译)

一台MCP(模型上下文协议)服务器,为AI助手提供截图功能——包括通过Puppeteer捕获网页和使用原生操作系统工具实现跨平台系统截图。

特色

  • 网页截图 — 使用无头Chromium浏览器捕获任意公共URL。
  • 跨平台系统截图 — 使用原生操作系统工具(macOS screencapture,Linux maim/scrot/gnome-screenshot等,Windows PowerShell+.NET)实现全屏、窗口或区域捕获
  • 安全优先设计 — SSRF防范、路径穿越保护、DNS重绑定防御、命令注入防范和DoS限制
  • MCP 原生 — 可直接集成 Claude Desktop、光标及任何兼容 MCP 的客户端

要求

  • Node.js >= 18.0.0
  • Chromium 由 Puppeteer 首次运行时自动下载

[[T4]的平台特定要求

平台 所需工具 注释
macOS screencapture(内置) 无需额外安装

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

README

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

Universal Screenshot MCP

An MCP (Model Context Protocol) server that provides AI assistants with screenshot capabilities — both web page capture via Puppeteer and cross-platform system screenshots using native OS tools.

Features

  • Web Page Screenshots — Capture any public URL using a headless Chromium browser
  • Cross-Platform System Screenshots — Fullscreen, window, or region capture using native OS tools (macOS screencapture, Linux maim/scrot/gnome-screenshot/etc., Windows PowerShell+.NET)
  • Security-First Design — SSRF prevention, path traversal protection, DNS rebinding defense, command injection prevention, and DoS limiting
  • MCP Native — Integrates directly with Claude Desktop, Cursor, and any MCP-compatible client

Requirements

  • Node.js >= 18.0.0
  • Chromium is downloaded automatically by Puppeteer on first run

Platform-Specific Requirements for take_system_screenshot

Platform Required Tools Notes
macOS screencapture (built-in) No additional installation needed
Linux One of: maim, scrot, gnome-screenshot, spectacle, grim, or import (ImageMagick) maim or scrot recommended for full feature support. For window-by-name capture, also install xdotool.
Windows powershell (built-in) Uses .NET System.Drawing — no additional installation needed

Linux Installation Examples

# Ubuntu/Debian (recommended)
sudo apt install maim xdotool

# Fedora
sudo dnf install maim xdotool

# Arch Linux
sudo pacman -S maim xdotool

# Wayland (Sway, etc.)
sudo apt install grim

After installing, you can verify your setup with:

npx universal-screenshot-mcp --doctor

This probes the host and prints copy-pasteable install commands for any missing tools, tailored to your detected distro.

Quick Start

Install from npm

npm install -g universal-screenshot-mcp

Or run directly with npx:

npx universal-screenshot-mcp

Install from Source

git clone https://github.com/sethbang/mcp-screenshot-server.git
cd mcp-screenshot-server
npm install
npm run build

Configure Your MCP Client

Add the server to your MCP client configuration. For Claude Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "screenshot-server": {
      "command": "npx",
      "args": ["-y", "universal-screenshot-mcp"]
    }
  }
}

Or if installed from source:

{
  "mcpServers": {
在 GitHub 查看完整 README

安装

npx -y universal-screenshot-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "screenshot-server": { "command": "npx", "args": ["-y", "universal-screenshot-mcp"] } } }