Cuban President Fidel Castro ended his two-day visit to Mexico this afternoon following talks with his host, Mexican President Jose Lopez Portillo, on issues that included the Reagan administration's proposed "mini-Marshall" plan for the Caribbean and Central America.

Castro's visit, designed by Mexico to help counteract what it sees as Washington's attempts to isolate Cuba in the region, also included a discussion of Castro's exclusion from this fall's North-South summit conference of 22 leaders from industrialized and developing nations.

A sparse press statement issued jointly by the two presidents squarely placed the blame for Cubna's exclusion on the United States. It said that developing countries, "Mexico among them, understand and support Cuba's right to attend" but "given the known U.S. position, the cancellation of the meeting would hurt the negotiating process between developed and developing countries."

Cuba, in turn, "released friendly nations" involved in the summit "from any moral commitment" to Cuba, the statement said.

But Castro, Cuban sources said, had expressed his concern about Washington's plans to combat communist influence in the Caribbean basin through increased economic and military aid.

Although Mexico has endorsed the plan in principle, it has been increasingly skeptical about it.

A top Mixican official last week said privately the proposal had "no future." He described it as a series of measures that had too many contradictions and was designed mainly to provide guarantees for U.S. private investment rather tha dealing with the root of development probems.

On Wednesday, the foreign ministers of five Central American republics are expected to discuss the plan and their own specific needs in Tegucigalpa, Honduras. Attempts to hold such meetings have failed twice recently because Guatemala refused to attend, according to Mexican government sources. The sources said the United States has pressured Guatemala to attend.