{
  "markdown": "# ClipGrab\n\nmcp-name: io.github.ulebule/clipgrab\n\nAn **MCP server** that saves the image currently on the system clipboard to a\nfile (PNG or JPG).\n\n## Why\n\nMany AI agents can read image **files** but cannot access the system clipboard.\nClipGrab bridges that gap: copy an image (e.g. a screenshot), call the tool, and\nget back a path to a saved image on disk that the agent can open.\n\nBy default the image is saved to the **current working directory** — the folder\nthe agent runs from.\n\n## Requirements\n\n- Python 3.10+\n- Python packages (see `requirements.txt`): `Pillow`, `mcp[cli]`\n- Linux only: `wl-clipboard` (`wl-paste`) or `xclip` for the clipboard fallback.\n\n## Install from PyPI\n\nRun directly with [uv](https://docs.astral.sh/uv/) (no install step):\n\n```bash\nuvx clipgrab-mcp\n```\n\nOr install with pip:\n\n```bash\npip install clipgrab-mcp\nclipgrab-mcp\n```\n\n## Setup from source\n\n```bash\npython3 -m venv .venv\n./.venv/bin/pip install -r requirements.txt\n```\n\n## Tools\n\n- `save_clipboard_image(directory?, filename?, image_format?)` → saves the\n  clipboard image and returns the absolute path.\n  - `directory` — defaults to the current working directory (created if missing).\n    Can also be set via the `CLIPGRAB_DEFAULT_DIR` environment variable.\n  - `filename` — defaults to a timestamped name (`clipboard-YYYYMMDD-HHMMSS`).\n  - `image_format` — `\"png\"` (default) or `\"jpg\"`.\n- `clipboard_has_image()` → returns `true`/`false`.\n\n## Run manually (stdio)\n\n```bash\n./.venv/bin/python mcp_server.py\n```\n\n## Install as a VS Code extension\n\nClipGrab ships as a VS Code extension that registers the MCP server\nautomatically — it then appears under **Extensions view → MCP Servers** and\nstarts on demand. On first use the extension creates its own Python virtual\nenvironment and installs the dependencies, so you only need Python 3.10+ on your\n`PATH` (configurable via the `clipgrab.pythonPath` setting).\n\nDevelop / try it:\n\n1. Open this folder in VS Code and press `F5` to launch the Extension\n   Development Host.\n2. In that window, open Chat (agent mode); the `ClipGrab` MCP server and its\n   `save_clipboard_image` tool are available.\n\nPackage a `.vsix` for sharing:\n\n```bash\nnpm install -g @vscode/vsce\nvsce package\n```\n\n## VS Code configuration (without the extension)\n\nA ready-to-use config lives in `.vscode/mcp.json`:\n\n```jsonc\n{\n  \"servers\": {\n    \"clipgrab\": {\n      \"command\": \"/absolute/path/to/.venv/bin/python\",\n      \"args\": [\"/absolute/path/to/mcp_server.py\"],\n      \"cwd\": \"${workspaceFolder}\"\n    }\n  }\n}\n```\n\nThen open `.vscode/mcp.json` and start the `clipgrab` server (or use the Command\nPalette → \"MCP: List Servers\").\n\n## Use with an MCP client\n\nPoint any MCP client at the published PyPI package over stdio:\n\n```jsonc\n{\n  \"servers\": {\n    \"clipgrab\": {\n      \"command\": \"uvx\",\n      \"args\": [\"clipgrab-mcp\"]\n    }\n  }\n}\n```\n\nClipGrab is described for registries by [`server.json`](server.json) and is\npublished to the [official MCP registry](https://github.com/modelcontextprotocol/registry)\nunder the name `io.github.ulebule/clipgrab`.\n\n## Technical notes\n\n- **Cross-platform image grab**: Pillow `ImageGrab.grabclipboard()` (Windows /\n  macOS, and Linux with a recent Pillow). On Linux it falls back to `wl-paste` /\n  `xclip`.\n\n## License\n\nMIT\n",
  "bytes": 3268,
  "sha": "f01862476b3c4ba4b78c11ca7d75111decad7660ebcae9cc6fa2a951572eef39",
  "repo_slug": "ulebule/clipgrab",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ulebule_clipgrab_5c9e6981/readme"
}