SnapStack server is a single-process, always-running Node service used together with the SnapStack browser extension to enable one-click browser tab screenshots and provide those screenshots to MCP-capable LLM clients via MCP. All data stays on the local machine—the server only listens on 127.0.0.1.
Purpose and how it works The server decouples the two ends of "screenshot capture" and "model invocation": the extension handles capture, the MCP client handles retrieval, and a disk folder connects them in between. The process serves both the extension (capture) and the MCP client you use.
Main capabilities
- Capture: the extension encodes screenshots as WebP (PNG as fallback), downsamples them, and POSTs them to this server.
- Stack: each capture generates an image file (.webp or .png) and a same-named .json companion file (containing url, title, timestamp, dimensions), named in the format "two digits + timestamp", with the two digits assigned in capture order (restarting from 01 after the stack is cleared), stored in the ~/.snapstack/ directory.
- Retrieval: get_screenshots returns a JSON manifest (number, absolute path, dimensions, metadata, without image bytes), and the client reads only the files it needs by path. Deletion is a separate explicit step, clear_screenshots. Retrieval never deletes.
Usage Requirements: Node.js ≥ 18 (tested on Node 20), no git needed at runtime; an LLM client that supports MCP and can use HTTP (Streamable HTTP) or stdio transport; the snapstack-extension extension loaded in the browser. On Windows, an administrator terminal is required, otherwise global npm installation and scheduled task registration may be denied.
Installation and commands:
- Global install: npm i -g snapstack-server
- Enable background service: snapstack enable SnapStack starts automatically at login, restarts after a crash, and self-updates on every startup. Running snapstack directly in the terminal shows status or whether an update is available. Note: the daemon self-updates on every (re)start/at login; the global CLI (snapstack command) does not. Run snapstack update to update both to the latest at once.
MCP transports SnapStack provides two MCP transports over the same disk stack, chosen according to client support:
- HTTP: the /mcp endpoint is stateless (each request creates a new server and transport).
- stdio: the frontend process (snapstack mcp) is started on demand and reads the same ~/.snapstack stack. The capture entry point (/push) always stays in the running server, independent of the two MCP frontends. get_screenshots and count_screenshots are read-only; only clear_screenshots is destructive.
Capture policy configuration Encoding/capture settings are held by the server, stored in ~/.snapstack/config.json, so a single change applies to all browsers running the extension. The configuration is edited from the extension's options page (not environment variables), and the extension fetches it before each capture. Two endpoints support this: GET /config returns the effective policy; POST /config validates and replaces that policy (protected by host and CORS like all capture routes). This file is not an image, so clearing the stack does not affect it; deleting it only restores the default settings.
Use cases Scenarios where browser tab screenshots need to be quickly handed to an MCP-capable LLM client under locally controlled, privacy-preserving conditions.
Limitations and troubleshooting
- Data is local only; the server only listens on 127.0.0.1.
- The extension shows "Capture server not started": run snapstack start (or run snapstack run in the foreground), or use snapstack to check autostart; test: curl http://127.0.0.1:4123/health。
- Port already in use (EADDRINUSE): set SNAPSTACK_PORT to a different value.
- After switching Node versions (nvm, fnm, volta, Laravel Herd, nvm-windows), snapstack: command not found appears: a global npm install places the command in the global bin of the Node version used at install time, so after switching versions it can no longer be found. This is npm's global mechanism, not a SnapStack issue—the background service is unaffected and continues collecting, only the CLI command disappears. Fix: rerun npm i -g snapstack-server under the current Node version (or switch back to the version used at install time).
- The client cannot see the tool: the server must start before the MCP client; check the configuration (type: "http", correct URL). Test directly: curl http://127.0.0.1:4123/count。
- View the stack: ls ~/.snapstack (image files + readable .json).
License: MIT, see LICENSE.