π¦
Claude Paste Image
MCP server β paste images from system clipboard into Claude Code for analysis
0 installs
Trust: 37 β Low
Browser
Ask AI about Claude Paste Image
Powered by Claude Β· Grounded in docs
I know everything about Claude Paste Image. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
claude-paste-image
MCP server that captures images from your system clipboard so Claude Code (or any MCP client) can read and analyze them.
Copy a screenshot or image β call the paste_image tool β get a file path β Claude reads the image.
Features
- Cross-platform: macOS, Linux (X11 & Wayland), Windows
- Format detection: PNG, JPEG, GIF, BMP, TIFF (auto-detected from magic bytes)
- Secure: filename sanitization, restrictive file permissions (0o600), no shell interpolation
- Auto-cleanup: temporary files are deleted after 30 minutes
- Zero config: no API keys, no external services, works offline
- Minimal dependencies: only
@modelcontextprotocol/sdk
Prerequisites
| Platform | Requirement |
|---|---|
| macOS | pngpaste (brew install pngpaste) β optional, falls back to built-in osascript |
| Linux (X11) | xclip (apt install xclip) |
| Linux (Wayland) | wl-clipboard (apt install wl-clipboard) |
| Windows | PowerShell (pre-installed) |
Installation
Option 1: npx (no install)
claude mcp add paste-image -- npx -y claude-paste-image
Option 2: Global install
npm install -g claude-paste-image
claude mcp add paste-image -- claude-paste-image
Option 3: From source
git clone https://github.com/jokai-sor/claude-paste-image.git
cd claude-paste-image
npm install && npm run build
claude mcp add paste-image -- node /absolute/path/to/dist/index.js
Usage
- Copy an image to your clipboard (screenshot, browser image, etc.)
- In Claude Code, the
paste_imagetool will be available - Claude captures the image, saves it to a temp file, and reads it for analysis
Tool: paste_image
| Parameter | Type | Required | Description |
|---|---|---|---|
filename | string | No | Custom filename (alphanumeric, dashes, underscores). Random UUID if omitted. |
Example output
Image saved from clipboard.
Path: /tmp/claude-paste-images/a1b2c3d4.png
Format: PNG
Size: 142 KB
Use the Read tool to view this image.
How it works
- MCP client calls the
paste_imagetool - Server runs a platform-specific command to read the clipboard:
- macOS:
pngpasteorosascript(AppleScript) - Linux:
xclip(X11) orwl-paste(Wayland) - Windows: PowerShell with
System.Windows.Forms.Clipboard
- macOS:
- Image format is detected from magic bytes
- File is saved to a temp directory with restrictive permissions
- File path is returned for the client to read
Security
- Filenames are sanitized: path separators stripped, only
[a-zA-Z0-9_-]allowed - Files are written with mode
0o600(owner-only read/write) - Temp directory has mode
0o700(owner-only access) - All external commands use
execFileSync(no shell interpretation) - Stale files are auto-deleted after 30 minutes
License
MIT
