<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gabriel Mahia</title>
    <description>The latest articles on DEV Community by Gabriel Mahia (@gabrielmahia).</description>
    <link>https://dev.to/gabrielmahia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3816762%2Fa0204949-e28c-4d88-862d-f8723ceddf03.jpeg</url>
      <title>DEV Community: Gabriel Mahia</title>
      <link>https://dev.to/gabrielmahia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gabrielmahia"/>
    <language>en</language>
    <item>
      <title>3,000 Patients Per Worker: Can AI Support Kenya's Community Health Workers?</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Sun, 19 Jul 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/3000-patients-per-worker-can-ai-support-kenyas-community-health-workers-mln</link>
      <guid>https://dev.to/gabrielmahia/3000-patients-per-worker-can-ai-support-kenyas-community-health-workers-mln</guid>
      <description>&lt;p&gt;Kenya has approximately 100,000 Community Health Workers (CHWs — locally called Community Health Extension Workers, or CHEWs). They cover a population of 54 million. That's roughly one CHW per 540 people, but in rural areas the ratio reaches 3,000:1.&lt;/p&gt;

&lt;p&gt;These workers are the first and often only medical contact for millions of Kenyans. They do triage. They decide who needs a hospital referral. They counsel on pregnancy, malnutrition, fever, diarrhoea. They work from memory and a printed protocol card.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;afyanipoa&lt;/code&gt; (afya nzuri = good health in Swahili, "poa" = cool) is an AI clinical co-pilot for these workers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Research Basis
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;arXiv:2408.17216 — "Democratizing AI in Africa: Federated Learning for Low-Resource Edge Devices" (2024)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper demonstrated that federated learning can be deployed on Raspberry Pi-class devices (the computing tier of affordable Android phones) in 5 African countries simultaneously, achieving acceptable model accuracy without centralized data collection. The implication: clinical AI doesn't require cloud connectivity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHO Community Health Workers Reference Group (2022):&lt;/strong&gt; The WHO documents that CHW programs are most effective when workers have access to real-time decision support — but most programs only provide printed job aids updated annually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kenya MOH CHEW Curriculum:&lt;/strong&gt; The Kenya Ministry of Health publishes the official training curriculum for CHEWs. The integrated management protocols for fever, cough, diarrhoea, ANC, and malnutrition are well-defined and systematizable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What afyanipoa Does
&lt;/h2&gt;

&lt;p&gt;The app has three layers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Protocol library (always available, no AI needed)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Embedded Kenya MOH protocols for 8 conditions: fever, cough, diarrhoea, malnutrition, ANC, family planning, mental health, TB screening. Danger signs, referral triggers, dosing by age/weight. Zero API calls required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. AI clinical guidance (when API key is configured)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
A CHW describes a patient's complaint in Swahili. The AI synthesizes the relevant protocol sections with the specific presentation and returns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ISHARA ZA HATARI / DANGER SIGNS (check first)&lt;/li&gt;
&lt;li&gt;TATHMINI / ASSESSMENT (what to examine)&lt;/li&gt;
&lt;li&gt;MATIBABU / IMMEDIATE ACTION&lt;/li&gt;
&lt;li&gt;PELEKA / REFERRAL (when, where, why)&lt;/li&gt;
&lt;li&gt;FUATILIA / FOLLOW-UP&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Emergency contacts (always visible)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
0800 720 571 (Kenya health emergency line), county referral hospital numbers, maternal emergency contacts.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Safety Architecture
&lt;/h2&gt;

&lt;p&gt;This is safety-critical software. The design decisions reflect that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DEMO label: visible on every screen
AI output: labeled "decision support, not diagnosis"
Danger signs: displayed FIRST, before any AI output
Referral bias: when in doubt, the prompt leans toward referral
Emergency contacts: persistent, not hidden in menus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Gemini prompt explicitly instructs the model:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"When in doubt between management at home and referral, recommend referral. A missed referral in the field has worse consequences than an unnecessary one. This is decision SUPPORT — the CHW makes the final call."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Endpoint Fix
&lt;/h2&gt;

&lt;p&gt;One lesson from this deployment: &lt;strong&gt;always use the stable &lt;code&gt;/v1/&lt;/code&gt; endpoint, not &lt;code&gt;/v1beta/&lt;/code&gt;.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Wrong — returns 404 for gemini-2.0-flash
&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="c1"&gt;# Right — try v1 first, fall back to v1beta
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;ver&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;v1beta&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;generativelanguage.googleapis.com/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;ver&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/models/gemini-2.0-flash:generateContent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# ... call ...
&lt;/span&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;HTTPError&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ver&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;v1beta&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;raise&lt;/span&gt;
        &lt;span class="k"&gt;continue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pattern has since been applied to all Gemini-enabled apps in this portfolio.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy It Today
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Streamlit Cloud — free tier&lt;/span&gt;
&lt;span class="c"&gt;# Repo: github.com/gabrielmahia/afyanipoa&lt;/span&gt;
&lt;span class="c"&gt;# Secret: GOOGLE_API_KEY = "your-gemini-key"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Get a free Gemini API key at &lt;a href="https://console.cloud.google.com" rel="noopener noreferrer"&gt;console.cloud.google.com&lt;/a&gt; → Gemini API → Enable → Create key.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/gabrielmahia/afyanipoa" rel="noopener noreferrer"&gt;github.com/gabrielmahia/afyanipoa&lt;/a&gt; · CC BY-NC-ND 4.0&lt;/p&gt;

</description>
      <category>health</category>
      <category>africa</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>Reputation Portability: The Missing Infrastructure for Economic Mobility</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Thu, 16 Jul 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/reputation-portability-the-missing-infrastructure-for-economic-mobility-hko</link>
      <guid>https://dev.to/gabrielmahia/reputation-portability-the-missing-infrastructure-for-economic-mobility-hko</guid>
      <description>&lt;p&gt;A skilled plumber in Chicago can move to Los Angeles and immediately find work. Her Yelp reviews, contractor license, and Angie's List history travel with her. Strangers trust her before she's done a single job.&lt;/p&gt;

