ClipGrab

io.github.ulebulePublished by GitHub account ulebulev0.1.0Updated Oct 24, 2026

Save the system clipboard image to a PNG or JPG file for AI agents.

VerifiedSTDIODesktop onlyFiles & Storage

Overview

AI-generated overview

Saves the image currently on the system clipboard to a PNG or JPG file and returns its path so an assistant can open it.

What you can do
ClipGrab exposes two tools: save_clipboard_image, which writes the clipboard image to disk and returns the absolute path, and clipboard_has_image, which reports whether an image is present. The save tool accepts an optional directory, filename and image format (png by default, or jpg). By default the file goes to the current working directory with a timestamped name.
When to use it
Useful when an assistant can read image files but cannot see the clipboard, for example to turn a screenshot you just copied into a file the agent can open. It is a small single-purpose bridge rather than a general image tool.
Requirements
Local process over stdio, desktop only. Python 3.10+ with Pillow and mcp[cli]; run with uvx clipgrab-mcp or pip install clipgrab-mcp. On Linux, wl-clipboard (wl-paste) or xclip is needed for the clipboard fallback. No accounts, keys or headers are declared; the optional CLIPGRAB_DEFAULT_DIR environment variable sets the default output directory.
Before you install
It reads the system clipboard, which may hold sensitive content, and writes image files to disk, by default into the agent's current working directory; the directory is created if missing. Point the directory or CLIPGRAB_DEFAULT_DIR somewhere you are comfortable with, and be aware that anything on the clipboard at call time is captured.

Installation

In SourceWeft

  1. Open ClipGrab in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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) or xclip for the clipboard fallback.

Install from PyPI

Run directly with uv (no install step):

bash
uvx clipgrab-mcp

Or install with pip:

bash
pip install clipgrab-mcpclipgrab-mcp

Setup from source

bash
python3 -m venv .venv./.venv/bin/pip install -r requirements.txt

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 the CLIPGRAB_DEFAULT_DIR environment variable.
    • filename — defaults to a timestamped name (clipboard-YYYYMMDD-HHMMSS).
    • image_format — "png" (default) or "jpg".
  • clipboard_has_image() → returns true/false.

Run manually (stdio)

bash
./.venv/bin/python mcp_server.py

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:

  1. Open this folder in VS Code and press F5 to launch the Extension Development Host.
  2. In that window, open Chat (agent mode); the ClipGrab MCP server and its save_clipboard_image tool are available.

Package a .vsix for sharing:

bash
npm install -g @vscode/vscevsce package

VS Code configuration (without the extension)

A ready-to-use config lives in .vscode/mcp.json:

jsonc
{  "servers": {    "clipgrab": {      "command": "/absolute/path/to/.venv/bin/python",      "args": ["/absolute/path/to/mcp_server.py"],      "cwd": "${workspaceFolder}"    }  }}

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:

jsonc
{  "servers": {    "clipgrab": {      "command": "uvx",      "args": ["clipgrab-mcp"]    }  }}

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 to wl-paste / xclip.

License

MIT

Source: README.md at commit ff6b8e0

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts