DEV Community

Gabriel Mahia
Gabriel Mahia

Posted on

How I'm Building MCP Servers for a Language Claude Doesn't Know Well

How I'm Building MCP Servers for a Language Claude Doesn't Know Well

Swahili has roughly 200 million speakers. It's the primary working language of East Africa. It's a UN official language. And AI models make 4x more errors in Swahili than in English.

That ratio matters when you're building AI tools for people whose primary language is Swahili.

The practical problem

When I test mpesa-mcp with Swahili prompts, the responses are often technically correct but linguistically awkward. Not wrong — just obviously machine-translated from an English-centric internal representation.

For consumer tools (the Streamlit apps — DarajaAI, ShuleAI, KaziAI), this creates friction. The tool is functionally correct but doesn't feel native.

What the data gap actually means

The "4x more errors" figure isn't a model architecture problem. It's a training data problem. English has decades of internet text, books, papers, news, and code. Swahili's written internet corpus is orders of magnitude smaller.

The consequence: models have shallower representations of Swahili concepts, especially domain-specific vocabulary (healthcare, legal, financial). A model that handles "insurance premium" fluently in English may not have seen "bima" (insurance) and "malipo" (premium/payment) co-occurring enough to model the relationship accurately.

How the MCP layer helps

The MCP servers encode domain knowledge structurally, not linguistically. When bima-mcp returns insurance data, the data structure is correct regardless of what language the query came in. The linguistic work happens at the presentation layer — which is more tractable than fixing model weights.

This is one reason the architecture separates tool logic from conversational UI. The tools can be rock-solid even when the Swahili conversation layer is imperfect.

What we're doing about it

The swahili-civic-nlp project (under DPGA review) is building training datasets for Swahili civic vocabulary. The goal is contributing to fine-tuned models that perform better on East African domain tasks.

That's slow work. In the meantime, the MCP tools function as a structural workaround: get the data right first, then improve the language layer.

Progress is possible even with imperfect infrastructure.

Top comments (0)