快速、高效的网页截图工具——针对CLI编码工具进行了优化。自动将整个页面分割成1072x1072像素的块以进行最佳处理。
<a href="https://glama.ai/mcp/servers/@just-every/mcp-screenshot-website-fast"> <img width="380" height="200" src="https://gips3.baidu.com/it/u=1493608589,2182276370&fm=3081&app=3081&f=PNG?w=760&h=400" alt="快速网页截图MCP服务器" /> </a>此工具专门用于AI视觉工作流程,能够捕获高质量的屏幕截图,并通过自动分辨率限制和分块来优化Claude Vision API和其他AI模型的处理。它确保屏幕截图尺寸为1072x1072像素(1.15兆像素),以实现最大兼容性。
claude mcp add screenshot-website-fast -s user -- npx -y @just-every/mcp-screenshot-website-fast
code --add-mcp '{"name":"screenshot-website-fast","command":"npx","args":["-y","@just-every/mcp-screenshot-website-fast"]}'
cursor://anysphere.cursor-deeplink/mcp/install?name=screenshot-website-fast&config=eyJzY3JlZW5zaG90LXdlYnNpdGUtZmFzdCI6eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBqdXN0LWV2ZXJ5L21jcC1zY3JlZW5zaG90LXdlYnNpdGUtZmFzdCJdfX0=
设置 → 工具 → AI助手 → 模型上下文协议(MCP)→ 添加
选择“作为JSON”并粘贴:
{"command":"npx","args":["-y","@just-every/mcp-screenshot-website-fast"]}
{
"mcpServers": {
"screenshot-website-fast": {
"command": "npx",
"args": ["-y", "@just-every/mcp-screenshot-website-fast"]
}
}
}
将此内容放入您的客户端mcp.json中(例如.vscode/mcp.json,~/.cursor/mcp.json,或Claude的.mcp.json)。
一旦在IDE中安装,以下工具可用:
take_screenshot - 捕捉网页的高质量截图
url(必需):要捕获的HTTP/HTTPS URLwidth(可选):视口宽度(最大1072,默认:1072)height(可选):视口高度(最大1072,默认:1072)fullPage(可选):是否捕捉整个页面的截图并分块(默认:true)waitUntil(可选):等待事件:load, domcontentloaded, networkidle0, networkidle2(默认:domcontentloaded)waitFor(可选):额外等待时间(毫秒)directory(可选):保存截图的目录 - 返回文件路径而不是base64图像默认使用(返回base64图像):
take_screenshot(url="https://example.com")
保存到目录(返回文件路径):
take_screenshot(url="https://example.com", directory="/path/to/screenshots")
当使用directory参数时:
捕捉一系列截图以创建录屏。仅捕捉视口顶部的块(1072x1072)。
url(必需):要捕获的URLduration(可选):总持续时间(秒,默认:10)interval(可选):截图间隔(秒,默认:2)jsEvaluate(可选):开始时执行的JavaScript代码waitUntil(可选):等待策略:'load', 'domcontentloaded', 'networkidle0', 'networkidle2'waitForMS(可选):开始前的额外等待时间(毫秒)directory(可选):保存为动画WebP到目录(每秒捕获一次)基本录屏(10秒内5帧):
take_screencast(url="https://example.com")
自定义时间:
take_screencast(url="https://example.com", duration=15, interval=3)
带有JavaScript执行:
take_screencast(
url="https://example.com",
jsEvaluate="document.body.style.backgroundColor = 'red';"
)
保存为动画WebP:
take_screencast(url="https://example.com", directory="/path/to/output")
当使用directory参数时:
npm install
npm run build
# 完整页面与自动分块(默认)
npm run dev capture https://example.com -o screenshot.png
# 视口截图
npm run dev capture https://example.com --no-full-page -o screenshot.png
# 等待特定条件
npm run dev capture https://example.com --wait-until networkidle0 --wait-for 2000 -o screenshot.png
-w, --width <pixels> - 视口宽度(最大1072,默认:1072)-h, --height <pixels> - 视口高度(最大1072,默认:1072)--no-full-page - 禁用完整页面捕捉和分块--wait-until <event> - 等待事件:load, domcontentloaded, networkidle0, networkidle2--wait-for <ms> - 额外等待时间(毫秒)-o, --output <path> - 输出文件路径(对于分块输出是必需的)MCP服务器默认包含自动重启功能以提高可靠性:
无需自动重启的开发/调试:
# 直接运行而不使用重启包装器
npm run serve:dev
mcp-screenshot-website-fast/
├── src/
│ ├── internal/ # 核心截图捕捉逻辑
│ ├── utils/ # 日志记录和实用工具
│ ├── index.ts # CLI入口点
│ ├── serve.ts # MCP服务器入口点
│ └── serve-restart.ts # 自动重启包装器
# 在开发模式下运行
npm run dev capture https://example.com -o screenshot.png
# 为生产构建
npm run build
# 运行测试
npm test
# 类型检查
npm run typecheck
# 代码检查
npm run lint
专门为AI视觉工作流程设计:
欢迎贡献!请:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true并提供自定义可执行文件--wait-for标志增加等待时间--wait-until策略MIT