Foreign banks can only operate in Mexico through representation offices (for information purposes) or locally incorporated subsidiaries.
"Article 7.- The National Banking and Securities Commission, with the prior agreement of its Governing Board, may authorize the establishment in the national territory of representative offices of foreign financial entities. These offices may not carry out in the national market any financial intermediation activity that requires authorization from the Federal Government and they will refrain from acting, directly or through a third party, in operations to raise funds from the public, either on their own account or alien. Notwithstanding the foregoing, said offices may provide, at the request of their clients, information on the operations that the foreign financial entities they represent carry out in their country of origin, with the understanding that such offices may not disseminate publicity or propaganda to the general public with respect to passive operations.
[...]
Article 9.- Only public limited companies with fixed capital, organized in accordance with the provisions of the General Law of Commercial Societies, will be authorized in everything that is not provided for in this Law and, particularly, with the following:
I. Their purpose will be to provide the banking and credit service, in the terms of this Law;
II. The duration of the company will be indefinite;
III. They must have the social capital and the minimum capital that corresponds in accordance with the provisions of this Law, and
IV. Its registered office will be in the national territory. [...]" (Law on Credit Institutions (18 July 1990), last amended on 11 March 2022, Articles 7 and 9 [google translation])
Law on Credit Institutions (18 July 1990), last amended on 11 March 2022, Articles 7 and 9
[<a href="https://www.diputados.gob.mx/LeyesBiblio/pdf/LIC.pdf">Law</a>]