{"slug": "build-rails-not-trains-a-framework-for-ai-infrastructure-in-the-global-south", "title": "Build Rails, Not Trains: A Framework for AI Infrastructure in the Global South", "summary": "A developer has built 31 MCP servers providing AI agents with structured access to East African institutional data, including M-PESA, county government, drought classifications, land titles, and health records. The open-source infrastructure stack is designed to enable AI applications in the Global South, where such coordination layers were previously absent.", "body_md": "There's a question I ask before building anything:\n\n*\"What is missing?\"*\n\nNot: \"How do I compete with what already exists?\"\n\nThe answer to the second question leads you toward incremental improvement.\n\nThe answer to the first question leads you toward infrastructure.\n\nTCP/IP didn't control the internet. It enabled it.\n\nRailroads didn't control freight. They enabled an economy.\n\nM-Pesa didn't control mobile money. It enabled 50 million transactions a month.\n\nRails created ecosystems. The trains came later — built by thousands of people\n\nwho didn't need to understand the rails to use them.\n\nFor the past several months I've been building rails.\n\nNot apps. Not chatbots. Not wrappers.\n\n**31 MCP servers** that give AI agents structured, authenticated, locally-processed access to:\n\nthe M-PESA API, Kenya's 47-county government layer, NDMA drought classifications across all counties,\n\nland title systems, health infrastructure, education records, SACCO finance, matatu routes, and more.\n\nAny developer — anywhere — can now do this:\n\n```\npip install mpesa-mcp county-mcp wapimaji-mcp kilimo-mcp\n```\n\nAnd give an AI agent the ability to trigger a mobile payment, query county budget data,\n\ncheck drought severity by county, or assess agricultural market prices.\n\nIn under 120 seconds. On any LLM. No API key required beyond Daraja credentials.\n\nThat's the rail. You build the train.\n\nThe standard move in tech is competitive analysis.\n\nYou look at what exists, identify what's better or cheaper, and build that.\n\nThat's fine for markets with existing demand.\n\nFor East Africa's institutional AI layer, the problem wasn't competition. It was absence.\n\nM-Pesa wasn't missing from the MCP ecosystem because engineers hadn't tried.\n\nIt was missing because the engineer who understood how it works — its callbacks, its STK Push flow,\n\nits B2C timing, its idempotency requirements — wasn't building there.\n\nEvery MCP server in this stack was born from the same question:\n\n*\"What does an AI agent need to be genuinely useful in this context — and what doesn't exist yet?\"*\n\nThe answers:\n\nNone of these existed. Now they do.\n\nThe technical knowledge to build MCP servers isn't rare.\n\nThe knowledge of how M-Pesa works from the inside isn't rare either.\n\nThe knowledge of Kenya's 47-county government structure is widely shared.\n\nWhat's rare is the intersection.\n\nKenyan + diaspora + AI infrastructure fluency.\n\nThat intersection doesn't have a lot of occupants.\n\nIt doesn't need many. It just needs someone to start building.\n\nEvery person has an intersection like this.\n\nThe place where what you know uniquely, what the world needs, and what the moment makes possible all overlap.\n\nThat's not a motivational statement. It's a resource allocation principle.\n\nBuild where others can't easily replicate you.\n\nNot all periods are equal.\n\nIn 2003, you couldn't have built a mobile payment layer in Kenya — the infrastructure didn't exist.\n\nIn 2013, you could, but you'd have needed to build the whole stack.\n\nIn 2023, M-Pesa had a mature API, Africa's Talking existed, and the missing piece was AI coordination.\n\nThe AI infrastructure window is open right now.\n\nThe MCP protocol exists. The LLM APIs exist. The institutional data exists.\n\nWhat's missing is the coordination layer for contexts that aren't Silicon Valley.\n\nWindows close.\n\nI'm not claiming certainty about when. But the pattern from previous infrastructure cycles\n\n(telecom, mobile, cloud) is clear: the window for foundational protocol-level work is short.\n\nExecution matters more than perfection during that window.\n\nThere's a version of this work that looks like ownership.\n\nBuild the M-Pesa MCP server, gate access behind a subscription, own the coordination layer.\n\nThat's a train, not a rail.\n\nThe entire portfolio is MIT licensed.\n\nThe [SII Stack](https://github.com/gabrielmahia/sii-stack) has a sovereign inference tier\n\n(Ollama, local, free) so communities can run AI without any data leaving their device.\n\nThe [offline-mcp](https://github.com/gabrielmahia/offline-mcp) server runs Llama 3.2\n\non a Raspberry Pi with no internet and no API key.\n\nWhy? Because the deepest principle in this work isn't efficiency or scale.\n\nIt's stewardship.\n\nAcross the Global South, communities are increasingly pressured to hand over health data,\n\nland records, and civic information as conditions for receiving services or funding.\n\nThe architecture of this infrastructure was designed so communities can deliver\n\nAI-powered services without surrendering that data.\n\nYou don't own infrastructure. You steward it.\n\nNot everything compounds.\n\nSkills decay. Platforms decay. Relevance decays.\n\nCharacter decays slowly. Judgment decays slowly. Intersectional expertise decays slowly.\n\nThe 31 MCP servers aren't apps. Apps decay fast — a new framework, a changed API,\n\na shifting platform, and months of work can become worthless.\n\nInfrastructure decays slowly. TCP/IP is 50 years old. M-Pesa is 17 years old.\n\nThe MCP protocol is new, but the pattern is established: protocols outlive implementations.\n\nWhen choosing what to build, ask: what's the decay rate?\n\n```\n31 MCP servers  →  pip install {server-name}\nSII Stack       →  n8n + LiteLLM (tri-polar) + Ollama + Postgres\n                   Western / Eastern / Sovereign routing\n                   72-hour offline test: must work without internet\n5 HF datasets   →  246 total downloads\n15 Dev.to articles → 257 total views\n```\n\nThe rail exists. The trains are next.\n\nIf you're building AI tools for contexts outside the default infrastructure assumptions —\n\nGlobal South, rural, offline-first, sovereignty-constrained, institutional rather than consumer —\n\nthese servers are available to use, fork, extend, or build on.\n\nMIT licensed. No conditions.\n\n→ [Full portfolio](https://gabrielmahia.github.io/nairobi-stack)\n\n→ [GitHub](https://github.com/gabrielmahia)\n\n→ [PyPI](https://pypi.org/user/gmahia)\n\n→ [Glama](https://glama.ai/mcp/servers?query=author%3Agabrielmahia)", "url": "https://wpnews.pro/news/build-rails-not-trains-a-framework-for-ai-infrastructure-in-the-global-south", "canonical_source": "https://dev.to/gabrielmahia/build-rails-not-trains-a-framework-for-ai-infrastructure-in-the-global-south-3nk2", "published_at": "2026-06-21 01:35:35+00:00", "updated_at": "2026-06-21 02:06:46.242747+00:00", "lang": "en", "topics": ["ai-infrastructure", "ai-agents", "developer-tools", "large-language-models", "ai-products"], "entities": ["M-PESA", "Safaricom", "Kenya", "MCP", "Ollama", "Africa's Talking", "Daraja", "SII Stack"], "alternates": {"html": "https://wpnews.pro/news/build-rails-not-trains-a-framework-for-ai-infrastructure-in-the-global-south", "markdown": "https://wpnews.pro/news/build-rails-not-trains-a-framework-for-ai-infrastructure-in-the-global-south.md", "text": "https://wpnews.pro/news/build-rails-not-trains-a-framework-for-ai-infrastructure-in-the-global-south.txt", "jsonld": "https://wpnews.pro/news/build-rails-not-trains-a-framework-for-ai-infrastructure-in-the-global-south.jsonld"}}