Labsco
MCP SERVER

ClipToWSL

by CarlosGtrz

Read the Windows clipboard from inside WSL — text or a screenshot — without leaving the terminal.

Desktop & OS Automation
Summary
One tool that closes an annoying gap.

If your editor and shell live in WSL but your screenshots and copied stack traces live in Windows, there is normally no path between them except saving a file. This is that path, and it is a single call. Clipboard data is processed locally with no network transmission, which matters given what tends to be on a developer's clipboard.

What it is

A bridge across the WSL boundary. A small Windows executable reads the clipboard through the Win32 API; a Node server in WSL manages that process and hands the contents to the client. Images are converted to PNG and Base64-encoded on the way through.

What you get
  • `read_clipboard` returns whatever is on the Windows clipboard, with a `format` parameter of auto, text or image
  • Auto-detection picks the right one, so a copied screenshot and a copied error message are both just "what is in my clipboard"
  • Images come back as PNG so the assistant can look at them rather than being told about them
  • The helper process is kept alive between calls and restarted automatically if it dies
Requirements

WSL on Windows and Node.js 18+. The release package ships the prebuilt Windows executable and an installer script; building from source additionally needs the MinGW-w64 cross-compiler and TypeScript. CLIPBOARD_EXE_PATH must point at the clipboard reader executable and is required. The release package is named clip-to-wsl-mcp, version 1.0.0.