&lt;p&gt;A skilled mason in Mombasa cannot take her reputation to Nairobi. Trust is tribal and local. Hiring defaults to personal networks. The most talented people outside existing networks are invisible.&lt;/p&gt;

&lt;p&gt;This is not a cultural problem. It's an infrastructure problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Reputation Portability Infrastructure Looks Like
&lt;/h2&gt;

&lt;p&gt;In mature economies, the infrastructure exists in fragments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Uber/Lyft:&lt;/strong&gt; Star ratings that follow a driver across cities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn:&lt;/strong&gt; Endorsements and work history that cross borders&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BBB (Better Business Bureau):&lt;/strong&gt; Verified complaint and resolution history&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Angie's List / Thumbtack:&lt;/strong&gt; Job completion ratings for home services&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upwork JSS:&lt;/strong&gt; Job Success Score based on completed contracts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Professional licensing boards:&lt;/strong&gt; Verifiable credentials (doctor, electrician, contractor)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these solves the same problem: how do you compress trust between strangers at scale?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sifa-mcp&lt;/code&gt; (Sifa = reputation/praise in Swahili) is a portable reputation MCP server that implements this infrastructure for East Africa's informal economy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Trust Score Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sifa_mcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;create_worker_profile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;add_service_record&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;get_reputation_profile&lt;/span&gt;

&lt;span class="c1"&gt;# Create a portable profile
&lt;/span&gt;&lt;span class="n"&gt;profile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_worker_profile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;full_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Amina Odhiambo&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;phone&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0712345678&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;primary_skill&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;construction&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;sub_skills&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;masonry,tiling,plastering&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;location&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Mombasa&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;years_experience&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → profile_id: "SFA-A3F2B19C4E1D"
&lt;/span&gt;
&lt;span class="c1"&gt;# Add a completed job
&lt;/span&gt;&lt;span class="nf"&gt;add_service_record&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;profile_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SFA-A3F2B19C4E1D&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;client_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ABC Contractors&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;client_phone&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0722000000&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;service_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Kitchen tiling&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;duration_days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;payment_kes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;15000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;client_rating&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Check trust for a new employer
&lt;/span&gt;&lt;span class="n"&gt;profile_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_reputation_profile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;profile_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SFA-A3F2B19C4E1D&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;requester_context&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;employer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → trust_tier: "ESTABLISHED"
# → recommendation: "Good track record. Suitable for most engagements."
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Score Decomposition
&lt;/h2&gt;

&lt;p&gt;The trust score (0–100) is built from four signals:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Max Points&lt;/th&gt;
&lt;th&gt;Rationale&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Job volume&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;Demonstrates activity, not just registration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Average quality&lt;/td&gt;
&lt;td&gt;35&lt;/td&gt;
&lt;td&gt;Client-rated — heaviest weight&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Verified records&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;Client OTP confirmation prevents fabrication&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tenure&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Long history = stability signal&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This maps directly to how humans assess trust: frequency + quality + verification + history.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Production Path
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;sifa-mcp&lt;/code&gt; is DEMO infrastructure. The in-memory profile store needs to be backed by a persistent database. More critically, production requires identity verification tied to Kenya's Huduma Number / NIIMS system — to prevent workers from fabricating verified records.&lt;/p&gt;

&lt;p&gt;The regulatory and identity infrastructure for this exists in Kenya. The coordination layer (portable reputation MCP) does not. That's the gap sifa-mcp fills — and the conversation it starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why NITA Alignment Matters
&lt;/h2&gt;

&lt;p&gt;The skill categories in sifa-mcp are aligned with Kenya's National Industrial Training Authority trade classifications. This isn't accidental — NITA certification is the existing institutional trust anchor for skilled tradespeople. A sifa-mcp score that references NITA-certified training becomes part of a verifiable credential chain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;sifa-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/gabrielmahia/sifa-mcp" rel="noopener noreferrer"&gt;github.com/gabrielmahia/sifa-mcp&lt;/a&gt; · MIT License&lt;/p&gt;

</description>
      <category>africa</category>
      <category>labor</category>
      <category>python</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Parametric Insurance: When Satellite Data Replaces the Claims Adjuster</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Mon, 13 Jul 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/parametric-insurance-when-satellite-data-replaces-the-claims-adjuster-2kdj</link>
      <guid>https://dev.to/gabrielmahia/parametric-insurance-when-satellite-data-replaces-the-claims-adjuster-2kdj</guid>
      <description>&lt;p&gt;Traditional crop insurance requires a claims adjuster to visit a farm, document damage, and approve a payout. In Kenya, where farms average 1.5 hectares and are scattered across 47 counties, this is economically impossible to do at scale.&lt;/p&gt;

&lt;p&gt;The result: 2.3% insurance penetration. One bad drought = financial ruin.&lt;/p&gt;

&lt;p&gt;Parametric insurance solves this by replacing the claims adjuster with satellite data.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Parametric Insurance Works
&lt;/h2&gt;

&lt;p&gt;Instead of insuring against "crop loss" (which requires verification), parametric insurance insures against a &lt;strong&gt;trigger event&lt;/strong&gt; — a measurable proxy for loss:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rainfall below 60mm in a 30-day growing period → automatic payout&lt;/li&gt;
&lt;li&gt;NDVI (normalized difference vegetation index) below 0.3 in July → payout&lt;/li&gt;
&lt;li&gt;Temperature above 38°C for 5+ consecutive days → payout&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No claims process. No adjuster. If the satellite says the trigger fired, the payout happens automatically — within 72 hours, direct to M-PESA.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Research Basis
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ACRE Africa (2023):&lt;/strong&gt; ACRE (Agriculture and Climate Risk Enterprise) has facilitated over $200M in parametric insurance across 12 African countries. Their methodology uses NDMA (National Drought Management Authority) data as the primary trigger source for Kenya.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NDMA Kenya:&lt;/strong&gt; The NDMA publishes monthly county drought monitoring reports with rainfall deficit data, NDVI scores, and livestock condition indices. This is the data layer that makes parametric insurance possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IRI (International Research Institute for Climate and Society):&lt;/strong&gt; El Niño/La Niña forecasting with 3-month lead time has been validated as a viable basis for planting-season insurance triggers in East Africa.&lt;/p&gt;

