Save the system clipboard image to a PNG or JPG file for AI agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
mcp-name: io.github.ulebule/clipgrab
An MCP server that saves the image currently on the system clipboard to a file (PNG or JPG).
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.txt): Pillow, mcp[cli]wl-clipboard (wl-paste) or xclip for the clipboard fallback.Run directly with uv (no install step):
Or install with pip:
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.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:
F5 to launch the Extension
Development Host.ClipGrab MCP server and its
save_clipboard_image tool are available.Package a .vsix for sharing:
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").
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.
ImageGrab.grabclipboard() (Windows /
macOS, and Linux with a recent Pillow). On Linux it falls back to wl-paste /
xclip.MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/clipgrab)<a href="https://allmcps.com/mcp/clipgrab"><img src="https://allmcps.com/api/badge/clipgrab?style=directory" alt="ClipGrab on AllMCPs" /></a>