
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 分