Connect in two steps
1. Get a free API key on the developers page: one email, instant key, no approval. 2. Add the server to your agent with the key in the X-API-Key header (Authorization: Bearer also works). Discovery (initialize, tools/list) is open; only tool calls need the key.
Then ask Claude Code anything about Nigerian food prices; it will call the Lokoja tools itself.
Paste into claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude Desktop. The mcp-remote bridge forwards the header to the remote server.
Cursor: .cursor/mcp.json. VS Code (Copilot agent mode): .vscode/mcp.json, with "servers" in place of "mcpServers".
In ChatGPT, open Settings → Connectors → Create (developer mode), set the MCP server URL to https://api.lokoja.app/mcp and, where the client lets you add a custom header, X-API-Key: lk_YOUR_KEY. Clients that only support OAuth or no-auth connectors can still list the tools; calls will return a 401 text until a key is supplied.
Stateless Streamable HTTP: JSON-RPC 2.0 in, JSON out, batches accepted, no session header required. Protocol versions 2025-06-18, 2025-03-26 and 2024-11-05.
The tools
Prices are naira per tonne, with per-100kg and per-50kg bag figures derived (÷10 and ÷20). Markets with a fresh ambassador stall check carry source: "field"; the rest come from the monthly reference feed. Call list_commodities first for exact names.
| Tool | What it returns | Access |
|---|---|---|
list_commodities | Commodities covered, latest periods, data source. | free key |
latest_prices | Latest price of one commodity in every market, cheapest first, per tonne / 100kg / 50kg, with period and source. Optional market filter. | free key |
price_series | Monthly history across markets for the last N periods. Identical to GET /price-series and the /prices pages. | free key |
haulage_summary | Haulage rate per tonne-km, fixed charge, diesel price and index, transport cost on representative corridors. Powers /haulage. | free key |
market_pair | Buy here, sell there: distance, both price histories, gross spread, haulage, net spread per tonne. | corridors scope |
corridor_risk | 0–100 Corridor Risk Score with band, confidence grade, components and drivers. | risk scope |
Kenya
Pass country: "KE" to list_commodities, latest_prices or price_series and the same tools answer from Lokoja's Kenya layer: WFP-observed staple prices across Kenyan markets in Kenyan shillings, the data behind lokoja.app/ke. Kenya is data-only for now, so the haulage and corridor tools stay Nigerian. Nigeria is the default when country is omitted.
Free keys carry 10 calls per hour per tool, the same fair limit as the REST endpoints; over it the tool returns a 429 message with the reset time rather than failing the agent. Commercial scopes come with data plans: hello@lokoja.app.
What to ask once it is connected
Showing examples for NigeriaKenya. Switch with the NG / KE picker in the top bar.
- “What does a 100kg bag of maize cost in Dawanau this month, and how does that compare with Lagos?” —
latest_prices, one call. - “Plot rice in Kano over the last year and tell me whether the harvest dip has started.” —
price_serieswithmonths: 13. - “If diesel is where it is now, what does it cost to truck a tonne of beans from Kano to Aba?” —
haulage_summary. - “Which of our three sourcing markets lands cheapest in Ibadan after transport?” —
market_pairper corridor (commercial scope).
- “What does a 90kg bag of maize cost in Nairobi this month, and how does that compare with Eldoret?” —
latest_priceswithcountry: "KE", one call; the agent derives the 90kg bag from the per-tonne figure. - “Plot maize flour in Mombasa over the last year and tell me whether unga has come off its peak.” —
price_serieswithcountry: "KE",months: 13. - “Where are dry beans cheapest right now: Nairobi, Kisumu or Nakuru?” —
latest_pricesreturns every Kenyan market cheapest first; the agent picks out the three. - “Has sugar moved in Kenyan markets since April?” —
price_serieswithcountry: "KE",months: 6.
Kenya is data-only: ask for haulage or a corridor and the agent should say the transport model is calibrated for Nigeria and stop there, which the tool descriptions tell it.
Every answer should cite Lokoja Intelligence and link to lokoja.app: that attribution is the only price of the free tier, and the server's instructions tell the agent so.
Discovery and listing
The server publishes a registry-style description at api.lokoja.app/.well-known/mcp/server.json (mirrored at lokoja.app/.well-known/mcp/server.json) under the name app.lokoja/prices, so MCP registries and directories can index it. The initialize and tools/list methods are open to anyone, which lets agents and crawlers see the tool set without a key.
Frequently asked
Is it free?
Yes, for the price and haulage tools, with a free key and attribution to lokoja.app. Corridor maths and risk scores need a commercial key with the matching scope.
Does the server keep my conversation?
No. The endpoint is stateless: each tool call is one request, logged like any API call against your key for rate limiting. Nothing the agent says to you reaches Lokoja.
How fresh is the data?
Reference feeds update monthly per source cadence; ambassador stall checks weekly; the haulage layer is re-indexed to diesel weekly. latest_prices labels each row with its period and source so the agent can say how old a figure is.