&lt;h2&gt;
  
  
  bima-mcp Implementation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;bima_mcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;parametric_risk_score&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parametric_risk_score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;county&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Nakuru&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;crop&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;maize&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;season&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;long_rains&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;coverage_kes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50000&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → risk_tier: "MEDIUM",
# → trigger_threshold: "rainfall &amp;lt; 65mm in March-May growing period",
# → recommended_premium_kes: 3750,
# → payout_probability: 0.28,
# → data_source: "DEMO — modeled on NDMA county reports"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Community Pool Tool
&lt;/h2&gt;

&lt;p&gt;One of the more interesting tools is &lt;code&gt;community_pool_calculator&lt;/code&gt;, which models informal risk-sharing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;bima_mcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;community_pool_calculator&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;community_pool_calculator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;group_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;avg_farm_value_kes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;120000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;target_coverage_pct&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;drought_probability&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.25&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → pool_size_needed_kes: 450000,
# → monthly_contribution_kes: 1500,
# → confidence_interval: "90% probability of full coverage for any single member in any given year"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Chama groups (informal savings societies) are already the primary financial institution for millions of Kenyan women. Parametric pooling maps directly to existing behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  What bima-mcp Covers
&lt;/h2&gt;

&lt;p&gt;6 tools:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;nhif_coverage_query&lt;/code&gt; — NHIF benefit lookup by category&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;parametric_risk_score&lt;/code&gt; — NDMA-based crop risk scoring&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;microinsurance_comparison&lt;/code&gt; — product comparison across providers&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;community_pool_calculator&lt;/code&gt; — informal risk-sharing models&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claim_eligibility&lt;/code&gt; — trigger-based eligibility check&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;insurance_gap_analysis&lt;/code&gt; — what's uninsured in a given county
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;bima-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/gabrielmahia/bima-mcp" rel="noopener noreferrer"&gt;github.com/gabrielmahia/bima-mcp&lt;/a&gt; · MIT License&lt;/p&gt;

</description>
      <category>africa</category>
      <category>insurance</category>
      <category>python</category>
      <category>mcp</category>
    </item>
    <item>
      <title>The Information Asymmetry That Costs East African Farmers Billions</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Fri, 10 Jul 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/the-information-asymmetry-that-costs-east-african-farmers-billions-4imc</link>
      <guid>https://dev.to/gabrielmahia/the-information-asymmetry-that-costs-east-african-farmers-billions-4imc</guid>
      <description>&lt;p&gt;A trader drives from Nairobi to Nakuru on Monday morning. Before leaving, he checks wholesale prices at Wakulima Market. He knows maize is 12% higher in Nairobi this week than last.&lt;/p&gt;

&lt;p&gt;The farmer he buys from doesn't know this.&lt;/p&gt;

&lt;p&gt;That information gap is not accidental. It's structural, persistent, and extractable by anyone with market access. The World Bank estimated in 2016 that price information asymmetries account for 10–15% of post-harvest losses in Sub-Saharan Africa. For Kenya's 8M+ smallholder farmers, that's billions in foregone income annually.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;soko-mcp&lt;/code&gt; is a commodity price intelligence MCP server that begins to close this gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Research Basis
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Suri &amp;amp; Jack (2016):&lt;/strong&gt; M-PESA adoption in Kenya lifted 194,000 households out of poverty, disproportionately women — primarily through improved market access and ability to store value. The mechanism: reduced friction in market participation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;World Bank "ICT and Agricultural Markets" (2016):&lt;/strong&gt; In markets where farmers received SMS price updates, they achieved 8–10% higher farm-gate prices by timing sales or traveling to better markets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EAGC East Africa Regional Market Monitor:&lt;/strong&gt; The East Africa Grain Council publishes weekly price data for 12 commodities across 8 countries. This data exists. It's just not integrated into tools farmers actually use.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Sell/Hold Problem
&lt;/h2&gt;

&lt;p&gt;The core decision a farmer faces post-harvest:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Should I sell my 50 bags of maize now, or store them for 2 months?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This requires three inputs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Current market price vs. historical average&lt;/li&gt;
&lt;li&gt;Expected price trajectory (seasonal pattern)&lt;/li&gt;
&lt;li&gt;Cost of storage (per bag per month)
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;soko_mcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sell_hold_decision&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sell_hold_decision&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;commodity&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;maize&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;market&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;nakuru&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;quantity_bags&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;storage_cost_per_month_kes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;months_can_store&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → recommendation: "HOLD 2 MONTHS"
# → expected_gain_kes: 8500 (net of storage costs)
# → confidence: "MODERATE"
# → caveat: "DEMO — based on synthetic seasonal patterns"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What the Model Does
&lt;/h2&gt;

&lt;p&gt;The price model uses three signals:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Seasonal index:&lt;/strong&gt; Maize prices in Kenya follow a predictable post-harvest depression (March–May) and pre-harvest premium (October–December). This is well-documented in EAGC data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Regional spread:&lt;/strong&gt; Nairobi-Nakuru price differentials average 12–18% depending on road conditions and fuel costs. A farmer 200km from Nairobi can calculate whether the transport cost is worth it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Storage break-even:&lt;/strong&gt; At KES 500/bag/month, a 15% price increase over 2 months yields KES 7,500 net gain on 50 bags. If expected increase is 8%, don't store — sell now.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Trust Integrity Note
&lt;/h2&gt;

&lt;p&gt;All price data in &lt;code&gt;soko-mcp&lt;/code&gt; is &lt;strong&gt;DEMO — synthetic data&lt;/strong&gt; modeled on EAGC seasonal patterns. It does not connect to live market feeds.&lt;/p&gt;

