I would like to know what is the significance of Hanuman in Mahabharata?
Mahabharata Vana parva Chapter 141,verse 16 to 19
चमूं विगाह्य शत्रूणां शरशक्तिसमाकुलाम् । यदा सिंहरवं वीर करिष्यसि महाबल ॥१६॥
तदाहं बृंहयिष्यामि स्वरवेण रवं तव । विजयस्य ध्वजस्थश्च नादान मोक्ष्यामि दारुणान्॥१७॥
शत्रूणां ये प्राणहराः सुखं येन हनिष्यथ । एवमाभाष्य हनुमांस्तदा पाण्डवनन्दनम् ॥ १८॥
मार्गमाख्याय भीमाय तत्रैवान्तरधीयत ॥ १९ ॥
"Mahabali Veer Bhimasena, when you will be injured due to the prowess of the enemies arrows, and in distraught when you penetrate amidst the enimies army and shout out the war cry, at that time i will amplify your roar with mine. Other then that sitting in the flag upon Arjuna's Chariot, I will roar with such great intensity that i will seize upon the life air of the enimies, due to which you all will be able to kill them all very easily. Saying so, Hanuman the giver of happiness to the Pandavas showed the path to Bhimasena and disappeared."
It signifies Adyatma Here Jiva is Arjuna.. is driven in the ratha i.e body. by God Krishna..Under guidance of Vayu that mukhya prana.. When Prana leaves Jiva is dead. That is why after end of the war Krishna asks Arjuna to get down first. Instead of himself. In that incident the Hanuman in flag vanishes after Lord Sri Krishna disembarks the ratha, When God leave the body and so do Prana. God along with prana should be present in body for the body to be alive and do whatever it wants. Here Jiva thinks he is owner of Ratha the body. But actually he is driven by sarathy Krishna. For Human Jiva is soul, Driven by Lord inside the body. guided by Vayu prana thattva.. if prana is missing than god also leaves God along with Prana is important. This substantiated by Tattriyouphanisad Chapter 1 - Siksa Valli
Namaste Vayo Tavameya prathaksham Brahmasi
Regarding actual reason for hanuman to stay in the chariot is to protect the Ratha. Because hanuman is the only person who is immune to all ashtra and sastra because of his boon from brahma and all parivara devathas. I believe its salya parva of mahabharat. BG 15.14 verse stating the role prana in the body. Prana which holds the body together
अहं वैश्वानरो भूत्वा प्राणिनां देहमाश्रित: | प्राणापानसमायुक्त: पचाम्यन्नं चतुर्विधम् || 14||
ahaṁ vaiśhvānaro bhūtvā prāṇināṁ deham āśhritaḥ prāṇāpāna-samāyuktaḥ pachāmy annaṁ chatur-vidham
Sri Bharathiramana Mukhyapranathargatha Sri Krishnsrpnamasthu