Can I automate MFA?

For more context, we have a device authorization flow, so python scripts go to that URL to authenticate where up until now user/pass was sufficient but now MFA is enabled.