
一个MCP,让你的代理能够截取网页的截图。当你希望代理在开发过程中检查进度时非常有用。
概览
一个MCP(模型上下文协议)服务器,利用Puppeteer截取网页截图。该服务器允许AI代理可视化验证网页应用,并在生成网页应用时查看进展。 - : 捕获整个网页或仅捕获视口 - : 使用CSS选择器针对特定元素 - : 支持PNG、JPEG和WebP格式 - : 设置视口大小、图像质量、等待条件和延迟 - : 返回截图为base64编码图像以便易于集成 - : 手动登录和Cookie持久化 - : 使用系统默认浏览器以获得更自然的体验 - : 保持浏览器会话开放以实现多步骤工作流程 将生成的截图-网页-mcp.dxt文件拖放到Claude Desktop中,实现自动安装! 从源码安装和构建MCP: MCP 服务器使用 TypeScript 构建并编译为 JavaScript。dist 文件夹包含已编译的 JavaScript 文件。 要将此MCP添加到Claude桌面或光标中: 1.
概述(AI 翻译)
一个MCP(模型上下文协议)服务器,利用Puppeteer截取网页截图。该服务器允许AI代理可视化验证网页应用,并在生成网页应用时查看进展。
特色
- 全页截图:截取整个网页或仅捕捉视口
- 元素截图:使用CSS选择器针对特定元素
- 多种格式:支持PNG、JPEG和WebP格式
- 可自定义选项:设置视口大小、画质、等待条件和延迟
- Base64编码:返回截图为base64编码图像,便于集成
- 认证支持:手动登录和Cookie持久化
- 默认浏览器集成:使用系统默认浏览器以获得更自然的体验
- 会话持久性:保持浏览器会话开放以支持多步工作流程
安装
快速入门(Claude桌面扩展)
将生成的screenshot-webpage-mcp.dxt文件拖放到Claude Desktop,实现自动安装!
手动安装
从源码安装和构建MCP:
MCP 服务器使用 TypeScript 构建,并编译为 JavaScript。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Webpage Screenshot MCP Server
An MCP (Model Context Protocol) server that captures screenshots of web pages using Puppeteer. This server allows AI agents to visually verify web applications and see their progress when generating web apps.
Features
- Full page screenshots: Capture entire web pages or just the viewport
- Element screenshots: Target specific elements using CSS selectors
- Multiple formats: Support for PNG, JPEG, and WebP formats
- Customizable options: Set viewport size, image quality, wait conditions, and delays
- Base64 encoding: Returns screenshots as base64 encoded images for easy integration
- Authentication support: Manual login and cookie persistence
- Default browser integration: Use your system’s default browser for a more natural experience
- Session persistence: Keep browser sessions open for multi-step workflows
Installation
Quick Start (Claude Desktop Extension)
Drag and drop the generated screenshot-webpage-mcp.dxt file into Claude Desktop for automatic installation!
Manual Installation
To install and build the MCP from source:
# Clone the repository (if you haven't already)
git clone https://github.com/ananddtyagi/webpage-screenshot-mcp.git
cd webpage-screenshot-mcp
# Install dependencies
npm install
# Build the project
npm run build
The MCP server is built using TypeScript and compiled to JavaScript. The dist folder contains the compiled JavaScript files.
Adding to Claude or Cursor
To add this MCP to Claude Desktop or Cursor:
-
Claude Desktop:
- Go to Settings > Developer
- Click “Edit Config”
- Add the following:
"webpage-screenshot": { "command": "node", "args": [ "~/path/to/webpage-screenshot-mcp/dist/index.js" ] }- Save and reload Claude
-
Cursor:
- Open Cursor and go to Cursor Settings > MCP
- Click “Add new global MCP server”
- Add the following:
"webpage-screenshot": {
"command": "node",
"args": ["~/path/to/webpage-screenshot-mcp/dist/index.js"]
}
- Save and reload Cursor
Usage
Tools
This MCP server provides several tools:
1. login-and-wait
Opens a webpage in a visible browser window for manual login, waits for user to complete login, then saves cookies.
{
"url": "https://example.com/login",
"waitMinutes": 5,
"successIndicator": ".dashboard-welcome",
"useDefaultBrowser": true
}
url(required): The URL of the login pagewaitMinutes(optional): Maximum minutes to wait for login (default: 5)successIndicator(optional): CSS selector or URL pattern that indicates successful loginuseDefaultBrowser(optional): Whether to use the system’s default browser (default: true)
2. screenshot-page
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →