Skip to content

WSL2 to Windows Clipboard Bridge for Image Pastes

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.

Terminal window
# In your WSL2 terminal
npm install -g @standardbeagle/mcp-clip

Add to your VSCode settings or workspace .vscode/settings.json:

{
"claude-dev.mcpServers": {
"clipboard": {
"command": "mcp-clip",
"args": []
}
}
}
Terminal window
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command "Get-Clipboard"
  • WSL2 → Windows clipboard: for image and file-list content, read_clipboard shells out to PowerShell to reach the Windows clipboard — this is the reason the server exists. This path runs when a call passes format: "file" or output_path. Plain format: "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.

PowerShell not found

Terminal window
sudo apt update && sudo apt install powershell

Permission denied

Terminal window
echo 'export PATH="/mnt/c/Windows/System32/WindowsPowerShell/v1.0:$PATH"' >> ~/.bashrc
source ~/.bashrc

Clipboard empty in WSL2

Terminal window
powershell.exe "Get-Clipboard"

MCP connection failed

  • Verify mcp-clip is in your PATH
  • 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