The Webshot MCP server generates screenshots of web pages with extensive customization options:
Capture screenshots of any web page by providing a URL
Device emulation for desktop (default), mobile (iPhone 13), and tablet (iPad Pro)
Multiple image formats including PNG (default), JPEG, and WebP
Customizable dimensions with configurable width and height (default: 1280x768)
Full-page screenshots by setting height to 0
DPI scaling control with default 2x scaling for higher resolution
Image quality adjustment (0-100) for JPEG and WebP formats
File output with automatic format detection based on file extension
Asynchronous processing for optimal performance
webshot-mcp
中文文档 | English
A MCP (Model Context Protocol) server for generating web page screenshots, implemented with Playwright.
Features
🌐 Support for any web page screenshots
📱 Support for multiple device types (desktop, mobile, tablet)
🎨 Support for multiple image formats (PNG, JPEG, WebP)
📏 Support for custom dimensions and DPI scaling
🖼️ Support for full-page screenshots
🗜️ Support for image quality compression
⚡ Asynchronous processing for excellent performance
Usage
As MCP Server
Method 1: Run directly with uvx (Recommended)
Method 2: Use with Claude Code
Claude Code can be configured to use this MCP server in two ways:
Option A: Using the CLI wizard
Then follow the prompts to add webshot-mcp.
Option B: Direct config file editing (Recommended)
Edit your Claude Code configuration file (~/.claude.json
) and add:
After editing the config file, restart Claude Code to apply the changes.
Method 3: Install with pip and run
Then add to your MCP client configuration:
For Claude Desktop (
For Claude Code (
Tool Parameters
The webshot
tool supports the following parameters:
Required Parameters
url
(string): URL of the web page to screenshotoutput
(string): Path to save the screenshot file
Optional Parameters
width
(integer): Browser window width, default 1280height
(integer): Browser window height, default 768. Set to 0 for full-page screenshotdpi_scale
(number): DPI scaling ratio, default 2device
(string): Device type, options:desktop
(default): Desktop devicemobile
: Mobile device (iPhone 13)tablet
: Tablet device (iPad Pro)
format
(string): Image format, options:png
(default): PNG formatjpeg
: JPEG formatwebp
: WebP format
quality
(integer): Image quality (0-100), default 100. Only effective for JPEG and WebP formats
Usage Examples
Basic Screenshot
Full-page Screenshot
Mobile Device Screenshot
High-quality JPEG Screenshot
Custom Size Screenshot
Development
Run Tests
Code Structure
Tech Stack
MCP: Model Context Protocol framework
Playwright: Browser automation and screenshots
Pillow: Image processing and compression
asyncio: Asynchronous programming support
Publishing
Build and Publish to PyPI
License
MIT License
Contributing
Issues and Pull Requests are welcome!
Changelog
v0.1.0
Initial release
Support for basic web page screenshot functionality
Support for multiple device types and image formats
Support for image quality compression and size adjustment
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Enables taking screenshots of web pages with support for multiple devices (desktop, mobile, tablet), custom dimensions, full-page capture, and various image formats. Built with Playwright for reliable web page rendering and screenshot generation.