How do I stop 'mdwrite wants to use the "metadata" keychain' prompts?
I had the same problem.  I opened my login keychain and searched for MetadataKeychain.  I clicked show password and copied and pasted it into the dialog asking for the password.

It worked!