At least 265 people were killed.
The foreign ministry also advised Mexicans to stay abreast of developments and said use of social media could be limited.
President Enrique Peña Nieto said that embassy and consulate staff is ready to assist fellow countrymen.
News reports said President Recep Tayyip Erdogan was safe.
The police raided 16 locations in three neighborhoods on both the Asian and European sides of Istanbul, rounding up 13 people suspected of having links to the Islamic State group.
There are at least 36 dead and 147 wounded.
"We do know it would better if we can reach a political solution but we are prepared ..., if that's not possible, to have a military solution to this operation and taking out Daesh," Biden said at a news conference after a meeting with Prime Minister Ahmet Davutoglu.
A suicide bomber affiliated with the Islamic State group detonated a bomb near the Blue Mosque killing at least 10 people - nine of them German tourists - and wounding 15 others.
Combatants on one side are part of a new U.S.-backed alliance that includes a powerful Kurdish militia, while their opponents include rebels who are widely seen as backed by Turkey and who have also received support in a U.S.-backed aid program.
Russia's Deputy Defense Minister said that Turkey's President and his family benefit from the illegal smuggling of oil from Islamic State-held territory in Syria and Iraq.