&lt;p&gt;Production integration requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EAGC API subscription (available to NGOs and research institutions)&lt;/li&gt;
&lt;li&gt;NAFIS (National Agriculture and Food Information System) real-time feeds&lt;/li&gt;
&lt;li&gt;Kenya National Bureau of Statistics retail price data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model architecture is production-ready. The data connections are the next step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five Tools
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;soko-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;commodity_price_query&lt;/code&gt; — current price + 30-day trend&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;regional_price_comparison&lt;/code&gt; — prices across 8 East Africa markets&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;price_trend_analysis&lt;/code&gt; — 12-month historical pattern&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sell_hold_decision&lt;/code&gt; — net-of-storage recommendation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;market_overview&lt;/code&gt; — full commodity dashboard&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://github.com/gabrielmahia/soko-mcp" rel="noopener noreferrer"&gt;github.com/gabrielmahia/soko-mcp&lt;/a&gt; · MIT License&lt;/p&gt;

</description>
      <category>agriculture</category>
      <category>africa</category>
      <category>python</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Building parametric crop insurance with wapimaji-mcp and bima-mcp</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Mon, 06 Jul 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/building-parametric-crop-insurance-with-wapimaji-mcp-and-bima-mcp-1fmd</link>
      <guid>https://dev.to/gabrielmahia/building-parametric-crop-insurance-with-wapimaji-mcp-and-bima-mcp-1fmd</guid>
      <description>&lt;h1&gt;
  
  
  Building Parametric Crop Insurance with wapimaji-mcp and bima-mcp
&lt;/h1&gt;

&lt;p&gt;Traditional crop insurance in Kenya requires an adjuster to visit the farm, assess the damage, file a claim, wait for processing, and — maybe — receive a payout months after the harvest has already failed.&lt;/p&gt;

&lt;p&gt;Parametric insurance replaces the adjuster with satellite data. If drought reaches Phase 3 in your county, the policy pays out automatically. No adjuster. No waiting. No dispute.&lt;/p&gt;

&lt;p&gt;Here's how to build a basic parametric insurance agent using two MCP servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tools
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;wapimaji-mcp&lt;/strong&gt; provides Kenya NDMA drought phase classifications across all 47 counties:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Tool: kenya_county_drought
# Input: county_name
# Output: current drought phase (1-5), affected population, area
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;bima-mcp&lt;/strong&gt; provides parametric risk scoring and insurance product matching:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Tool: parametric_crop_risk
# Input: county, crop_type, area_ha, coverage_amount
# Output: risk score, premium estimate, trigger conditions
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The agent workflow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I have 2 hectares of maize in Turkana County. How much will crop insurance cost?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="mf"&gt;1.&lt;/span&gt; &lt;span class="n"&gt;wapimaji_mcp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;kenya_county_drought&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;county&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Turkana&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;Phase&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Emergency&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;67&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;area&lt;/span&gt; &lt;span class="n"&gt;affected&lt;/span&gt;

&lt;span class="mf"&gt;2.&lt;/span&gt; &lt;span class="n"&gt;bima_mcp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parametric_crop_risk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
     &lt;span class="n"&gt;county&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Turkana&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
     &lt;span class="n"&gt;crop_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;maize&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="n"&gt;area_ha&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="n"&gt;coverage_amount&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50000&lt;/span&gt;
   &lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;Risk&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;HIGH&lt;/span&gt;
   &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;Estimated&lt;/span&gt; &lt;span class="n"&gt;premium&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;KES&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;season&lt;/span&gt;
   &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;Trigger&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Phase&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;consecutive&lt;/span&gt; &lt;span class="n"&gt;weeks&lt;/span&gt;
   &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;Payout&lt;/span&gt; &lt;span class="n"&gt;timeline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt; &lt;span class="n"&gt;after&lt;/span&gt; &lt;span class="n"&gt;trigger&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why the combination works
&lt;/h2&gt;

&lt;p&gt;Neither tool alone answers the question. The drought data provides current conditions; the risk tool prices the forward-looking exposure. Together, they give a complete picture in a single agent session.&lt;/p&gt;

&lt;p&gt;The farmer gets: a current drought assessment, a premium quote, and the exact trigger conditions — without calling a broker, visiting an office, or waiting for a human intermediary.&lt;/p&gt;

&lt;p&gt;This is the practical argument for coordination infrastructure. The data exists. The tools exist. The value comes from connecting them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo data disclaimer
&lt;/h2&gt;

&lt;p&gt;Both tools use synthetic demo data. In production, these would connect to real NDMA APIs and accredited insurance product APIs. The architecture is production-ready; the data sources need to be swapped.&lt;/p&gt;

&lt;p&gt;Source code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/gabrielmahia/wapimaji-mcp" rel="noopener noreferrer"&gt;wapimaji-mcp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/gabrielmahia/bima-mcp" rel="noopener noreferrer"&gt;bima-mcp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>insurance</category>
      <category>mcp</category>
      <category>africa</category>
      <category>climate</category>
    </item>
    <item>
      <title>What Happens When a Drought Signal Doesn't Go Anywhere</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Fri, 03 Jul 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/what-happens-when-a-drought-signal-doesnt-go-anywhere-3ln4</link>
      <guid>https://dev.to/gabrielmahia/what-happens-when-a-drought-signal-doesnt-go-anywhere-3ln4</guid>
      <description>&lt;p&gt;A smallholder farmer in Turkana County has crop insurance.&lt;/p&gt;

&lt;p&gt;The insurance contract is parametric: when rainfall drops 40% below the seasonal mean, the payout triggers automatically. No assessor visit. No claims form. The satellite confirms the threshold, the payment fires.&lt;/p&gt;

&lt;p&gt;The rainfall data exists. CHIRPS processes it daily at 0.05° resolution — about 5km grid cells across all of Kenya. The threshold is computable. The payout is automatable.&lt;/p&gt;

&lt;p&gt;What doesn't exist: the connection between the data and the contract.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wapimaji-mcp&lt;/code&gt; reads the rainfall data. &lt;code&gt;bima-mcp&lt;/code&gt; holds the insurance contract. Neither knows the other exists. The drought signal fires into silence.&lt;/p&gt;

&lt;h2&gt;
  
  
  This is the coordination problem
