The earliest known references to the Mahabharata and its core Bharata date back to the Ashtadhyayi (sutra 6.2.38) of Pāṇini (fl. 4th century BC), and in the Ashvalayana Grhyasutra (3.4.4). This may suggest that the core 24,000 verses, known as the Bharata, as well as an early version of the extended Mahabharata, were composed by the 4th century BC. Parts of the Jaya's original 8,800 verses possibly may date back as far as the 9th-8th century BC. Islam came into existence much later.Islam is a monotheistic, Abrahamic religion originating with the teachings of the Islamic prophet Muhammad, a 7th century Arab religious and political figure.
Your vote on this answer has already been received
I am not able to recollect any Muslim name in ramayan or mahabharat immediately, but the golconda nawab's money is used to build ram mandir in Bhadrachalam, in Andhra pradesh by sri bhakt ramdas.
One of the avatar's of Vishnu, lord balaji's wife bibi nanchari is a muslim, if any body want to correct me please do so. I am writing with my little knowledge.
As ramayan and mahabharath story revolve around ram ravan and kuru pandav, the muslim characters might have had no importance and no mention, but the society is not devided like this in those days. All the muslim rulers came after all these are over, there are yugas difference is there.