agridata-mcp: A Local MCP Server for Conversational Access to Tunisia's Agricultural Open Data
Domain:
agriculture
Record type:
software
Creator:
Gas
Publisher:
Host:
agridata-mcp is a Model Context Protocol (MCP) server that makes Tunisia's agricultural open data portal (catalog.agridata.tn) directly queryable by large-language-model clients running locally. The portal publishes over a thousand datasets through a CKAN instance, but the data is hard to use: fields are uniformly text-typed, metadata is inconsistent and French/Arabic-dominant, and the catalog's structure is opaque to anyone who does not already know it.
This technical report documents the system as it ships today — a source-distributed, local stdio server. It exposes eight tools (six general-purpose and two domain-specific) over a live CKAN API proxy, backed by a two-layer schema registry and a semantic layer that bridges how users phrase questions and how the underlying tables are actually structured.
The report gives the rationale behind the system's principal design decisions — the pivot to a foundation-tool pattern, the semantic layer, the reverted local-snapshot data layer, the dormant-by-default authentication path, and the deferred document-RAG pipeline — and states the limitations of the running system candidly, including its single hard dependency on an upstream portal that has at times been unavailable.
Software: distributed as the "tanitdata" Python package from the agridata-mcp repository (tanitdata/agridata-mcp). Published by tanitdata, Tunis.