Skip to content

WSL Tools

Seamless file synchronization and path conversion between WSL and Windows, unified into 1 tool.

Copy files between WSL and Windows, sync workspace, or check status. Auto-sync (write/edit-time automatic syncing) is configured via the MCP_WSL_AUTOSYNC environment variable, not as wsl actions. The wsl tool itself exposes only the sync and status actions.

Modes:

Single file/directory copy (wsl_path / windows_path)

Section titled “Single file/directory copy (wsl_path / windows_path)”

Direction is auto-detected from the path format:

  • Path starts with / → WSL-to-Windows
  • Path starts with drive letter (e.g., C:\) → Windows-to-WSL
// WSL to Windows (auto-detected from /home/... or /mnt/... path)
wsl({ wsl_path: "/home/user/project/main.go" })
// Windows to WSL (auto-detected from C:\ path)
wsl({ windows_path: "C:\\Users\\user\\file.txt" })
// With explicit destination
wsl({ wsl_path: "/home/user/file.go", windows_path: "C:\\project\\file.go" })
// Sync entire workspace WSL → Windows
wsl({ direction: "wsl_to_windows" })
// Sync with file filter
wsl({ direction: "windows_to_wsl", filter_pattern: "*.go" })
// Preview sync without executing
wsl({ direction: "bidirectional", dry_run: true })

All parameters:

  • action (optional): "sync" (default) or "status"
  • wsl_path (optional): Source WSL path
  • windows_path (optional): Source/destination Windows path
  • direction (optional): wsl_to_windows, windows_to_wsl, bidirectional
  • filter_pattern (optional): File filter (e.g., *.go)
  • dry_run (optional): Preview without executing (default: false)
  • create_dirs (optional): Create destination directories (default: true)
wsl({ action: "status" })
// Returns: environment detection, path mappings, file locations, auto-sync state

v3 Toolv4 Equivalent
wsl_to_windows_copywsl({ wsl_path: "/wsl/path" })
windows_to_wsl_copywsl({ windows_path: "C:\\..." })
sync_claude_workspacewsl({ direction: "..." })
wsl_windows_statuswsl({ action: "status" })
configure_autosyncMCP_WSL_AUTOSYNC env var (one-shot config)
get_autosync_configwsl({ action: "status" })
wsl_sync (v3.x)wsl({ wsl_path: "..." })
wsl_status (v3.x)wsl({ action: "status" })

See WSL Integration for complete guide.