
Snapstack Server
io.github.bgaze由 GitHub 账号 bgaze 发布v1.2.3更新于 Oct 24, 2026
Local always-on server for SnapStack: browser capture intake + MCP over 127.0.0.1.
概览
一个常驻本地的 Node 服务,接收 SnapStack 浏览器扩展的截图,并以带编号的磁盘堆栈形式提供给 MCP 客户端使用。
- 可以做什么
- 以 JSON 清单列出待处理的浏览器截图,包含编号、绝对路径、尺寸和元数据,可按编号筛选;不返回图像字节,由客户端按路径读取文件。统计待处理截图数量而不读取内容。按编号删除指定截图,或不带编号清空整个堆栈;清空后编号从 01 重新开始。
- 适用场景
- 适合希望助手处理你通过 SnapStack 扩展在浏览器中截取的画面时使用,例如查看或描述已捕获的页面,而无需把图片上传到任何地方。
- 运行要求
- 需要 Node.js 18 或更高版本、全局安装 snapstack-server、在浏览器中加载 snapstack-extension,以及支持 127.0.0.1:4123 上 HTTP 端点或 stdio 前端的 MCP 客户端。可选环境变量 SNAPSTACK_DIR 和 SNAPSTACK_PORT 用于更改堆栈目录和端口。在 Windows 上建议使用管理员终端进行安装和注册后台服务。
安装
在 SourceWeft 中
- 打开 控制台中的 Snapstack Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[CI] [License: MIT] [Node >= 18] [MCP compatible] [100% local] [npm version] [npm downloads] [Glama score]
[SnapStack demo — capture a browser tab, your AI reads the screenshots over MCP]
The SnapStack server is a single always-on Node process: it receives browser captures from the
extension, stacks them on disk, and serves them to any
MCP-capable LLM client over Streamable HTTP. It listens only on 127.0.0.1 — nothing ever leaves your machine.
New here? The full install + usage guide lives in the extension README: snapstack-extension. This page is the technical reference.
Architecture
One always-on process serves both the extension (capture) and your MCP client, decoupled by a folder on disk.
- Capture — the extension encodes the shot as WebP (PNG fallback), downscales it, and POSTs it here.
- Stack — one image file (
.webp/.png) plus a twin.json(url, title, timestamp, dimensions) per capture, namedNN <timestamp>: a stable two-digit number (assigned in capture order, restarts at01when the stack empties) plus a timestamp, under~/.snapstack/. - Retrieval —
get_screenshotsreturns a JSON manifest (number, absolute path, dimensions, metadata — no image bytes); the client reads only the files it needs, by path. Deletion is a separate, explicitclear_screenshotsstep. Retrieval never deletes.
Requirements
- Node.js ≥ 18 (tested on Node 20). No git needed at runtime.
- An MCP-capable LLM client speaking the HTTP (Streamable HTTP) or stdio transport.
- The snapstack-extension loaded in your browser.
Install & run
On Windows, use an Administrator terminal, otherwise the global npm install and the scheduled-task registration may get rejected.
The server ships on npm and installation is straightforward on macOS, Linux and Windows:
- Install globally:
npm i -g snapstack-server - Enable background service:
snapstack enable
SnapStack auto-starts on login, restarts on crash, and updates itself on each launch.
To check its status or if an update is available, simply run snapstack in your terminal.
Available commands:
The daemon self-updates on each (re)start/login; the global CLI (the snapstack command) does not.
Run snapstack update to bring both to the latest in one go.
The full end-to-end walkthrough (idiomatic install paths, MCP client registration, the extension) is in the extension README.
MCP
SnapStack speaks two MCP transports over the same on-disk stack — pick whichever your client supports:
The HTTP /mcp endpoint is stateless (a fresh server + transport per request); the stdio front-end
(snapstack mcp) is spawned on demand and reads the same ~/.snapstack stack.
Capture intake (/push) always stays in the running server, independent of either MCP front-end.
Exposed tools
get_screenshots and count_screenshots are read-only; only clear_screenshots is destructive.
Configuration
Environment variables (infrastructure)
Capture policy (shared across your browsers)
The encoding/capture settings are owned by the server and stored in ~/.snapstack/config.json, so a single
edit applies to every browser running the extension. They are edited from the extension's options page — not
an environment variable — and fetched by the extension before each capture.
Two endpoints back it: GET /config returns the effective policy; POST /config validates and replaces it (host- +
CORS-guarded like every capture route). The file is a non-image, so a stack clear never touches it; deleting it just
restores the defaults above.
Troubleshooting
- Capture server not started message in the extension: run
snapstack start(orsnapstack runin the foreground), or check the auto-start withsnapstack. Test:curl http://127.0.0.1:4123/health. - Port already in use (
EADDRINUSE): setSNAPSTACK_PORTto another value. snapstack: command not foundafter switching Node version (nvm, fnm, volta, Laravel Herd, nvm-windows):npm i -gdrops thesnapstackcommand in the global bin of the Node version that was active at install time only, so switching versions hides it. This is how npm globals work, not a SnapStack bug — the background service is unaffected and keeps capturing; only the CLI command disappears. Fix: re-runnpm i -g snapstack-serverunder the current Node version (or switch back to the one used at install).- The client doesn't see the tools: the server must run before the MCP client starts; check the config
(
type: "http", correct URL). Direct test:curl http://127.0.0.1:4123/count. - Inspect the stack:
ls ~/.snapstack(image files + human-readable.json).
Support
- A question or an idea? → GitHub Discussions
- Found a bug? → open an issue
License
MIT — see LICENSE.
来源:README.md,提交 fa9a83e
工具
0版本历史
1- v1.2.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分