Vyasa is traditionally considered the author of the Mahabharata.
Vyasa, also called Krishna Dvaipayana or Veda Vyasa, is a revered sage who appears within the epic as both a character and its traditional author. In the Mahabharata’s genealogy, he is the son of the sage Parashara and Satyavati. He later fathers Dhritarashtra, Pandu, and Vidura through the practice of niyoga, making him a direct participant in the Kuru family history narrated by the epic.
Tradition presents Vyasa as the composer of the vast Sanskrit poem and, in some accounts, as the narrator who dictated it to Ganesha. That writing story is deeply influential, although scholars generally view parts of the framing tradition as later developments. The text itself grew through layers of composition and transmission rather than being demonstrably written in one moment by one historical author.
This is why “Vyasa” is the canonical quiz answer, even when modern scholarship discusses anonymous poets, oral traditions, and centuries of editing. Valmiki is traditionally linked with the Ramayana, Tulsidas with the Ramcharitmanas, and Hanuman is a character rather than the epic’s traditional author.