Skip to main content
Glama

Agri Prices MCP: MCP Africa Master Class 2026

A teaching MCP server built live at the MCP Africa Symposium 2026 Master Class (The Cortex Hub, East London, 23 November 2026). It serves sample fresh-produce prices (ZAR/kg) for five South African markets, and grows over four stages, one branch each.

Branch

Stage

Master Class session

stage-1-basic-mcp

A simple MCP server with no auth: tools, a resource, a prompt

11:00 Build studio

stage-2-deploy-vercel

Deploy to Vercel, add health check and OpenTelemetry

13:15 Secure and host, 14:15 Operate and observe

stage-3-publish-registry

Publish to the Official MCP Registry with server.json and GitHub OIDC

13:15 Secure and host

stage-4-google-oauth

Sign in with Google, then rate limits, audit trail and usage billing per customer

15:15 Sell and price

Each branch builds on the one before it. main is the same as stage 1.

git clone https://github.com/AppimateSA/mcp-masterclass && cd mcp-masterclass
git checkout stage-1-basic-mcp   # or any stage
npm install
npm run dev                      # http://localhost:3000/api/mcp
npm run smoke                    # in a second terminal
npm run verify                   # checks the stage you have checked out, end to end

Running the whole demo on a new computer? Follow DEMO.md: every stage, in order, with what to show.

Sample data. Prices in lib/data/markets.ts are illustrative, not real market prices.


Stage 1: a simple MCP server (no auth)

Stack: Next.js App Router, mcp-handler v2, MCP TypeScript SDK v2 (@modelcontextprotocol/server), Zod v4. The server speaks the 2026-07-28 spec (stateless core) and still answers older clients.

Primitive

Who controls it

In this server

Tools

the model

list_markets, get_price, compare_markets

Resources

the application

markets://catalogue

Prompts

the user

weekly_price_brief

Files to read, in order:

  1. lib/data/markets.ts: the data boundary (swap in your own source here)

  2. lib/mcp/server.ts: tool, resource and prompt contracts (Zod schemas → JSON Schema)

  3. app/api/mcp/route.ts: the HTTP endpoint (about 10 lines)

Try it

npm run smoke                     # SDK client: lists everything, calls two tools
bash scripts/curl-demo.sh         # one raw JSON-RPC tools/call, no handshake
npm run inspector                 # MCP Inspector UI → connect to http://localhost:3000/api/mcp

Build-studio exercise

Pick your team's workflow (agriculture, health or finance). Replace the data file and add one tool, one resource and one prompt of your own. Keep every result carrying source and asOf.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      20-tool MCP server - production web-intelligence API gateway exposing 10 Website Intelligence + 7 Marketing APIs as 20 MCP tools over Streamable HTTP + stdio, with pay-per-call Solana USDC payments. 20 tools: URL-to-Markdown, metadata, technology detection, contact extraction, SEO audit, SSL, DNS, sitemaps, robots.txt, Google Maps reviews, AI company/website summaries, citation checking Cloud-host
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server providing guarded access to a B2B SaaS billing database (customers, subscriptions, invoices, credit notes) and live ECB exchange rates, with read-only tools and one capped, idempotent write for issuing credit notes.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to query and safely update a toy multi-tenant order list over Streamable HTTP, with bearer-token sign-in, server-side tenant scoping, read-only defaults, confirmed editor writes, audit logging, and per-user rate limits.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes a small fake marketplace over JSON-RPC/HTTP: clients can echo input, search a three-item catalog, call an item with validated arguments, and run cost-capped jobs whose results are fetched later via a server-minted job handle. It ships as two side-by-side servers, one on the official SDK and one hand-written against the 2026-07-28 revision, so the same request can be sent to each and compared.
      MIT