The original ceiling fan in the master bedroom broke. When it was removed, what I found appears to be a nonstandard connection.
I'm assuming the absence of an electrical box means this is not the correct installation setup for a ceiling fan?
You have to install an electrical box. What you have now is not only incorrect but it could be dangerous.
You could, depending on the access to the attic, box out a small section of the ceiling and put a regular ceiling fan box. The other option is an angled electrical box, not sure they have one that will match your ceiling slope but search for "cathedral ceiling fan box" or something similar.
Either option will require you to secure it correctly to the framing to support a ceiling fan.