screenshot-mcp
screenshot-mcp
一个 MCP 服务器,用于捕获全屏截图并以内联(base64)或保存为文件的形式返回。支持 macOS、原生 Linux(X11 和 Wayland)、原生 Windows 以及 WSL2。
工具
list_monitors
列出所有已连接的显示器及其索引、分辨率和主显示器状态。请先调用此工具以查找显示器索引。
take_screenshot
捕获单个显示器的截图。
参数 | 类型 | 默认值 | 描述 | |
| integer |
| 来自 | |
|
|
|
|
|
| string | 临时文件 | 输出路径。仅在 |
提示: 超高分辨率显示器(4K、5K)会产生巨大的 base64 数据块。如果遇到上下文限制,请切换到
return="path"并使用Read工具查看文件。
Related MCP server: GetScreen MCP Server
安装
git clone https://github.com/you/screenshot-mcp
cd screenshot-mcp
npm install
npm run build平台要求
平台 | 要求 |
macOS | 无需额外配置 — 使用 |
原生 Linux / X11 |
|
原生 Linux / Wayland |
|
原生 Windows | 无需额外配置 — 使用 PowerShell + |
WSL2 | 无需额外配置 — 在 Windows 端调用 |
在 Claude Code 中配置
claude mcp add screenshot node /absolute/path/to/screenshot-mcp/dist/index.js在 Claude Desktop 中配置
添加到 claude_desktop_config.json:
{
"mcpServers": {
"screenshot": {
"command": "node",
"args": ["/absolute/path/to/screenshot-mcp/dist/index.js"]
}
}
}WSL2 的工作原理
WSL2 无法直接访问 Windows 显示器。此服务器会检测 WSL(通过 /proc/version 或 WSL_DISTRO_NAME),并调用 Windows 端的 powershell.exe,使用 System.Windows.Forms.Screen 和 System.Drawing 运行捕获脚本。PNG 文件通过 \wsl.localhost... UNC 路径写入 Linux /tmp 文件系统,然后被读取。
This server cannot be deployed
Maintenance
Related MCP Connectors
Capture website screenshots, run bulk captures, and manage screenshot schedules and history.
1Screenshot any URL/HTML as PNG/JPEG/WebP, or read it as clean Markdown/text for LLMs.
Pixel-perfect webpage screenshots rendered in a real browser, full-page or viewport, via one POST.
Clean PNG/JPEG screenshots via REST or MCP, with goal-driven multi-step navigation.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceCaptures screenshots and saves them to file paths specified by client applications, primarily designed to facilitate screenshot analysis by AI assistants running in WSL environments.1-
- AlicenseNot gradedqualityDmaintenanceEnables capturing screenshots of all connected monitors with automatic JPEG compression and multi-platform support including WSL environments. Supports quality adjustment and image resizing through simple natural language commands.1 npmISC
- AlicenseNot gradedqualityCmaintenanceEnterprise-grade screenshot capture server for AI agents with multi-format support, PII masking, multi-monitor support, and security controls for capturing full screens, specific windows, or custom regions across Linux, macOS, and Windows.114 npm2MIT
- AlicenseBqualityFmaintenanceEnables AI assistants running in WSL to capture Windows screenshots of full desktops, specific monitors, or individual windows by title or process name. It features DPI awareness, automatic path conversion between WSL and Windows, and customizable storage options.13MIT