&lt;/h2&gt;

&lt;p&gt;It's not a data problem. NASA and NOAA publish the data. It's not a model problem — the threshold calculation is simple arithmetic. It's not a deployment problem — both tools run on PyPI.&lt;/p&gt;

&lt;p&gt;It's a routing problem. There's no layer that says: when this signal crosses this threshold, notify these tools.&lt;/p&gt;

&lt;p&gt;That layer is &lt;a href="https://github.com/gabrielmahia/africa-coord-bus" rel="noopener noreferrer"&gt;&lt;code&gt;africa-coord-bus&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the bus does
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pip&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;africa&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;coord&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;bus&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When &lt;code&gt;wapimaji-mcp&lt;/code&gt; detects drought phase ≥ 2 (Stressed), it publishes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;bus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;CoordinationEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;domain&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;EventDomain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;WATER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;event_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;drought_alert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;wapimaji-mcp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;severity&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;EventSeverity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ALERT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;location&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;KenyaLocation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;county&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Turkana&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;county_code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ndma_phase&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rainfall_deficit_pct&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;42.0&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bus routes this to five downstream tools automatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;bima-mcp.evaluate_parametric_payout&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kilimo-mcp.issue_drought_advisory&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;soko-mcp.price_alert&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;afya-mcp.activate_malnutrition_watch&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;county-mcp.alert_county_health&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Six weeks earlier than the current state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Offline-first
&lt;/h2&gt;

&lt;p&gt;Rural Kenya does not have reliable connectivity. Every event is written to a local queue before dispatch. If dispatch fails, the queue persists. When connectivity restores, the queue replays.&lt;/p&gt;

&lt;p&gt;The coordination infrastructure works at the edge.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap between data and action
&lt;/h2&gt;

&lt;p&gt;The famine early warning literature has documented this gap for decades. Data exists. Decisions lag. Coordination between the data system and the response system breaks down.&lt;/p&gt;

&lt;p&gt;The gap is not technical — it's architectural. No one built the routing layer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/gabrielmahia/africa-coord-bus" rel="noopener noreferrer"&gt;africa-coord-bus&lt;/a&gt; is that layer.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>africa</category>
      <category>python</category>
      <category>drought</category>
    </item>
    <item>
      <title>Building an Alternative Credit Score from M-PESA Behavioral Data</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Fri, 03 Jul 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/building-an-alternative-credit-score-from-m-pesa-behavioral-data-1bl1</link>
      <guid>https://dev.to/gabrielmahia/building-an-alternative-credit-score-from-m-pesa-behavioral-data-1bl1</guid>
      <description>&lt;p&gt;FICO was invented in 1956 and took five decades of credit card data to become the global standard. That data simply doesn't exist for most Kenyan adults. But something else does: M-PESA.&lt;/p&gt;

&lt;p&gt;35 million Kenyans use M-PESA. Every paybill payment, every savings deposit, every Fuliza loan — that's a behavioral financial record. The question &lt;code&gt;mkopo-mcp&lt;/code&gt; asks is: can you build a 300–850 credit score from it?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Research Basis
&lt;/h2&gt;

&lt;p&gt;The core insight comes from two bodies of work:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Breza &amp;amp; Kinnan (2021):&lt;/strong&gt; Mobile money adoption in India measurably improved credit access for previously unbanked households. Transaction regularity was a stronger predictor of repayment than income level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;World Bank Financial Inclusion Database (2022):&lt;/strong&gt; In Sub-Saharan Africa, 57% of adults who use mobile money have never had a formal bank account. That's the population FICO was never designed to serve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Central Bank of Kenya Prudential Guidelines (2022):&lt;/strong&gt; CRBs in Kenya are required to report both positive and negative credit information. Fuliza (M-PESA overdraft) data is already flowing to TransUnion Kenya.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Score Model
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;mkopo_mcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;alternative_credit_score&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;alternative_credit_score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;monthly_income_kes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;45000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;mpesa_transactions_monthly&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;avg_transaction_kes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1850&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;paybill_payments_monthly&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;fuliza_usage&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;occasional&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;savings_behavior&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;regular_deposits&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;phone_tenure_years&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;3.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;months_of_history&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;18&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → score: 647, tier: "FAIR", loan_capacity_kes: 85000
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The score is decomposed into four signals:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Weight&lt;/th&gt;
&lt;th&gt;Proxy For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Income regularity&lt;/td&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;td&gt;Capacity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Payment consistency&lt;/td&gt;
&lt;td&gt;25%&lt;/td&gt;
&lt;td&gt;Willingness&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Savings behavior&lt;/td&gt;
&lt;td&gt;25%&lt;/td&gt;
&lt;td&gt;Financial discipline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tenure + history&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;Stability&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why Behavioral Signals Work
&lt;/h2&gt;

&lt;p&gt;The intuition: a person who pays their Nairobi Water paybill on time, every month, for 18 months is demonstrating financial discipline that's directly relevant to loan repayment. It's not income — it's behavior.&lt;/p&gt;

&lt;p&gt;This is structurally similar to how FICO evolved to include rent payment data (FICO 10T, 2020) and how Experian Boost works in the US — both extend credit scoring to non-traditional signals.&lt;/p&gt;

&lt;p&gt;The difference is that in Kenya, those signals are already flowing through one system (M-PESA), not scattered across utilities and landlords.&lt;/p&gt;

&lt;h2&gt;
  
  
  What mkopo-mcp Doesn't Do
&lt;/h2&gt;

&lt;p&gt;Trust integrity matters here: &lt;strong&gt;mkopo-mcp is DEMO infrastructure&lt;/strong&gt;. It does not connect to real M-PESA transaction data. It models how a score would be computed if such data were available.&lt;/p&gt;

&lt;p&gt;Production deployment requires:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User consent for M-PESA transaction access (Safaricom API)&lt;/li&gt;
&lt;li&gt;CBK data protection compliance (Data Protection Act 2019)&lt;/li&gt;
&lt;li&gt;CRB registration for institutions submitting scores&lt;/li&gt;
&lt;li&gt;Actuary-validated model weights (these are illustrative)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The infrastructure exists. The regulatory and data access path is defined. mkopo-mcp demonstrates the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Impact Calculation
&lt;/h2&gt;

