Visiting
As a visitor you cannot stay longer than 180 days, and the immigration officer at entry decides how many days you get. The maximum is not automatic. The US State Department page says a visa is required when visiting for more than 180 days. The visitor category does not allow paid activities in Mexico, so ask the immigration institute (INM) whether remote work for a foreign employer is allowed as a visitor, and treat a year-long stay as needing residence.
