mcp-snapshot
MCP server from liliang-cn/mcp-snapshot-server
claude mcp add --transport stdio liliang-cn-mcp-snapshot-server /path/to/mcp-snapshot-server/bin/mcp-snapshot-server-linux-amd64 -port 5123 -dir .snapshots \ --env CHROME_BIN="Path to Chrome/Chromium executable (optional, use if Chrome is not in your PATH)"
How to use
The MCP Snapshot Server exposes a specialized toolset that lets AI agents capture screenshots of web pages using a headless Chrome browser. The core capability is take_snapshot, which directs the server to navigate to a URL, optionally emulate devices (mobile, tablet, or PC), adjust viewport size, apply a delay, and perform a sequence of interactions before taking a screenshot. Interactions support common web UI actions such as typing text, clicking elements, waiting for selectors, scrolling, hovering, pressing keys, and even executing custom JavaScript. The server also serves the resulting images via a built-in HTTP server, providing direct URLs to saved snapshots, and can emulate different device form factors for responsive testing. The combination of full page or viewport-specific captures and console log capture helps surface rendering issues and JavaScript errors in automated workflows. This makes it suitable for automated UI testing, site previews, and programmatic visual verification as part of Claude Code Skills workflows.
How to install
Prerequisites:
- Go 1.23+ installed on your system
- Chrome/Chromium installed (or accessible via CHROME_BIN)
Installation steps:
-
Clone the repository or download the prebuilt binary for your platform.
-
Ensure the Go toolchain can build and fetch dependencies:
go mod tidy
-
Build the binary (example from the repo):
make all
-
Start the server with the desired port and snapshot directory. Example (adjust paths as needed):
/path/to/mcp-snapshot-server/bin/mcp-snapshot-server-linux-amd64 -port 5123 -dir .snapshots
-
Update your MCP configuration to point to the started binary (see the sample in the README).
Additional notes
Tips and notes:
- If Chrome/Chromium is not on your PATH, set CHROME_BIN to the full path of the browser binary (e.g., CHROME_BIN=/usr/bin/chromium-browser) before launching.
- The -port argument is resilient: if the requested port is in use, the server automatically selects the next available port.
- The -dir option controls where screenshots are saved; ensure the process has write permissions to that directory.
- The tool take_snapshot supports a sequence of interactions (steps) to automate login, form submissions, or navigation before capturing a screenshot. Each step can specify a CSS selector and a value or a JavaScript snippet (for action: js).
- Device emulation is supported via the mobile, device, width, and height parameters to tailor the viewport for mobile, tablet, or PC captures.
- The server can emit browser console logs (stdout/stderr/errors) alongside the captured image for debugging.
- If you plan to run this in Claude Code Skills workflows, you can reference the take_snapshot tool in your SKILL.md definitions to automate browser-based tasks.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go