这是一款快速高效的网页截图工具,专为Claude Vision API进行了优化。它能自动将完整页面分割成1072x1072的小块,以实现最佳的AI处理效果。
本工具专为AI视觉工作流程打造,能够捕获高质量的截图。它具备自动分辨率限制和切片功能,可确保截图能被Claude Vision API和其他AI模型进行最佳处理。该工具会将截图尺寸完美调整为1072x1072像素(115万像素),以实现最大兼容性。
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中安装完成后,可使用以下工具:
screenshot_website_fast - 捕获网页的高质量截图
url(必需):要捕获的HTTP/HTTPS URLwidth(可选):视口宽度(像素,最大1072,默认值:1072)height(可选):视口高度(像素,最大1072,默认值:1072)fullPage(可选):捕获全页截图(默认值:true)waitUntil(可选):等待事件:load、domcontentloaded、networkidle0、networkidle2(默认值:networkidle2)waitFor(可选):额外的等待时间(毫秒)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
- 视口宽度(最大1072,默认值:1072)-h, --height
- 视口高度(最大1072,默认值:1072)--no-full-page - 禁用全页捕获和切片--wait-until - 等待事件:load、domcontentloaded、networkidle0、networkidle2--wait-for - 额外的等待时间(毫秒)-o, --output
- 输出文件路径(切片输出时必需)mcp-screenshot-website-fast/
├── src/
│ ├── internal/ # 核心截图捕获逻辑
│ ├── utils/ # 日志记录器和实用工具
│ ├── index.ts # CLI入口点
│ └── serve.ts # MCP服务器入口点
# 以开发模式运行
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许可证。