snapmcp
Auto-detects the local Alacritty terminal theme so that terminal captures reproduce the user's real prompt and ANSI colors instead of a generic dark rectangle.
Auto-detects the GNOME Terminal color theme, letting terminal captures render with the user's actual GNOME terminal colors and highlighting.
Auto-detects the WezTerm color scheme so terminal captures match the real colors a reader would see in WezTerm.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@snapmcpCapture a terminal screenshot ofgit log --oneline -5and a syntax-highlighted PNG ofsrc/index.ts."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Real terminal colors, Shiki-highlighted code, visual diffs, PDFs and GIFs — one MCP server, 13 tools. Renders with your system Chrome, or auto-installs Chromium at first setup. SSRF protection on by default. Built for agents that write documentation, not just drive browsers.
Quick Start
Three steps, under two minutes:
1. Install
npm install -g snapmcp
# or run without installing: npx -y snapmcp2. Add to Claude Code (~/.claude/claude.json)
{
"mcpServers": {
"snapmcp": {
"command": "npx",
"args": ["-y", "snapmcp"],
"env": {
"SNAPMCP_DIR": "./captures",
"SNAPMCP_THEME": "nord"
}
}
}
}3. Capture
Ask your agent in natural language:
"Capture a terminal screenshot of
git log --oneline -5and a syntax-highlighted PNG ofsrc/index.ts."
The agent calls capture_terminal and capture_file — images land in ./captures/ with your real terminal theme and the chosen syntax theme applied.
OpenCode (opencode.json):
{
"mcpServers": {
"snapmcp": {
"command": "npx",
"args": ["-y", "snapmcp"],
"env": {
"SNAPMCP_DIR": "./captures",
"SNAPMCP_FORMAT": "jpeg",
"SNAPMCP_QUALITY": "95"
}
}
}
}VS Code / Cline / Roo-Cline (settings.json → cline.mcpServers):
{
"mcpServers": {
"snapmcp": {
"command": "npx",
"args": ["-y", "snapmcp"],
"env": {
"SNAPMCP_DIR": "./captures",
"SNAPMCP_FORMAT": "jpeg"
}
}
}
}Docker:
docker run -i --rm \
-e SNAPMCP_DIR=/captures \
-e SNAPMCP_THEME=nord \
-v /path/to/output:/captures \
ghcr.io/reeinharddd/snapmcpRelated MCP server: aifmt
What it looks like
Capture | Preview |
Terminal (real detected colors) | |
Code (Shiki syntax) | |
Diff (green/red) |
Why snapmcp vs Playwright MCP
Different tools for different jobs. Playwright MCP drives a browser through token-efficient accessibility snapshots; snapmcp renders pixel-faithful images for humans to read. If your agent needs to click, use Playwright. If it needs to show, use snapmcp.
Use case | snapmcp | Playwright MCP |
Terminal capture with real colors | ✅ auto-detects Kitty, Gnome, Alacritty, WezTerm themes | ❌ no terminal support |
Code → syntax-highlighted image | ✅ Shiki, 50+ languages, 27 themes | ❌ not its purpose |
Git diff → visual red/green image | ✅ | ❌ |
URL → PDF document | ✅ | ❌ |
Animated GIF from captures | ✅ | ❌ |
Markdown → styled document | ✅ | ❌ |
Browser page screenshot | ✅ | ✅ |
Browser automation (click, fill, navigate) | ❌ screenshots only | ✅ accessibility-tree driven, token-efficient — the right tool for this |
Most documentation pipelines pair them: Playwright MCP to interact, snapmcp to document.
Tools
Tool | Description |
| Terminal output with syntax-colored prompts (auto-detects real terminal theme) |
| Syntax-highlighted code via Shiki (50+ languages, 27 themes) |
| Full-page or viewport screenshots (uses system Chrome profile when available) |
| File → auto-detected language → highlighted screenshot |
| Rendered markdown as a styled document |
| Arbitrary HTML snippet rendered as image |
| Git diffs with green additions / red deletions |
| URL → PDF document |
| Batch capture multiple items in one call |
| Animated GIF from multiple screenshots |
| Side-by-side animated sequence |
| Multi-section markdown document render |
| Server capability hints for MCP clients |
Use cases
Automated documentation — an agent writes a setup guide and embeds real captures: the terminal output of the install command (with your actual theme), the config file syntax-highlighted, the diff of the migration. One prompt, three capture_* calls, images saved next to the markdown.
Visual QA — after a UI change, the agent captures the affected pages with capture_browser, batches before/after with capture_batch, and assembles an animated comparison with capture_gif for the PR description.
Terminal guides — CLI tutorials where the screenshots must match what readers will see: capture_terminal reproduces the real prompt colors instead of a generic dark rectangle.
Security
SSRF protection is on by default — no opt-in required.
Feature | Description |
SSRF Protection | On by default (disable with |
File Allowlist |
|
Path Traversal | Prevents |
Input Limits | Terminal 1000 lines; code/markdown/HTML 200KB; diff 500KB; file reads 5MB; max GIF frames 60; max GIF canvas 8192×8192 |
Audit Log | Optional structured JSON log file with timestamped events |
Chromium Sandbox | Sandbox availability checked at startup |
Configuration
Environment variables for the MCP server:
Variable | Default | Description |
|
| Output directory for captures |
| auto-detected | Syntax theme (27 built-in themes + auto-detected terminal) |
|
| Output format ( |
|
| JPEG quality (1-100) |
|
| Content padding in pixels |
|
| Drop shadow ( |
|
| macOS-style title bar frame |
|
| Window corner radius |
|
| Footer badge |
| — | Audit log file path |
| — | Path to Chrome/Chromium binary |
| — | Chrome channel ( |
| — | Chrome profile directory name |
| (deny-all) | Comma- or semicolon-separated allowed file paths for |
27 built-in Shiki themes: dracula, one-dark-pro, nord, tokyo-night, catppuccin-mocha, catppuccin-latte, ayu-dark, ayu-light, vitesse-dark, vitesse-light, min-dark, min-light, poimandres, rose-pine, rose-pine-moon, rose-pine-dawn, slack-dark, slack-ochin, snazzy-light, github-dark-dimmed, github-light, one-light, solarized-light, solarized-dark, material-theme, material-theme-lighter, material-theme-ocean
CLI
SnapMCP ships with a full CLI beyond the MCP server:
snapmcp — Start the MCP server
snapmcp init — Interactive setup wizard (detects Chrome, terminal theme, output dir)
snapmcp doctor — Health check: 7 checks across Node, Chromium, paths, env
snapmcp test — Generate test captures (terminal + code) to verify the setupDocumentation
Page | Contents |
Installation, quick start, MCP client setup | |
All 13 tools with parameters and examples | |
All SNAPMCP_* env vars, themes, defaults | |
Init, doctor, test commands | |
Terminal capture, browser capture, GIF animation | |
Module map, data flow, security architecture | |
Dev workflow, testing guidelines, PR checklist |
Development
git clone https://github.com/reeinharddd/snapmcp
cd snapmcp
bun install
bun run build # tsc → dist/
bun test # 317 testsRequirements: Node.js ≥ 20 or Bun ≥ 1.2. CI runs on ubuntu / macOS / windows via GitHub Actions.
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for agentverse documentation, generated by doc2mcp.
MCP server for visual regression testing: triage a PR's UI diffs from your coding agent.
MCP server for developer documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseBqualityBmaintenanceA collection of MCP servers distributed as a single npm package, including mcp-visualizer which uses Puppeteer for screenshots, typing, and network/console diagnostics on any web framework.3150 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that fixes, validates, and generates visual text content for AI coding assistants.MIT
- AlicenseBqualityBmaintenanceMCP server providing 26 visual tools for text-only LLMs, enabling description, coordinate location, OCR, annotation, cropping/zooming, anomaly scanning, and computer control with switchable VLM backends.2710MIT
- FlicenseAqualityCmaintenanceAn MCP server for image understanding via OpenAI-compatible vision models, offering tools for OCR, error screenshot diagnosis, technical diagram reading, data visualization analysis, UI-to-code conversion, and UI diff comparison.7-