The Slovakian midfielder believes that holding on to two of the key men at the club is vital to their chances of winning Serie A next season
There has been much speculation about the futures of both men but the Slovakian, 25, firmly believes that if the duo stay with the Partenopei next year it could be a glorious season at the club while revealing his desire to stay in Naples.
"I hope they both remain here. It is fundamental to me from all points of view", Hamsik told Gazzetta dello Sport.
"I'm happy where I am and what I'm doing. Mazzarri has been critical to my progress. Cavani and I hope that he will remain here, he is our strength.
"Edinson does not think about the transfer rumours because we still have second place to play for.
"In the summer there will be two months to think about it. Now and for a few weeks yet we're all focused on the championship."
Napoli look set to finish second in Serie A this season - leading AC Milan in third by seven points - but Hamsik is wary of complacency within the squad and says the players need to stay focused if they are to achieve an impressive finish.
"We must stay alert and focused," he added. "There are still six points to get to be certain of second place, it is not yet ours. We have had a great season."