&lt;p&gt;If even 10% of Kenya's 30M credit-invisible adults could access microfinance products through alternative scoring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3M people with access to KES 50,000–200,000 productive loans&lt;/li&gt;
&lt;li&gt;At 2% monthly default rate (optimistic) → marginal NPL is manageable&lt;/li&gt;
&lt;li&gt;Kenya's MSME financing gap: approximately KES 1.1T (IFC, 2022)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's not an app. That's coordination infrastructure.&lt;/p&gt;






&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;mkopo-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/gabrielmahia/mkopo-mcp" rel="noopener noreferrer"&gt;github.com/gabrielmahia/mkopo-mcp&lt;/a&gt; · MIT License&lt;/p&gt;

</description>
      <category>fintech</category>
      <category>africa</category>
      <category>python</category>
      <category>mcp</category>
    </item>
    <item>
      <title>How I'm Building MCP Servers for a Language Claude Doesn't Know Well</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Thu, 02 Jul 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/how-im-building-mcp-servers-for-a-language-claude-doesnt-know-well-d0g</link>
      <guid>https://dev.to/gabrielmahia/how-im-building-mcp-servers-for-a-language-claude-doesnt-know-well-d0g</guid>
      <description>&lt;h1&gt;
  
  
  How I'm Building MCP Servers for a Language Claude Doesn't Know Well
&lt;/h1&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;That ratio matters when you're building AI tools for people whose primary language is Swahili.&lt;/p&gt;

&lt;h2&gt;
  
  
  The practical problem
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  What the data gap actually means
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the MCP layer helps
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we're doing about it
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Progress is possible even with imperfect infrastructure.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>swahili</category>
      <category>mcp</category>
      <category>africa</category>
    </item>
    <item>
      <title>What Claude Sonnet 5 Means for AI Infrastructure in East Africa</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Wed, 01 Jul 2026 03:45:51 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/what-claude-sonnet-5-means-for-ai-infrastructure-in-east-africa-41gc</link>
      <guid>https://dev.to/gabrielmahia/what-claude-sonnet-5-means-for-ai-infrastructure-in-east-africa-41gc</guid>
      <description>&lt;h1&gt;
  
  
  What Claude Sonnet 5 Means for AI Infrastructure in East Africa
&lt;/h1&gt;

&lt;p&gt;The release of Claude Sonnet 5 on June 30, 2026 changes something specific about building AI agent infrastructure for regions like East Africa: the model tier that couldn't reliably finish a multi-step workflow now can.&lt;/p&gt;

&lt;p&gt;This isn't a general AI update note. It's about a concrete technical constraint that just moved.&lt;/p&gt;

&lt;h2&gt;
  
  
  The constraint that moved
&lt;/h2&gt;

&lt;p&gt;East Africa's AI infrastructure problem isn't compute or APIs. M-PESA has an API. Africa's Talking has an API. NDMA publishes drought data. KRA has a taxpayer portal. The constraint has been that an AI agent calling several of these in sequence — check drought severity → trigger insurance evaluation → notify county — would stop partway through, lose context, or require manual handholding to continue.&lt;/p&gt;

&lt;p&gt;Sonnet 4.6, released in February, scored 67.0% on Terminal-Bench. Sonnet 5, released today, scores 80.4%. That 13-point gap isn't abstract. It's the difference between an agent that stalls at step two of a cascade and one that finishes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for the East Africa coordination stack
&lt;/h2&gt;

&lt;p&gt;The 31 MCP servers in this portfolio — covering M-PESA, drought data, tax, credit scoring, crop insurance, land records, labor rights, county data, and more — are now meaningfully more useful as a system than they were yesterday.&lt;/p&gt;

&lt;p&gt;The key change: &lt;code&gt;africa-coord-bus&lt;/code&gt;, the coordination event bus that connects these servers, is now the kind of tool Sonnet 5 was designed to orchestrate. A drought alert from &lt;code&gt;wapimaji-mcp&lt;/code&gt;, cascading through &lt;code&gt;bima-mcp&lt;/code&gt; for insurance evaluation and &lt;code&gt;county-mcp&lt;/code&gt; for notification, is exactly the multi-hop tool chain where the 13-point Terminal-Bench improvement shows up in practice.&lt;/p&gt;

&lt;h2&gt;
  
  
  The model to use
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Claude API
&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Anthropic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude-sonnet-5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[...],&lt;/span&gt;  &lt;span class="c1"&gt;# your MCP tools
&lt;/span&gt;    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For compliance and vulnerability analysis at the highest accuracy requirement, Opus 4.8 ($5/$25 per MTok) is still the right call. For the coordination and planning work — routing events, calling domain servers, summarizing findings — Sonnet 5 at $2/$10 introductory pricing is the working default now.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on the pricing window
&lt;/h2&gt;

&lt;p&gt;The introductory price ($2/$10 per MTok) runs through August 31, 2026. After that it moves to $3/$15. For production deployments with real usage, August is the right time to run load tests and get accurate cost baselines before standard pricing kicks in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start here
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;pip install mpesa-mcp africa-coord-bus&lt;/code&gt; — M-PESA + event bus&lt;/li&gt;
&lt;li&gt;Connect with &lt;code&gt;claude-sonnet-5&lt;/code&gt; as your agent model&lt;/li&gt;
&lt;li&gt;Call &lt;code&gt;get_model_hint()&lt;/code&gt; from any server for tested model guidance&lt;/li&gt;
&lt;li&gt;Full server list: &lt;a href="https://pypi.org/user/gmahia/" rel="noopener noreferrer"&gt;pypi.org/user/gmahia&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>africa</category>
      <category>mcp</category>
      <category>claude</category>
    </item>
    <item>
      <title>Why East Africa Needs Coordination Infrastructure, Not Just AI Apps</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Tue, 30 Jun 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/why-east-africa-needs-coordination-infrastructure-not-just-ai-apps-3ik5</link>
      <guid>https://dev.to/gabrielmahia/why-east-africa-needs-coordination-infrastructure-not-just-ai-apps-3ik5</guid>
      <description>&lt;p&gt;Every conversation about AI in Africa eventually converges on the same framing: "AI for Africa." Apps that use AI. Tools powered by AI. AI everything.&lt;/p&gt;

