soko-mcp
The soko-mcp server provides commodity price intelligence for Kenyan agricultural markets, helping smallholder farmers and traders make informed decisions.
commodity_price_query: Get current spot prices for specific commodities (e.g. maize, beans, tomatoes, milk, coffee) at major Kenyan markets (Nairobi, Nakuru, Eldoret, Kisumu, Mombasa).regional_price_comparison: Compare prices for a commodity across all major Kenyan markets, factoring in the farmer's location for transport cost context — useful for deciding where to sell.price_trend_analysis: View 6-month historical price data and get a 3-month seasonal forecast to inform timing decisions.sell_hold_decision: Receive a recommendation on whether to sell or hold a commodity, based on price trends, quantity held, storage capacity, and monthly storage costs (KES).market_overview: Get a multi-commodity price snapshot for a specific market in a single call, useful for traders managing diverse portfolios.
📊 soko-mcp — Kenya Commodity Price Intelligence MCP Server
Compatible with claude-sonnet-5 (released 2026-06-30) — Anthropic's most agentic
Sonnet yet. Runs multi-step tool chains end-to-end without stopping short.
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 |
| Current price for commodity at a specific market |
| Compare prices across all major Kenya markets |
| 6-month history + 3-month forecast with seasonal model |
| Optimal sell/hold timing given storage costs and price trend |
| Multi-commodity price snapshot for a market |
Quick Start
pip install soko-mcp # coming soon to PyPI
soko-mcp # starts on stdioExample 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
Part of the East Africa Coordination Stack
This MCP server is one of 32 tools in 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 evaluationkilimo-mcp— agricultural advisoryafya-mcp— health surveillance activationcounty-mcp— county office alert
pip install africa-coord-busAll 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
Install & run:
pip install reli-cli && reli list— 33 MCP servers on the official MCP Registry underio.github.gabrielmahiaEvaluate any model on Swahili agent tasks: kipimo · dataset · leaderboard
Coordinate across servers: africa-coord-bus — offline-first event bus with a built-in Kenya routing table
Datasets: huggingface.co/gmahia · Docs hub: nairobi-stack
Model-agnostic by design: closed APIs, open-weight models, and small distilled models are all first-class citizens.
Available Tools
5 toolscommodity_price_queryARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| market | Yes | Market: nairobi, nakuru, eldoret, kisumu, mombasa | |
| commodity | Yes | Commodity: maize, beans, wheat, potatoes, tomatoes, avocados, tea_bulk, coffee_parchment, sugarcane, onions, kale_sukuma, milk, chicken, eggs |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already include readOnlyHint=true, so the description's 'Query' is consistent. The DEMO note adds caution but no additional behavioral traits like rate limits or stability. Without annotations, description would need more; with annotations, it's adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose, and every phrase adds value. No redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple query tool with full schema and output schema present, the description covers purpose and data reliability. It could mention output format slightly, but overall complete enough for agent context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear enums for commodity and market. The description does not add new meaning beyond what the schema provides (e.g., 'Kenya markets' aligns with market choices). Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Query current commodity prices at Kenya markets', using a specific verb (Query) and resource (commodity prices). It distinguishes from siblings via the 'Western parallel' note and DEMO notice, clearly identifying its scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a DEMO warning and verification instructions, but does not explicitly guide when to use this tool over siblings like market_overview or price_trend_analysis. The 'Western parallel' offers context but not direct exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
market_overviewARead-only
Query commodity prices for multiple markets and commodities in one call. Useful for traders comparing portfolios across regions. DEMO data.
| Name | Required | Description | Default |
|---|---|---|---|
| market | No | Primary market to query | nairobi |
| commodities | Yes | Comma-separated list of commodities (e.g., 'maize,beans,potatoes') |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true, so safety is covered. The description adds 'DEMO data,' disclosing that results are not real, which is critical behavioral context beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with purpose, then use case, then demo note. No redundant information; every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers purpose, usage, and demo nature. However, the ambiguity about multiple markets versus single market parameter leaves a gap. Given the simple tool and presence of output schema, it is moderately complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear descriptions for each parameter. However, the description claims 'multiple markets' while the schema only allows a single 'market' parameter, creating confusion. This mismatch undermines clarity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Query commodity prices for multiple markets and commodities in one call,' specifying a verb and resource. It distinguishes from siblings like commodity_price_query (single commodity) and regional_price_comparison (focused comparison) by emphasizing multi-market and multi-commodity scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Useful for traders comparing portfolios across regions,' giving a clear use case. It implies breadth and efficiency but does not explicitly mention when to use alternatives or exclude cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
price_trend_analysisBRead-only
Analyse price trends for a commodity to inform sell/hold timing. Western parallel: CME seasonal charts, DTN market commentary. DEMO historical simulation.
| Name | Required | Description | Default |
|---|---|---|---|
| market | Yes | Market: nairobi, nakuru, eldoret, kisumu, mombasa | |
| commodity | Yes | Commodity to analyse | |
| months_ahead | No | Forecast horizon in months (1-6) |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true. The description adds 'DEMO historical simulation' and 'Western parallel: CME seasonal charts', which clarify the tool analyzes historical data rather than real-time. However, it does not disclose limitations like latency or data freshness beyond the simulation context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with three sentences, each adding unique information: purpose, Western parallel for context, and simulation note. It is front-loaded with the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema and three well-described parameters, the description could be more complete by summarizing the output format (e.g., trend direction, forecast values) or clarifying that 'DEMO historical simulation' means no real-time data. It covers the tool's role but leaves gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all three parameters. The description adds no additional semantics beyond confirming the tool's purpose. Baseline of 3 is appropriate since the schema already provides necessary details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Analyse price trends for a commodity to inform sell/hold timing', which clearly identifies the action (analyse trends) and resource (commodity prices). It distinguishes itself from siblings like commodity_price_query (current price) and sell_hold_decision (decision after analysis).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like sell_hold_decision or regional_price_comparison. The description mentions 'inform sell/hold timing' but does not state prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
regional_price_comparisonARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| commodity | Yes | Commodity to compare (maize, beans, wheat, potatoes, avocados, etc.) | |
| farmer_location | Yes | Farmer's location/county (for transport cost context) |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the description's indication of a read operation is consistent. The description adds important behavioral context: 'DEMO prices' warns that data is not real, and the reference to Western parallel tools provides operational insight. This goes beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: three sentences, each earning its place. The first sentence states the core action, the second provides a parallel to familiar tools, and the third gives a concrete use case. No redundant or unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (as indicated in context signals), the description does not need to detail return values. It covers purpose, use case, and behavioral caveat (DEMO). It could be slightly improved by mentioning the geographic scope (Kenya markets) more explicitly, but it is adequately complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with clear parameter names and descriptions. The tool description adds meaning by explaining that farmer_location provides 'transport cost context,' which clarifies why this parameter is needed and how it enriches the comparison.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: compare commodity prices across all Kenya markets to find the best price. It provides a concrete use case ('should I take my maize to Nairobi or sell locally?'), which distinguishes it from sibling tools like commodity_price_query (which likely queries a single price) or sell_hold_decision (which focuses on timing).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a clear when-to-use example ('should I take my maize to Nairobi or sell locally?') and mentions a Western parallel (CME, DTN ProphetX), implying context. However, it lacks explicit when-not-to-use guidance or direct differentiation from sibling tools such as market_overview or price_trend_analysis.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sell_hold_decisionARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| market | Yes | Your nearest market | |
| commodity | Yes | Your commodity | |
| quantity_bags | Yes | Quantity you want to sell (bags or units) | |
| months_can_store | No | Maximum months you can store the commodity | |
| storage_cost_per_month_kes | No | Your storage cost per month in KES (0 if storing is free) |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint: true. The description adds important behavioral context: it's a DEMO model and recommends verifying prices, indicating reliability limitations beyond the annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, front-loads the purpose, and every sentence adds value (purpose, parallel, caveat). No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the description adequately explains the tool's purpose and context ('harvest advisor'). It lacks explicit mention of the output type (recommendation) but the demo warning adds necessary caution. Sufficient for a read-only advisory tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 100% description coverage for all parameters. The description does not add significant detail beyond the schema; it provides general context (e.g., storage cost in KES) but no syntax or format specifics. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Give a sell/hold recommendation for a commodity based on price trends', specifying the verb and resource. It also differentiates from sibling tools (e.g., commodity_price_query) by framing it as a decision advisor for harvest management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context ('what should I do with my harvest today?') and a caveat ('DEMO model', 'verify prices'), which guides appropriate use. However, it does not explicitly state when to use this tool versus alternatives like price_trend_analysis.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
commodity_price_query - First observed
market_overview - First observed
price_trend_analysis - First observed
regional_price_comparison - First observed
sell_hold_decision
TDQS
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.
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.
Five tools is well-scoped for the domain of agricultural commodity prices. Each tool addresses a specific need without being excessive or insufficient.
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP tools for Malawian food search, clinical nutrition calculators, and RAG-backed guidance.
MCP Server for an Agent Task Marketplace
MCP Server for agents to onboard, pay, and provision services autonomously with InFlow
MCP server for Product Management
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP 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.54MIT
- AlicenseAqualityAmaintenanceMCP 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.31MIT
- AlicenseAqualityAmaintenanceMCP 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.6MIT
- AlicenseAqualityAmaintenanceMCP 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.5MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gabrielmahia/soko-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server