
ClipGrab
io.github.ulebule由 GitHub 帳號 ulebule 發布v0.1.0更新於 Oct 24, 2026
Save the system clipboard image to a PNG or JPG file for AI agents.
概覽
把系統剪貼簿中的圖片儲存為 PNG 或 JPG 檔案並回傳路徑,讓助理可以開啟。
- 可以做什麼
- ClipGrab 提供兩個工具:save_clipboard_image 會把剪貼簿圖片寫入磁碟並回傳絕對路徑,clipboard_has_image 則用來判斷剪貼簿中是否有圖片。儲存工具可選擇傳入目錄、檔名與圖片格式(預設 png,也可選 jpg)。預設會存到目前工作目錄,檔名帶有時間戳記。
- 適用情境
- 適合助理能讀取圖片檔案、卻無法存取系統剪貼簿的情境,例如把你剛複製的螢幕截圖變成助理可以開啟的檔案。它是一個單一用途的小工具,而非通用的影像處理工具。
- 執行需求
- 以 stdio 方式在本機執行的程序,僅支援桌面端。需要 Python 3.10+ 以及 Pillow 和 mcp[cli],可用 uvx clipgrab-mcp 或 pip install clipgrab-mcp 執行。Linux 上還需要 wl-clipboard(wl-paste)或 xclip 作為剪貼簿備援。未宣告帳號、金鑰或標頭;選用環境變數 CLIPGRAB_DEFAULT_DIR 可設定預設輸出目錄。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ClipGrab,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ClipGrab
mcp-name: io.github.ulebule/clipgrab
An MCP server that saves the image currently on the system clipboard to a file (PNG or JPG).
Why
Many AI agents can read image files but cannot access the system clipboard. ClipGrab bridges that gap: copy an image (e.g. a screenshot), call the tool, and get back a path to a saved image on disk that the agent can open.
By default the image is saved to the current working directory — the folder the agent runs from.
Requirements
- Python 3.10+
- Python packages (see
requirements.txt):Pillow,mcp[cli] - Linux only:
wl-clipboard(wl-paste) orxclipfor the clipboard fallback.
Install from PyPI
Run directly with uv (no install step):
Or install with pip:
Setup from source
Tools
save_clipboard_image(directory?, filename?, image_format?)→ saves the clipboard image and returns the absolute path.directory— defaults to the current working directory (created if missing). Can also be set via theCLIPGRAB_DEFAULT_DIRenvironment variable.filename— defaults to a timestamped name (clipboard-YYYYMMDD-HHMMSS).image_format—"png"(default) or"jpg".
clipboard_has_image()→ returnstrue/false.
Run manually (stdio)
Install as a VS Code extension
ClipGrab ships as a VS Code extension that registers the MCP server
automatically — it then appears under Extensions view → MCP Servers and
starts on demand. On first use the extension creates its own Python virtual
environment and installs the dependencies, so you only need Python 3.10+ on your
PATH (configurable via the clipgrab.pythonPath setting).
Develop / try it:
- Open this folder in VS Code and press
F5to launch the Extension Development Host. - In that window, open Chat (agent mode); the
ClipGrabMCP server and itssave_clipboard_imagetool are available.
Package a .vsix for sharing:
VS Code configuration (without the extension)
A ready-to-use config lives in .vscode/mcp.json:
Then open .vscode/mcp.json and start the clipgrab server (or use the Command
Palette → "MCP: List Servers").
Use with an MCP client
Point any MCP client at the published PyPI package over stdio:
ClipGrab is described for registries by server.json and is
published to the official MCP registry
under the name io.github.ulebule/clipgrab.
Technical notes
- Cross-platform image grab: Pillow
ImageGrab.grabclipboard()(Windows / macOS, and Linux with a recent Pillow). On Linux it falls back towl-paste/xclip.
License
MIT
來源:README.md,提交 ff6b8e0
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分