&lt;p&gt;That framing is backwards.&lt;/p&gt;

&lt;p&gt;The structural problem East Africa faces isn't a shortage of apps. It's a shortage of the coordination infrastructure that makes economies work. Insurance. Credit scoring. Market price signals. Reputation systems. Civic accountability. Legal access.&lt;/p&gt;

&lt;p&gt;These aren't AI features. They're the systems that underpin economic participation everywhere they exist — and their absence is what locks people out of formal economies.&lt;/p&gt;

&lt;p&gt;AI is how you deploy them at scale, in Swahili, on $50 smartphones. But AI is the delivery layer. Not the product.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Five Coordination Failures
&lt;/h2&gt;

&lt;p&gt;Consider what makes a transaction between strangers possible in a mature economy:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Uncertainty mitigation → Insurance&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Before a farmer plants, they need confidence that one bad season won't destroy them. In Kenya, insurance penetration is 2.3% of GDP. In OECD countries: 8–11%. That gap isn't a wealth gap. It's a missing coordination technology.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Trust at a distance → Credit&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
FICO scores took 50 years of credit card data to build. 70% of Kenyan adults have no formal credit history. But they have M-PESA — a de facto financial ledger of 35M+ people's economic behavior. Credit infrastructure built on M-PESA signals is not a feature. It's a coordination primitive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Information asymmetry → Market intelligence&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
A farmer in Nakuru doesn't know Nairobi prices are 40% higher this week. The trader knows. That information gap is a direct tax on rural producers, extractable by anyone with a phone and a market visit. Price discovery infrastructure should be public.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Trust compression → Reputation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
A skilled mason in Mombasa can't take her track record to Nairobi. Trust is tribal and local. Without portable reputation, economic mobility is throttled to your existing network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Enforcement uncertainty → Legal access&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
40%+ of Kenyans don't know their constitutional rights. Legal aid organizations are chronically underfunded. AI can't replace lawyers — but it can tell a farmer their rights before they're cheated out of their land.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Portfolio Builds
&lt;/h2&gt;

&lt;p&gt;Each tool in this stack is one of these coordination technologies, deployed as an open-source MCP server:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Coordination Problem&lt;/th&gt;
&lt;th&gt;PyPI&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;mpesa-mcp&lt;/td&gt;
&lt;td&gt;Payment execution&lt;/td&gt;
&lt;td&gt;✅ v0.2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bima-mcp&lt;/td&gt;
&lt;td&gt;Uncertainty → Insurance&lt;/td&gt;
&lt;td&gt;✅ v0.1.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mkopo-mcp&lt;/td&gt;
&lt;td&gt;Trust gap → Credit&lt;/td&gt;
&lt;td&gt;✅ v0.1.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;soko-mcp&lt;/td&gt;
&lt;td&gt;Info asymmetry → Markets&lt;/td&gt;
&lt;td&gt;✅ v0.1.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sifa-mcp&lt;/td&gt;
&lt;td&gt;Trust → Reputation&lt;/td&gt;
&lt;td&gt;✅ v0.1.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;civic-agent-kit&lt;/td&gt;
&lt;td&gt;Enforcement → Civic rights&lt;/td&gt;
&lt;td&gt;✅ v0.2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;wapimaji-mcp&lt;/td&gt;
&lt;td&gt;Environmental risk data&lt;/td&gt;
&lt;td&gt;✅ v0.1.2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The AI layer (Gemini, Claude, Llama) makes these accessible through natural language, in Swahili, without requiring technical literacy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why MCP Specifically
&lt;/h2&gt;

&lt;p&gt;Model Context Protocol means any AI assistant — Claude, GPT-4, Gemini, local Llama — can call these tools natively. No integration work. Install the package, connect it, and the AI can check NHIF coverage, score a credit application, or compare commodity prices as naturally as answering a question.&lt;/p&gt;

&lt;p&gt;That's the leverage point: coordination infrastructure that any AI can use, built by one engineer, available to 47M Swahili speakers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Test
&lt;/h2&gt;

