Add metadata_provider to metadata factory