
Eleven thousand stops, one weekend of code: the Mexican government ran out of technical alibis
I've spent years complaining about the quality of public software in this country, so one afternoon I stopped complaining and opened a terminal. The idea wasn't to build anything special. It was to see, specifically, how much it costs today to do what five years ago would have required a team, a budget, and six months on the calendar.
It turned out to cost a long weekend. And a few dollars in API costs.
What I built is an interactive map of Mexico City's public transport. All six modes in the same view: Metro, Metrobús, RTP, Trolebús, Cablebús, and Tren Ligero, with 11,362 stops, real geometries for each line, a ridership heat map for all 195 Metro stations, an optimal route planner between any two points in the network, and a conversational assistant that understands questions like "how do I get from Roma Norte to Xochimilco" and responds with the full multimodal route, including transfers, the walking distance at the end, everything. The stack is public and boring: PostgreSQL with PostGIS and pgRouting, FastAPI, React, MapLibre, Gemini with MCP on top for the chat.
The data is published by the Mexico City Government itself at datos.cdmx.gob.mx. It's been there since 2022. Static GTFS, ridership CSVs, line geometries. Anyone with a laptop and patience can repeat what I did.
What changed in the last five years
This used to be a real engineering project. You needed a GIS expert, another person who knew Google Maps APIs well, someone to fight with public transport formats, a UX team. Today pgr_dijkstra solves optimal routes with one call. MapLibre draws the map without licensing. PostGIS does spatial algebra in pure SQL. Any decent LLM—Gemini, Claude, GPT—converts a natural language question into a sequence of calls to your tools. MCP standardizes the connection between the model and your API in thirty lines of code.
This isn't cloud provider advertising. It's the new industry baseline. What used to cost millions and months now costs hours and dollars, and the delta is paid by anyone with a credit card and the will to sit down and type.
The uncomfortable part
If one person can build a multimodal planner better than the official one in a weekend, the question is no longer technical.
I checked the portals the Mexican government does publish. The official CDMX planner exists, but it's split across different pages by mode, it doesn't integrate Cablebús with Tren Ligero, it doesn't tell you how much you'll walk at the end, it doesn't mention ridership, and it doesn't accept natural language questions. It's a search engine that works if you already know the answer. The data to do it right has been published for years. There's no technical mystery to solve. There's a decision not being made.
That decision isn't made because the system's incentives don't reward those who deliver functional software. They reward those who sign big contracts. A UX improvement that saves two hours for thirty million users doesn't generate commissions, doesn't produce media coverage, and doesn't fit into a government report as a milestone. A three-administration modernization macro-project with a foreign consortium fits all of that. The system, as it's built, makes choosing the latter inevitable.
Added to this is "not invented here" syndrome. Any civic tool a Mexican builds on their own, no matter how good, is ignored because it wasn't born within the org chart. Independent maps for potholes, crime, public works, and air quality exist. None have been officially incorporated into an agency. They compete against the org chart, so they lose.
And then there's the factor almost no one signs their name to: opacity is political, not technical. A live dashboard of budget execution is exactly what no Executive wants if execution is going poorly. While data lives in quarterly PDFs, there are 90 days of margin before the opposition puts together a report. With a minute-by-minute dashboard, the margin is minutes. The political cost of delay becomes immediate, which is why it's not built.
What could actually be deployed
A short, grounded list, all using data the State already publishes.
A real-time citizen dashboard for public works. Every peso of the Expenditure Budget assigned to infrastructure has a code, a contractor, and physical progress. The Public Account lives in four-thousand-page PDFs that no one reads. A parser, a database, a map, and an assistant that answers "where are the twelve billion for hospitals in Oaxaca?". The stack is the same one I built for transport.
A conversational assistant for SAT, IMSS, INE, and RENAPO procedures. The annual tax return is a labyrinth that costs three thousand pesos for those who can pay an accountant. But internal APIs exist and private platforms already consume them to offer that same service. An LLM with tool use on those APIs turns the labyrinth into a five-minute conversation. Having the government give it away for free isn't radical; it's the minimum.
A live map of public services. Hospitals with available beds. IMSS pharmacies with shortages. Banco del Bienestar branches with cash. Nearest patrols and firefighters. Any medium-sized European city already has this. Internal APIs exist. What's missing is the order to expose them behind a couple of access control headers.
A unified search engine for social programs. Today, "do I qualify for any support?" requires a person to know the names—Bienestar, Sembrando Vida, Jóvenes Construyendo el Futuro—and enter each portal separately. A single form, a join on published eligibility criteria, a single answer. It's not a one-year project; it's a sprint.
Air, water, and soil quality data accessible without a transparency request. SIMAT stations already generate the data. SEMARNAT already has the records. The Escazú Agreement, which Mexico signed, mandates publishing by default, not delivering two months after a formal request. Making that compliance a stable API with a stable JSON schema is an afternoon's work.
None of this is science fiction. None of this requires a contract with a foreign consortium. None of this costs what one kilometer of the Tren Maya costs.
Why I insist on building from the outside
While that culture changes, if it changes, those of us who know how to build software no longer have to ask for permission. The tools are on the table. Published open data, PostGIS, an LLM with tool use, a twenty-dollar-a-month VPS, a cheap domain. That's it.
The public transport project is an example, not a special case. It's the recipe. The next person who writes a Public Account parser, or a conversational assistant for INEGI statistics, or a live map of pharmacies with shortages, won't be performing a feat. They will be following the same flow: public data, a docker compose, an LLM with MCP on top, a domain, a deploy.
When there are thirty projects like this operating in parallel, the argument of "it's too hard, it's too expensive, it's too complex" falls apart on its own. The government runs out of technical alibis. There's nothing left to blame but the decision not to build.
Mexico doesn't need a National Digital Modernization Plan with a 2030 horizon. It needs ten more people this year to decide to publish what the State doesn't publish. To release the code. To document the real cost. To show, once again, that the problem was never technical.
When that becomes embarrassing enough, someone inside the system, someone who actually wants to get things done, will borrow it. That's the bet. Meanwhile, building a working site serves a citizen more than writing a forty-page position paper.
The stack is ready. The data is ready. The next bridge will be built by whoever decides to sit down and type.
What do you think? Join the conversation on our Discord and share your perspective.