NutriClarity MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NutriClarity MCPcompare nutrition of 3017620422003 and 5000112541234"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NutriClarity MCP 🥗
An open-source Model Context Protocol server that gives any LLM access to food nutrition data — look up products by barcode, search by name, read Nutri-Score / NOVA / Eco-Score ratings, and compare products side by side.
Powered by Open Food Facts, a free, open, crowd-sourced food products database. No API key required.
Tools
Tool | Description |
| Full nutrition facts, scores, allergens & ingredients for a barcode (EAN/UPC). |
| Search products by name or brand; returns barcodes + a nutrition summary. |
| Nutri-Score (A–E), NOVA processing group (1–4), and Eco-Score for a product. |
| Side-by-side per-100g comparison table for 2+ products. |
| Suggest same-category products with a better Nutri-Score. |
| Optional / opt-in. Create or edit a product. Only enabled when credentials are set (see below). |
Reading needs no API key or account — it's open data. Only the optional write tool requires an Open Food Facts login.
Related MCP server: Open Food Facts MCP Server
Quick start
The easiest way to run it is with uvx (no install, no clone):
uvx nutriclarity-mcpClaude Desktop / Cursor / any MCP client
Add this to your MCP config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"nutriclarity": {
"command": "uvx",
"args": ["nutriclarity-mcp"]
}
}
}Then ask things like:
"What's the nutrition of barcode 3017620422003?"
"Search for oat milk and show me the healthiest option."
"Compare Coke and Pepsi nutrition."
Docker
docker run -i --rm ghcr.io/nitishkp001/nutriclarity-mcpMCP config:
{
"mcpServers": {
"nutriclarity": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/nitishkp001/nutriclarity-mcp"]
}
}
}Optional: write support (adding/editing products)
By default the server is read-only — no account, no risk. If you want the LLM
to be able to contribute or correct product data, enable the add_or_update_product
tool by providing an Open Food Facts account:
Env var | Description |
| Your account username (not your email). Enables writes when set with the password. |
| Your account password. |
|
|
Writes go to the sandbox by default, so you can
test safely without touching the real database. Set OFF_ENVIRONMENT=production only
when you deliberately want to edit the live, public database. Sandbox accounts are
separate from production accounts — register on each site you target.
{
"mcpServers": {
"nutriclarity": {
"command": "uvx",
"args": ["nutriclarity-mcp"],
"env": {
"OFF_USERNAME": "your-username",
"OFF_PASSWORD": "your-password",
"OFF_ENVIRONMENT": "sandbox"
}
}
}
}⚠️ Open Food Facts is a shared, public database used by millions. If you enable production writes, make sure the data you submit is accurate and taken from the real product label. The tool changes only the fields you pass.
Local development
Requires uv.
git clone https://github.com/nitishkp001/nutriclarity-mcp
cd nutriclarity-mcp
uv sync --extra dev # install deps
uv run nutriclarity-mcp # run the server over stdio
uv run pytest # run tests
uv run ruff check . # lintTo inspect the tools interactively, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv run nutriclarity-mcpHow it works
Built with FastMCP.
Calls the Open Food Facts REST API (
/api/v2/product/{barcode}and/cgi/search.pl).Sends a descriptive
User-Agentas Open Food Facts requests, and asks only for the fields it needs to keep responses small.
Data & attribution
Product data comes from Open Food Facts and is made available under the Open Database License (ODbL). Individual contents are under the Database Contents License. Nutrition data is crowd-sourced and may be incomplete or inaccurate — do not rely on it for medical decisions.
License
MIT © 2026 — see LICENSE. This project is not affiliated with or endorsed by Open Food Facts.
Available Tools
5 toolscompare_productsA
Compare the nutrition of two or more products side by side.
| Name | Required | Description | Default |
|---|---|---|---|
| barcodes | Yes | A list of 2+ product barcodes (digits only). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It only says 'compare nutrition side by side' without explaining the result format, whether data is fetched per product, or any side effects. The output schema exists but is not included.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, 11 words, front-loaded with purpose. Every word earns its place; no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and an output schema, the description suffices for basic understanding. However, it omits behavioral details and usage context, which would be helpful but not critical given the low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the parameter description is already in the schema. The tool description adds no extra meaning beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool compares nutrition of products side by side, which distinguishes it from sibling tools like find_healthier_alternative (finding a single healthier option) or get_product_by_barcode (single product details). It uses a specific verb and resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use versus alternatives, but the purpose implies usage for comparing multiple products. The description does not mention exclusions or prerequisites, such as requiring at least two barcodes (though the schema enforces this).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_healthier_alternativeA
Suggest healthier products in the same category as the given product.
Looks up the product, then searches its category for items with a better (lower) Nutri-Score, returning the healthiest matches first.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of alternatives to return (1-10, default 5). | |
| barcode | Yes | The product barcode, digits only. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the key behavior: looking up product, searching category for lower Nutri-Score, and returning healthiest first. It does not mention error handling or edge cases, but the core algorithm is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: a clear purpose statement followed by a brief process explanation. No wasted words; front-loaded with the most important information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, 100% schema coverage, output schema present), the description covers core functionality and algorithm. It lacks edge case details but is adequate for selecting and invoking the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with both parameters documented. The description adds no additional meaning beyond the schema, meeting the baseline of 3. It does not explain barcode format beyond 'digits' or limit semantics beyond max number.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Suggest healthier products in the same category as the given product', specifying a specific verb (suggest) and resource (healthier products). It distinguishes itself from sibling tools like compare_products and search_products by focusing on health-based alternatives within a category.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when a user wants healthier alternatives but lacks explicit guidance on when not to use this tool or alternatives. It mentions the lookup process but does not compare with siblings or specify prerequisites like product existence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_nutrition_scoresA
Get the Nutri-Score, NOVA processing group and Eco-Score for a product.
| Name | Required | Description | Default |
|---|---|---|---|
| barcode | Yes | The product barcode, digits only. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It states the tool 'gets' scores but does not disclose behavioral traits such as read-only nature, authentication requirements, rate limits, or error handling. The minimal description assumes a straightforward retrieval without explaining side effects or constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with purpose, no redundant words. Every element earns its place. Ideal conciseness for a simple retrieval tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one required parameter and an existing output schema, the description is sufficiently complete. It enumerates the specific scores returned, which is adequate for agent decision-making. Minor improvement could be minor usage context, but overall high completeness given tool simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides a description for the single parameter 'barcode' ('The product barcode, digits only.'), achieving 100% coverage. The tool description adds no further meaning, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the verb 'Get' and specifies exactly which scores (Nutri-Score, NOVA processing group, Eco-Score) are retrieved. This differentiates from sibling tools like get_product_by_barcode which returns broader product info, and compare_products/find_healthier_alternative which involve cross-product logic.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use vs alternatives. However, the tool's narrow focus on three specific scores implicitly directs use when only those scores are needed. Given the simplicity of the tool (single parameter), the lack of explicit context is acceptable but leaves room for improvement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_product_by_barcodeA
Get full nutrition facts for a food product by its barcode (EAN/UPC).
| Name | Required | Description | Default |
|---|---|---|---|
| barcode | Yes | The product barcode, digits only (e.g. "3017620422003"). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only states the purpose and does not disclose behavioral traits such as read-only nature, error handling (e.g., missing barcode), or rate limits. This is insufficient for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, straightforward sentence of 13 words. It front-loads the purpose and includes no extraneous information. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (so return values need not be described) and a single parameter with full schema coverage, the description is adequate but not complete. It lacks information about error cases (e.g., barcode not found) or any behavioral context. For a simple lookup, it is minimally sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%—the parameter 'barcode' already has a clear description with format and example. The tool description adds 'full nutrition facts' but that relates to the overall output, not the parameter semantics. Therefore, it adds no additional meaning beyond the schema, meeting the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'full nutrition facts for a food product', and specifies the method 'by its barcode (EAN/UPC)'. This distinguishes it from sibling tools like search_products (search by text) or compare_products (comparison).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when you have a barcode and want nutrition facts, but it does not provide explicit guidance on when to use this tool versus alternatives (e.g., search_products for name-based lookup). No when-not or exclusion criteria are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_productsB
Search food products by name or brand.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Free-text search, e.g. "nutella" or "oat milk". | |
| page_size | No | Number of results to return (1-25, default 5). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description does not disclose behavioral traits such as read-only/read-write, rate limits, or result sorting, leaving gaps for the agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with verb and resource, no extraneous content—efficient and to the point.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool is a simple search with two well-documented parameters and an output schema, the description is functional but lacks behavioral and usage context that would fully support autonomous agent decision-making.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage with clear param descriptions (including examples and defaults); the tool description adds no additional semantic value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool searches food products by name or brand, which distinguishes it from sibling tools like 'compare_products' or 'get_product_by_barcode'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives; the description simply states the action without mentioning exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.3.0- First observed
compare_products - First observed
find_healthier_alternative - First observed
get_nutrition_scores - First observed
get_product_by_barcode - First observed
search_products
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: search, get product details, get scores, compare, and find alternatives. No overlaps.
All tools follow a consistent verb_noun pattern with snake_case, e.g., search_products, get_product_by_barcode.
5 tools are well-scoped for a nutrition-focused server, covering core tasks without being excessive or sparse.
The tool surface covers search, retrieval, comparison, and recommendation. Missing batch operations or category listing, but core workflows are covered.
Maintenance
Related MCP Connectors
Unlock the power of food transparency with our Open Food Facts MCP server. Easily look up any food
USDA FoodData Central nutrient lookup, FDA recall watch, EU FMCG labelling via remote MCP
Nutrition MCP — wraps Open Food Facts API (free, no auth)
Food and nutrition data: search, macros, and comparisons
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to access the Open Food Facts database to query detailed food product information, nutritional data, and environmental scores. Supports product lookup by barcode, smart search with filtering, nutritional analysis, product comparison, and dietary recommendations to help users make informed food choices.51MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to search for food products and retrieve detailed nutritional information from the Open Food Facts database using product names or barcodes.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search the USDA's FoodData Central database and retrieve detailed nutritional information and ingredient lists. It supports comprehensive food data access through keyword searches and structured queries for specific food items.3MIT
- FlicenseBqualityDmaintenanceEnables AI assistants to access food product information, providing nutritional analysis, product comparisons, and recipe suggestions using the Open Food Facts database.21-