MCP server for Tunisia's agricultural open data portal (agridata.tn)
# agridata-mcp
An AI-powered MCP server that turns Tunisia's agricultural open data portal (agridata.tn) into a conversational data source. MCP (Model Context Protocol) lets AI assistants call external tools — connect your AI client and start asking questions in natural language.
The portal covers climate, crops, fisheries, water resources, livestock, prices, trade, and more. agridata-mcp handles querying structured DataStore tables and bibliographic catalogs so researchers can access both through conversation.
Built for researchers, data scientists, agricultural policy analysts, and journalists covering food security in Tunisia and North Africa.
> agridata-mcp is distributed as the `tanitdata` Python package (the installed command and module are named `tanitdata`); the project is published by the tanitdata studio.
*Example: agridata-mcp returning a per-delegation rainfed-vs-irrigated cereal yield breakdown for the 2022/2023 campaign in Kairouan, sourced from CRDA Kairouan via catalog.agridata.tn.*
---
## Getting Started
agridata-mcp runs locally as a stdio MCP server. Clone the repo, install dependencies, and point your MCP client at the local process.
### Prerequisites
- Python 3.11+
- uv package manager
### Install and run
```bash
git clone
github.com
cd agridata-mcp
uv sync
uv run tanitdata # starts stdio server
```
### Connect to Claude Desktop
Add to your config (`%APPDATA%\Claude\claude_desktop_config.json` on Windows, `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
```json
{
"mcpServers": {
"agridata-mcp": {
"command": "uv",
"args": ["run", "--directory", "/path/to/agridata-mcp", "tanitdata"]
}
}
}
```
### Test with MCP Inspector
```bash
uv run mcp dev src/tanitdata/server.py
```
### Run unit tests
```bash
uv run pytest tests/
```
---
## Docker
```bash
docker build -t agridata-mcp .
docker run -p 8000:8000 agridata-mcp
```
The container runs in `streamable-h …