&lt;p&gt;When evaluating whether a tool is coordination infrastructure or just an AI app, ask: does this exist as a public, institutional system in developed economies?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Credit scoring → yes (FICO, Equifax, Experian)&lt;/li&gt;
&lt;li&gt;Insurance underwriting data → yes (actuarial tables, reinsurance)&lt;/li&gt;
&lt;li&gt;Commodity price feeds → yes (Bloomberg, Reuters, CME)&lt;/li&gt;
&lt;li&gt;Reputation systems → yes (Yelp, LinkedIn, BBB, Angie's List)&lt;/li&gt;
&lt;li&gt;Legal information access → yes (LexisNexis, public court records)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every yes is a coordination technology East Africa needs. AI delivers it at a fraction of the cost.&lt;/p&gt;




&lt;p&gt;Portfolio: &lt;a href="https://gabrielmahia.github.io" rel="noopener noreferrer"&gt;gabrielmahia.github.io&lt;/a&gt;&lt;br&gt;&lt;br&gt;
All tools: MIT licensed, PyPI-hosted, MCP-compatible.&lt;/p&gt;

</description>
      <category>africa</category>
      <category>architecture</category>
      <category>opensource</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Africa's MCP Servers Mostly Don't Exist Yet. Here's What Listing One Looks Like.</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Mon, 29 Jun 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/mpesa-mcp-just-joined-the-awesome-mcp-servers-directory-heres-what-that-means-11db</link>
      <guid>https://dev.to/gabrielmahia/mpesa-mcp-just-joined-the-awesome-mcp-servers-directory-heres-what-that-means-11db</guid>
      <description>&lt;h1&gt;
  
  
  Africa's MCP Servers Mostly Don't Exist Yet. Here's What Listing One Looks Like.
&lt;/h1&gt;

&lt;p&gt;Search the largest public registry of MCP servers for "Africa" and the results are thin. Payments, government data, agriculture, health — the domains exist, the institutional APIs exist, but the agent-callable interface to them mostly doesn't.&lt;/p&gt;

&lt;p&gt;mpesa-mcp is now indexed in &lt;a href="https://github.com/punkpeye/awesome-mcp-servers" rel="noopener noreferrer"&gt;awesome-mcp-servers&lt;/a&gt;, the most widely-used community registry, alongside servers for Stripe, GitHub, and PostgreSQL. That's a small fact. The more useful one is what the gap around it looks like.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's actually listed for the continent
&lt;/h2&gt;

&lt;p&gt;As of this writing, the African-specific entries in that registry are countable on one hand. Meanwhile the registry has hundreds of servers for US and EU financial, government, and SaaS APIs. The asymmetry isn't about demand — M-PESA alone processes a transaction volume most Western payment rails would envy. It's about who's building the connector layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "production-ready" means for this kind of server
&lt;/h2&gt;

&lt;p&gt;Getting accepted into a curated registry forces a specific bar: documented tools, clear scoping (what the server will and won't do), a license, and CI that actually runs. For an MCP server touching financial APIs, two things matter more than usual:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tool scoping.&lt;/strong&gt; An agent with &lt;code&gt;mpesa_b2c&lt;/code&gt; and &lt;code&gt;mpesa_reversal&lt;/code&gt; access needs a PolicyGate-style boundary, not just a docstring. Sandbox-vs-production credentials should be a config flag, not a code branch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit trail.&lt;/strong&gt; Every financial tool call should be logged with enough context to reconstruct what the agent did and why, independent of whether the underlying transaction succeeded.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The actual gap
&lt;/h2&gt;

&lt;p&gt;mpesa-mcp covers M-PESA. Africa's Talking covers SMS/USSD across 20+ countries. Neither had an MCP interface before this. The pattern repeats across the continent's institutional layer: tax authorities, land registries, health systems, agricultural extension services — each with an API or a data source, none with an agent-native interface.&lt;/p&gt;

&lt;p&gt;That's the actual story. Registry listings are a side effect of building the connector; they're not the point.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/gabrielmahia/mpesa-mcp" rel="noopener noreferrer"&gt;mpesa-mcp on GitHub&lt;/a&gt; · &lt;a href="https://pypi.org/project/mpesa-mcp/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>mpesa</category>
      <category>africa</category>
      <category>achievement</category>
    </item>
    <item>
      <title>The 7-Server Stack: How East Africa's Coordination Infrastructure Works Together</title>
      <dc:creator>Gabriel Mahia</dc:creator>
      <pubDate>Thu, 25 Jun 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/gabrielmahia/the-7-server-stack-how-east-africas-coordination-infrastructure-works-together-1fo0</link>
      <guid>https://dev.to/gabrielmahia/the-7-server-stack-how-east-africas-coordination-infrastructure-works-together-1fo0</guid>
      <description>&lt;h1&gt;
  
  
  The 7-Server Stack: How East Africa's Coordination Infrastructure Works Together
&lt;/h1&gt;

&lt;p&gt;I've been building AI infrastructure for East Africa for the past 18 months. Seven MCP servers. Seven coordination failures. One underlying theory.&lt;/p&gt;

&lt;h2&gt;
  
  
  The theory
&lt;/h2&gt;

&lt;p&gt;Markets fail when participants lack the information to coordinate. In East Africa, the failures are concrete:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A farmer sells maize at harvest when prices are lowest, not knowing Nairobi prices are 40% higher&lt;/li&gt;
&lt;li&gt;A small trader can't access credit because their M-PESA history isn't legible to banks
&lt;/li&gt;
&lt;li&gt;A jua kali welder is paid below market because neither party knows the market rate&lt;/li&gt;
&lt;li&gt;A household goes uninsured against drought because parametric products aren't findable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these is an information asymmetry problem. The technology to solve them exists. What's missing is the query layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mpesa-mcp     → payment execution + transaction intelligence
bima-mcp      → insurance products + parametric risk scoring
mkopo-mcp     → alternative credit scoring from M-PESA patterns
soko-mcp      → commodity price intelligence across 8 markets
sifa-mcp      → portable reputation + skills passports
kazi-mcp      → labor market matching + wage benchmarking
wapimaji-mcp  → drought phase data across 47 counties
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How they compound
&lt;/h2&gt;

&lt;p&gt;The power isn't any single tool — it's the combinations. An AI agent helping a farmer can simultaneously:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check current maize price in Nairobi vs local market (soko-mcp)&lt;/li&gt;
&lt;li&gt;Assess drought risk for their county (wapimaji-mcp)&lt;/li&gt;
&lt;li&gt;Find parametric crop insurance that pays out automatically (bima-mcp)&lt;/li&gt;
&lt;li&gt;Check if their M-PESA history qualifies them for input loans (mkopo-mcp)&lt;/li&gt;
&lt;li&gt;Verify their reputation score if selling through an aggregator (sifa-mcp)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's five coordination problems solved in a single agent session. Previously, solving any one of them required navigating multiple institutions, phone calls, and days of waiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;The second layer is execution: tools that don't just provide information but actually trigger actions — STK Push payments, insurance policy enrollment, credit applications. Some of that already exists in mpesa-mcp. The rest is coming.&lt;/p&gt;

&lt;p&gt;The goal isn't an app. It's infrastructure. Apps are built on top; they can be Swahili-native, SMS-delivered, USSD-based, or voice-first. The coordination layer stays constant.&lt;/p&gt;

&lt;p&gt;All seven servers are live on PyPI. All are indexed on the Glama MCP directory. All are MIT-licensed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;mpesa-mcp bima-mcp mkopo-mcp soko-mcp sifa-mcp kazi-mcp wapimaji-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>mcp</category>
      <category>africa</category>
      <category>coordination</category>
      <category>fintech</category>
    </item>
  </channel>
</rss>
