Headless clients support 2FA login as well. Note that with Headless you cannot use auto-login in the configuration file with 2FA; only the dynamic "login" command will work.