Clone the open-source agridata MCP server, install it locally, and connect Claude Desktop or another LLM client to run your first real query on Tunisia's open agricultural data.
Expected outcome
By the end of this guide, agridata MCP will be running on your
machine, your usual LLM client will be configured to call it, and
you will have run a first query that combines structured data and
documentary references. Estimated total time:
if Python and uv are
already installed; allow ten extra minutes otherwise.
Prerequisites
An MCP-compatible LLM client: Claude Desktop, Claude Code, VS Code, Cursor, Windsurf, Gemini CLI, or similar.
The uv package manager. Install with
curl -LsSf https://astral.sh/uv/install.sh | sh on
macOS / Linux, or
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
on Windows.
Full uv install docs.
An internet connection to clone the repository and reach catalog.agridata.tn at query time.
Step 1 — Clone and install
Pick a directory where you want the server to live and run:
bash
git clone https://github.com/tanitdata/agridata-mcp.git
cd agridata-mcp
uv sync
uv sync resolves and installs every dependency
declared in pyproject.toml. On a fresh checkout this
usually takes ten to twenty seconds.
Step 2 — Note the absolute path
The MCP client needs the absolute path to your clone directory.
Run pwd from inside agridata-mcp (or
cd + echo %CD% on Windows) and copy the
full path. You will paste it in the configuration snippets below
in place of /absolute/path/to/agridata-mcp.
Step 3 — Configure your LLM client
Pick the snippet for your client. The launch command is the same
everywhere; only the file format changes.
Most clients accept the same shape as Claude Desktop. Add the
snippet to the client's MCP settings file (consult the client's
own docs for the exact path):
claude mcp add tanitdata uv run --directory /absolute/path/to/agridata-mcp tanitdata
Step 4 — First test call
In your client, start a new conversation and ask:
"What tools are exposed by the tanitdata server?"
The client should display a list of tools provided by the server.
If that list appears, the connection works.
Step 5 — Your first real query
Try a question that combines numbers and documentary context:
"What is the production of durum wheat by governorate over the past
five years, and how does it compare to the objectives of the national
plan?"
The server responds with the matching data and, for each result,
points to the source resource on
agridata.tn.
You can follow the link to verify the source directly on the portal.
Troubleshooting
The client reports the server cannot be found.
Verify that the path in the configuration is absolute (not
relative) and points to the directory that contains
pyproject.toml. A common mistake on Windows is using
forward slashes only — both forward and backslashes work in JSON
if escaped.
uv: command not found in the client logs.
The client launches uv as a subprocess and inherits
a limited environment that may not include uv's install path.
Use the absolute path to the uv binary in the
configuration (find it with which uv on macOS / Linux
or where uv on Windows).
You want to verify the server runs at all before wiring
it to a client. From the clone directory, run:
bash
uv run mcp dev src/tanitdata/server.py
The MCP Inspector opens in your browser and lets you call tools
without an LLM client.
What's next
Once the server is running on the client side, browse the
research index for more advanced use
cases. To share feedback, file a bug, or propose a collaboration,
the GitHub
repository and the Get Involved
page are the entry points.
Frequently asked questions
Why does the server run locally rather than on a hosted endpoint?
agridata MCP follows the standard MCP architecture: the server runs as a local process called by the LLM client over stdio. This is how most MCP servers in the ecosystem operate. It removes operational dependencies, simplifies authentication (none is needed — the data is open), and gives users full control over the environment. The trade-off is a one-time local install.
Which MCP clients are supported?
All clients implementing the standard MCP protocol: Claude Desktop, Claude Code, VS Code with an MCP extension, Cursor, Windsurf, Gemini CLI, and others. The configuration format differs slightly between clients; the launch command is the same.
What is uv and why use it?
uv is a fast Python package manager from Astral. It resolves and installs dependencies in seconds and handles virtual environments transparently. The agridata server uses uv as its declared runtime; using pip is possible but no longer the recommended path.
Is the data freely reusable?
Yes. The data comes from the public agridata.tn portal and is published under the Licence Nationale de Données Publiques Ouvertes (LNDPO). Any reuse consistent with the LNDPO is permitted; attribution to the portal is required.
Where do I report a bug or request a dataset?
Open an issue on https://github.com/tanitdata/agridata-mcp or write to contact@tanitdata.org.