Auto-mount microSD when plugging phone to computer with USB
Based on your answer in the comments (apologies for not catching the OS in your initial post), you're going to still have to unlock by hand.  Past that step, I would recommend trying Macrodroid, Tasker, or other automation apps to see if they can help out. I've not used them to automate connections like this, but they are great in other situations, so I have great hope for a solution here for you.