
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 分