WSL2 to Windows Clipboard Bridge for Image Pastes
The problem
Section titled “The problem”When Claude runs in VSCode on Windows with WSL2, pasting images from the clipboard doesn’t work — the sandboxed environment can’t reach the Windows clipboard. mcp-clip bridges WSL2 to the Windows clipboard (including images) through PowerShell.
1. Install in WSL2
Section titled “1. Install in WSL2”# In your WSL2 terminalnpm install -g @standardbeagle/mcp-clip2. Configure the Claude Code extension
Section titled “2. Configure the Claude Code extension”Add to your VSCode settings or workspace .vscode/settings.json:
{ "claude-dev.mcpServers": { "clipboard": { "command": "mcp-clip", "args": [] } }}3. Verify PowerShell access from WSL2
Section titled “3. Verify PowerShell access from WSL2”/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command "Get-Clipboard"How it works
Section titled “How it works”- WSL2 → Windows clipboard: for image and file-list content,
read_clipboardshells out to PowerShell to reach the Windows clipboard — this is the reason the server exists. This path runs when a call passesformat: "file"oroutput_path. Plainformat: "auto"or"text"reads use the same native clipboard access as Linux. - Linux: direct clipboard integration via
golang.design/x/clipboard. - macOS / Windows: native clipboard support.
Troubleshooting
Section titled “Troubleshooting”PowerShell not found
sudo apt update && sudo apt install powershellPermission denied
echo 'export PATH="/mnt/c/Windows/System32/WindowsPowerShell/v1.0:$PATH"' >> ~/.bashrcsource ~/.bashrcClipboard empty in WSL2
powershell.exe "Get-Clipboard"MCP connection failed
- Verify
mcp-clipis in yourPATH - Check the Claude Desktop config JSON syntax
- Restart Claude Desktop after config changes
Large images not working
- Check available disk space in the temp directory
- Verify temp directory permissions
- Enable debug mode:
MCP_DEBUG=1
Performance issues
- Monitor with debug mode enabled
- Check for antivirus interference
- Verify WSL2 resource allocation
See also
Section titled “See also”read_clipboardreference — theformatandoutput_pathparameters that trigger the PowerShell path