Paste Mac screenshots straight into Claude Code running on a remote Linux box
Forward your local clipboard to a dev server through an SSH reverse tunnel
Shim a fake xclip on a headless server so tools that probe X11 keep working
Needs an SSH reverse tunnel on port 9999 plus a PATH shim and DISPLAY=:0 on the server before Claude Code will find the fake xclip.
cc-paste is a small bridge that lets you paste images from your Mac clipboard into a Claude Code session that is actually running on a remote server over SSH. The problem it solves is specific. When you press Ctrl+V inside Claude Code on a Linux box, the tool tries to read the clipboard by calling xclip. In an SSH session there is no X server, so that call fails, and only plain text gets through via the terminal's bracketed-paste mode. Images never make it. The fix has two parts. On the Mac side, a tiny Node.js daemon called clipd.js listens on 127.0.0.1 port 9999 and serves whatever is on the local clipboard over HTTP, using pbpaste and osascript to fetch text and image bytes. On the server side, you drop a fake xclip script onto your PATH. When Claude Code calls xclip to ask what types are on the clipboard or to read an image, the fake script answers by curling the Mac daemon through an SSH reverse tunnel. Setup is three steps. First, clone the repo on your Mac and run node clipd.js, leaving it open. Second, open the SSH connection with reverse port forwarding so the server can reach the Mac daemon: ssh -R 9999:127.0.0.1:9999 user@server, which the README suggests pinning into ~/.ssh/config as a RemoteForward entry. Third, on the server, curl the fake xclip into ~/fake-bin, mark it executable, put that folder at the front of PATH, and set DISPLAY=:0 so callers think an X server is around. After that, Ctrl+V inside Claude Code pastes the same thing it would on your Mac, images included. The README is honest about the limits. The daemon is macOS only because it relies on pbpaste and osascript; a Linux or Windows port would need different commands. Text paste is unaffected because it never went through xclip in the first place. The fake xclip implements only the read paths Claude Code uses, with writes left as no-ops. The reverse tunnel binds to localhost on the server, so other users on the same machine cannot reach your clipboard. Logs are written to /tmp/clip.log on the server and to clipd.js stdout on the Mac.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.