tracy040401
MCP Servertracy040401public

mcp_agribalyse

MCP Server of Agribalyse API

Repository Info

1
Stars
0
Forks
1
Watchers
0
Issues
Python
Language
-
License

About This Server

MCP Server of Agribalyse API

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

mcp-server-agribalyse

🌿 A Model Context Protocol (MCP) server for querying the ADEME Agribalyse 3.1 dataset.

This MCP server provides tools and resources to interact with the Agribalyse public API, enabling Large Language Models to retrieve and analyze environmental impact data on food products.

⚠️ Note: This server is based on the FastMCP framework and is actively maintained. API coverage may evolve.


🚀 Overview

Agribalyse is a dataset published by ADEME, offering environmental indicators (climate impact, water use, ecotoxicity, etc.) for thousands of food products.

This MCP server allows LLMs to:

  • Search food product data.
  • Aggregate environmental metrics.
  • List possible filter values.
  • Understand dataset structure.

🧰 Tools

Tool NameDescription
read_linesQuery rows from the Agribalyse dataset
get_valuesGet distinct values for a given text field
get_metric_aggCompute a single metric (avg, min, etc.) on a numeric field
get_simple_metrics_aggCompute metrics on one or more fields at once
get_words_aggRetrieve most frequent tokens in a text field
read_schemaGet the complete column schema of the dataset
read_safe_schemaGet a reduced version of the column schema
read_api_docsFetch the full OpenAPI specification from the ADEME API

📚 Resources

URIDescription
agribalyse://fieldsList of allowed text fields for querying
agribalyse://filesAvailable data files published by ADEME
agribalyse://sample-linesA sample of dataset rows
agribalyse://columns/sortablesFields that can be used for sorting
agribalyse://metrics/fieldsNumeric fields usable for aggregation
agribalyse://metrics/typesSupported metric types (avg, sum, percentiles, etc.)
agribalyse://fields/descriptionsHuman-readable descriptions of each dataset column

💬 Prompts

This server also includes predefined prompts for easier interaction:

  • search_product: Ask for environmental info about a named product
  • ask_stat: Ask for a specific metric on an indicator
  • compare_products: Compare two products by one indicator
  • list_field_values: List possible values of a given field
  • sample_prompt: Ask to preview sample data
  • explain_indicator: Ask for an explanation of an indicator
  • custom_query_prompt: Prompt chain for guided query refinement

🧪 Debugging

You can inspect server behavior using:

npx @modelcontextprotocol/inspector uvx run src/agribalyse/server.py

Or follow logs using:

mcp dev server.py

🧑‍💻 Client Example

To test the MCP server using a client, an example client implementation using OpenAI is provided.

Run the client with:

python client/client.py

This will execute example prompts and display the server responses, allowing you to observe how the MCP server handles requests.

🧪 Running Tests

To run the test suite using pytest, make sure your virtual environment is activated and then run:

pytest tests/test_mcp_tools

This will execute all unit tests and validate the MCP tools integration.

👩‍💻 Maintainer

Author: Tracy André

Organization: Positive Solutions

Contact: tracy.andre@food-pilot.eu

Quick Start

1

Clone the repository

git clone https://github.com/tracy040401/mcp_agribalyse
2

Install dependencies

cd mcp_agribalyse
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownertracy040401
Repomcp_agribalyse
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation