Skip to main content
Glama

📊 soko-mcp — Kenya Commodity Price Intelligence MCP Server

soko-mcp Glama score

Install: pip install soko-mcp · Use with any MCP client.

A farmer deciding whether to sell or hold needs current prices across multiple markets simultaneously. That comparison exists nowhere as a single queryable source.

Soko = market in Swahili.

A farmer in Nakuru doesn't know that maize prices in Nairobi are 40% higher that week. Traders know. Farmers don't. This information asymmetry is one of the most costly structural disadvantages facing smallholder farmers. soko-mcp closes it.

The Structural Problem

In mature commodity markets, price discovery is instantaneous — futures markets, satellite price tickers, and SMS alerts exist for every major exchange. A grain elevator in Iowa checks live CME prices before making any offer.

In Kenya, most smallholder farmers receive the price the trader offers, with no independent benchmark to compare against. The result: systematic underpricing at harvest, systematic overpricing at planting.

Information asymmetry is a tax on the poor.

Related MCP server: wapimaji-mcp

Tools

Tool

What it does

commodity_price_query

Current price for commodity at a specific market

regional_price_comparison

Compare prices across all major Kenya markets

price_trend_analysis

6-month history + 3-month forecast with seasonal model

sell_hold_decision

Optimal sell/hold timing given storage costs and price trend

market_overview

Multi-commodity price snapshot for a market

food_market_prices

Latest WFP market prices in Kenya for a commodity, via HDX HAPI

Quick Start

pip install soko-mcp       # coming soon to PyPI
soko-mcp                   # starts on stdio

Example Queries for Claude

"What is the current Nairobi maize price?"
"Should I sell my 50 bags of beans now or wait 2 months?"
"Compare potato prices across all Kenya markets"
"Give me a price trend for avocados in Nakuru for the next 3 months"

Research Basis

  • EAGC East Africa Regional Market Monitor

  • World Bank "Information and Communication Technology and Agricultural Markets" (2016)

  • Suri & Jack "Mobile Phones and Agricultural Performance" (2016)

⚠️ DEMO data — synthetic seasonal model. Verify at eagc.org, kalro.org, or local market boards.


© 2026 Gabriel Mahia / AI Kung Fu LLC · MIT License

Live data

  • food_market_prices: the latest WFP-monitored market prices in Kenya for a commodity, optionally by county, via HDX HAPI (WFP data CC BY-IGO).

Each live answer names its source, attribution and retrieval time; if a service does not answer, the tool returns an error instead of a number. The other tools are unchanged.

Part of the East Africa Coordination Stack

This MCP server is part of the Kenya coordination infrastructure. It connects to africa-coord-bus — the coordination event bus that routes signals between domains automatically.

When this server detects a threshold condition, the bus notifies:

  • bima-mcp — parametric insurance evaluation

  • kilimo-mcp — agricultural advisory

  • afya-mcp — health surveillance activation

  • county-mcp — county office alert

pip install africa-coord-bus

All servers: pypi.org/user/gmahia

IP & Collaboration

MIT licensed. Feedback via GitHub Issues only — pull requests are not accepted. Demo data is labeled DEMO and is not suitable for operational decisions. Full policy: docs/architecture/IP_POLICY.md. Security reports: see SECURITY.md.

Part of the East Africa coordination stack

Model-agnostic by design: closed APIs, open-weight models, and small distilled models are all first-class citizens.

Available Tools

5 tools
commodity_price_queryA
Read-only

Query current commodity prices at Kenya markets. Western parallel: CME Group spot price query, USDA Agricultural Marketing Service. DEMO prices — verify at eagc.org or county market boards.

Inputs: market (required), commodity (required). Returns: object

market_overviewA
Read-only

Query commodity prices for multiple markets and commodities in one call. Useful for traders comparing portfolios across regions. DEMO data.

Inputs: commodities (required), market. Returns: object

price_trend_analysisB
Read-only

Analyse price trends for a commodity to inform sell/hold timing. Western parallel: CME seasonal charts, DTN market commentary. DEMO historical simulation.

Inputs: market (required), commodity (required), months_ahead. Returns: object

regional_price_comparisonA
Read-only

Compare commodity prices across all Kenya markets to find the best price. Western parallel: CME regional basis reports, DTN ProphetX. This is the 'should I take my maize to Nairobi or sell locally?' tool. DEMO prices.

Inputs: commodity (required), farmer_location (required). Returns: object

sell_hold_decisionA
Read-only

Give a sell/hold recommendation for a commodity based on price trends. Western parallel: CME basis trading decision tools, grain elevator advisory. This is the 'what should I do with my harvest today?' AI advisor. DEMO model — always verify prices before acting.

Inputs: market (required), commodity (required), quantity_bags (required), months_can_store, +1 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 5 tools

    Disambiguation4/5

    Tools have distinct purposes: single price query, multi-market overview, trend analysis, regional comparison, and sell/hold decision. Minor potential overlap between commodity_price_query and market_overview but descriptions clarify the scope difference.

    Naming Consistency4/5

    All names use snake_case and are descriptive, but patterns vary slightly: some end with a verb (query, comparison) while others end with nouns (overview, analysis, decision). Still, naming is consistent and clear.

    Tool Count5/5

    Five tools is well-scoped for the domain of agricultural commodity prices. Each tool addresses a specific need without being excessive or insufficient.

    Completeness4/5

    The tool set covers core query, overview, trend analysis, comparison, and decision support. Missing an explicit tool to list available commodities or markets, but parameters can be inferred. Minor gap.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      MCP server for East African fintech APIs — trigger M-Pesa STK Push payments, check transaction status, send SMS to 20+ African networks, and top up airtime via Africa's Talking.
      5
      141 PyPI
      6
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server exposing Kenya NDMA drought phase classifications across all 47 counties, with tools for structured data access and SMS-based alerting via Africa’s Talking.
      3
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for portable reputation and skills passports in East Africa — worker profiles, verified service records, trust scores, and professional references for economic mobility. 6 tools.
      6
      71 PyPI
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for alternative credit scoring in Kenya — builds a 300–850 score from M-PESA behavioral signals for adults with no formal credit history. 5 tools.
      5
      72 PyPI
      MIT