According to the Marine Corps publication, Marines in the Mexican War(downloadable as a pdf file), Soldiers, not Marines were the troops who assaulted and captured Chapultepec.
The ground campaign to capture Derne on the Shores of Tripoli was the brain child of former Army officer, Colonel William Eaton who planned, organized and led the expedition, which was carried out by 500 mercenaries and 8 Marines. If not for this former Army officer, the Marines would have had no shores of Tripoli to sing about.
The claim of First to Fight is a claim to have been the first Armed Force to fight in defense of the United States. That is not true.
It is not the only spurious claim made on behalf of the Marine Corps.
Marines claim that a company of Marines held off the British Army at Bladensburg. The Marines were attached to a force of about 500 sailors led by Commodore Joshua Barney. When Admiral George Cockburn said, They have given us the only fighting we have had today, he was referring to Commodore Barney's sailors, not the Marines. Google the term "Commodore Barney at the Bladensburg races.
"The BATTLE OF NEW ORLEANS: In January of 1815, Marines under the command of General Andrew Jackson soundly defeated British Forces that were attacking the city of New Orleans. The British lost approximately 2,000 men while American losses were less than 100."
Out of 8400 men on the American side, 58 were US Marines.