DEVELOPER & INTEGRATIONS GUIDE

NutroIQ Official AI Connectors Guide

Complete technical specification for the NutroIQ Model Context Protocol (MCP) server (v2.4/v2.5), OAuth 2.1 authorization, 23 Remote MCP Tools, 8 Interactive MCP App UI Cards, 4 Resources, and 6 Prompt Templates.

Last Updated: November 2026

23
Remote MCP Tools
8
Interactive UI Cards
4
Context Resources
6
Prompt Templates
Official Remote MCP Endpoint Specification NutroIQ implements the Model Context Protocol (MCP) over Streamable HTTP POST (JSON-RPC 2.0).
Endpoint: https://api.nutroiq.com/mcp
Transport: Streamable HTTP POST (JSON-RPC 2.0, non-POST methods rejected with 405 Method Not Allowed and Allow: POST)
Payload Limit: Strict 64 KiB wire payload bound with automatic range bucket coarsening (day → week → month)
Authorization: OAuth 2.1 with mandatory RFC 7636 PKCE (S256 code challenge) and RFC 8707 Resource Indicators

1. Architecture & Protocol Standards

The NutroIQ AI Connector allows frontier AI assistants (Anthropic Claude, OpenAI ChatGPT, Google Gemini) to securely query and update nutritional diaries directly inside conversational workflows. The architecture adheres to:

2. OAuth 2.1 Scopes Specification

Client applications must request granular scopes matching their intended operations. NutroIQ provides 9 scopes, including 2 sensitive scopes that require affirmative user opt-in during authorization:

Scope Type Associated MCP Tools Description & Access Level
read:profile Standard get_context, get_day_summary, get_checkin, get_insights, get_weekly_review, fetch, update_settings Read user profile settings, daily calorie target, macronutrient distribution goals, energy unit, and configured timezone. (Also required alongside write:profile for update_settings.)
read:meals Standard get_day_summary, get_checkin, get_range_summary, get_insights, get_weekly_review, lookup_food, find_meals, list_meals, get_meal, search, fetch, relog_meal Inspect logged meals, item names, portion sizes, calories, macronutrients, and ingredient breakdowns. Raw camera roll images are excluded.
read:exercises Standard list_exercises, get_day_summary, get_range_summary*, get_insights*, get_weekly_review*, get_checkin*, fetch* Read recorded exercise sessions, activity names, logged timestamps, and active calories burned. (*Degrades gracefully if omitted; required for day:* in fetch.)
read:water Standard get_day_summary, get_checkin*, get_range_summary*, get_insights*, get_weekly_review*, fetch* Read fluid intake logs and hydration progress toward daily fluid target. (*Degrades gracefully if omitted; required for day:* in fetch.)
write:meals Standard log_meal, relog_meal Log new meals and snacks, or re-log past meals with portion scaling. (Creation only; cannot modify, delete, or restore existing meals.)
write:water Standard log_water Add fluid intake records or adjust daily hydration ledger totals.
write:exercises Standard log_exercise, update_exercise, delete_exercise Record new physical activities, adjust workout entries, or remove exercise records.
edit:meals Sensitive Opt-In update_meal, delete_meal, restore_meal Modify nutritional values, portions, or timestamps of existing logged meals, soft-delete meal records, or restore soft-deleted meals via undoToken within 24 hours. Requires affirmative opt-in.
write:profile Sensitive Opt-In update_settings Update daily calorie targets, macronutrient split goals, hydration targets, or user timezone. Requires affirmative opt-in. (Note: update_settings also requires read:profile.)
Graceful Multi-Domain Degradation Multi-domain read tools (get_checkin, get_range_summary, get_insights, and get_weekly_review) require read:meals and read:profile. If the user has not granted optional scopes such as read:water or read:exercises, these tools do not fail. Instead, they gracefully omit hydration and exercise figures (or report them as zero) while successfully delivering all meal and nutrition data. By contrast, get_day_summary requires all four read scopes (read:profile, read:meals, read:exercises, read:water) to compile a complete daily snapshot.

3. The 23 Remote MCP Tools

NutroIQ exposes 23 specialized tools via tools/list and tools/call. All tools declare explicit annotations (readOnlyHint, destructiveHint, and openWorldHint: false) and attach interactive UI cards where applicable:

3.1 Read-Only Tools (13 Tools)

Tool Name Required Scopes Key Input Parameters Annotations & UI Description & Behavior
get_context read:profile timezone Read-Only Returns current user target calories, today's aggregated intake, remaining calorie budget, and user timezone.
get_day_summary read:profile read:meals read:exercises read:water date (or dayKey), includeMeals, timezone Read-Only
ui://nutroiq/day-card
Comprehensive breakdown of calories, protein, carbs, fat, water, and exercise for a specific day. Requires all four read scopes.
get_checkin read:profile read:meals date (YYYY-MM-DD, today, yesterday), time, timezone Read-Only Daily progress check-in returning pace, target comparison, next meal slot, and guidance. (Optional read:water and read:exercises include hydration and exercise.)
get_range_summary read:profile read:meals from, to, days (1–3650), since (start), bucket (auto, day, week, month), calorieTolerance, includeToday, includeEmpty, timezone Read-Only Aggregates macro trends and daily caloric averages across a multi-day span with automatic bucket coarsening to fit under 64 KiB. (Optional read:exercises and read:water include activity and hydration.)
get_insights read:profile read:meals days (1–3650, default 14), since (start), includeToday, calorieTolerance (fraction of budget, e.g. 0.10 for 10%), from, to, timezone Read-Only Analyzes top food contributors, meal slot gaps, calorie adherence, and logging completeness with canonical sourceIds. (Optional read:exercises and read:water include activity and hydration.)
get_weekly_review read:profile read:meals week (date in week, or current, previous), timezone Read-Only
ui://nutroiq/weekly-review
Generates a Monday–Sunday weekly nutrition review with daily averages, macro distribution, and top logged foods. (Optional read:exercises and read:water include activity and hydration.)
lookup_food read:meals query (food name, keyword, or AFCD foodId), gtin (barcode), portion (grams, default 100g or serving), limit (default 5) Read-Only
ui://nutroiq/food-lookup
Searches Personal Food Library first, then FSANZ Australian Food Composition Database – Release 3 (AFCD). Returns per-100g nutrients and portion references.
find_meals read:meals query, category, lookbackDays (default 30, max 90), limit, timezone Read-Only
ui://nutroiq/meal-picker
Performs fast search across logged meal names, ingredients, and categories over the lookback window.
list_meals read:meals date (or dayKey, from/to), category, detail (compact, full), fields, limit, cursor, timezone Read-Only Returns an array of meals logged on a given calendar day or date range with pagination support.
get_meal read:meals mealId, date (or dayKey) Read-Only Fetches the full nutritional breakdown and ingredient details for a specific logged meal record by ID.
list_exercises read:exercises date (or dayKey), or from/to (max 14 days), timezone Read-Only Returns all recorded exercise sessions in the requested single day or date range (max 14 days) without pagination, including activity names, logged timestamps, optimistic concurrency versions, and active calories burned.
search read:meals query Read-Only High-speed unified search across user diary history and standard nutritional items returning canonical URIs.
fetch read:meals (meal records & recent meals)
read:profile (profile targets)
read:profile read:meals read:exercises read:water (daily summaries)
id (canonical URI or identifier, e.g. meal:{dayKey}:{mealId}, day:{dayKey}, nutroiq://profile, nutroiq://meals/recent, nutroiq://guide/logging, or UI card URI) Read-Only Fetches a canonical document or resource by ID/URI. Required scopes depend on identifier type: read:meals for meal identifiers (meal:YYYY-MM-DD:id) and recent meals; read:profile for profile targets (nutroiq://profile); all four read scopes (read:profile, read:meals, read:exercises, read:water) for daily summaries (day:YYYY-MM-DD); and no additional scope for public logging guides or UI cards.

3.2 Non-Destructive Write Tools (4 Tools)

Tool Name Required Scopes Key Input Parameters Annotations & UI Description & Behavior
log_meal write:meals name, calories, protein, carbs, fat, category, date, time, grams, ingredients, breakdown, confidence, referenceFoodId, saveToLibrary, note, hasImage, requestId Non-Destructive Write
ui://nutroiq/meal-receipt
Records a new meal into the user's food journal with smart date/time resolution, ingredient breakdown, and UUID deduplication.
relog_meal read:meals write:meals sourceId (in meal:YYYY-MM-DD:mealId format), servings (portion multiplier, default 1.0, range 0.05–20), date, time, category, strict, requestId, timezone Non-Destructive Write
ui://nutroiq/meal-receipt
Re-logs a past meal using its canonical sourceId (from find_meals or search), scaling calories and nutrients by servings. Requires both read:meals (to read the source meal) and write:meals (to create the new entry).
log_exercise write:exercises name, caloriesBurned (optional alias: calories), date, time, timezone, requestId Non-Destructive Write
ui://nutroiq/exercise-receipt
Records workout activity and estimated active caloric expenditure.
restore_meal edit:meals Sensitive undoToken Non-Destructive Write
ui://nutroiq/meal-receipt
Reverses a delete_meal operation within 24 hours using the temporary undoToken, restoring the meal and day totals. Requires the sensitive edit:meals scope.

3.3 Destructive / Mutating Write Tools (6 Tools)

Tool Name Required Scopes Key Input Parameters Annotations & UI Description & Behavior
log_water write:water add (delta in units) or setTotal (absolute count), unit (glass, ml, l, oz), date, timezone Destructive Hint
ui://nutroiq/water-receipt
Records fluid intake. Mutates the day's water ledger by adding or setting total hydration.
update_meal edit:meals Sensitive mealId, version, date, changes (object: name, category, calories, protein, carbs, fat, grams, ingredients, breakdown, note, localTime) Destructive Hint
ui://nutroiq/meal-receipt
Modifies fields of an existing logged meal using optimistic concurrency version checking.
delete_meal edit:meals Sensitive mealId, version, date Destructive Hint
ui://nutroiq/meal-receipt
Moves a logged meal to soft-deleted state, returning a 24-hour undoToken for accidental deletion recovery.
update_exercise write:exercises exerciseId, date, version, caloriesBurned (optional alias: calories) Destructive Hint
ui://nutroiq/exercise-receipt
Edits active calories burned on an existing exercise record with optimistic concurrency version validation (calories-only update).
delete_exercise write:exercises exerciseId, date, version Destructive Hint
ui://nutroiq/exercise-receipt
Permanently removes a recorded exercise entry with optimistic version verification.
update_settings read:profile write:profile Sensitive calories, protein, carbs, fat, waterTarget, energyUnit, timezone, preferences, autoBalance, expectedVersion, dryRun Destructive Hint
ui://nutroiq/settings-diff
Updates daily nutritional targets, hydration goal, and timezone. Supports dryRun: true previews and enforces a 1,200 kcal/day minimum safety floor. Requires both read:profile and write:profile scopes.

4. Remote MCP Resources & Interactive MCP Apps

4.1 Data & Guide Resources

Clients supporting MCP Resources can inspect or subscribe to 4 live context snapshots:

4.2 Interactive MCP App UI Cards

NutroIQ implements the io.modelcontextprotocol/ui extension (MIME type text/html;profile=mcp-app). These interactive UI cards render directly inside supported host applications (such as Claude artifacts and cards) without external framing:

5. MCP Prompt Templates

NutroIQ registers 6 conversational prompt templates accessible via prompts/list and prompts/get:

6. FSANZ AFCD Attribution & Reference Food Grounding

Accurate nutrition tracking requires reliable reference data. NutroIQ uses a tiered lookup strategy in lookup_food:

  1. Personal Food Library: First searches custom food items and recipes previously logged by the user (IDs prefixed with cf_* or matched via barcode gtin).
  2. FSANZ AFCD Release 3: If no personal match is found, queries the FSANZ Australian Food Composition Database – Release 3 (identified with reference IDs like AFCD-F005519).

Whenever food data is backed by FSANZ AFCD, the API response and UI card include full attribution metadata:

{
  "source": "afcd",
  "attribution": {
    "source": "FSANZ Australian Food Composition Database – Release 3",
    "copyright": "© Food Standards Australia New Zealand",
    "licenceUrl": "https://www.foodstandards.gov.au/science-data/monitoringnutrients/afcd/datauserlicenceagreement",
    "changes": "Per-portion values and kcal are calculated by NutroIQ from FSANZ per-100 g data.",
    "noticesUrl": "https://api.nutroiq.com/docs/afcd-notices"
  }
}

Food Standards Australia New Zealand (FSANZ) does not endorse NutroIQ or its calculations. Per-portion nutritional values and calorie (kcal) counts are calculated independently by NutroIQ from FSANZ per-100 g data. For full legal notices and data limitations, visit /docs/afcd-notices.

7. Client Setup, Error Handling & Reviewer Credentials

7.1 Connecting Frontier AI Platforms

7.2 Structured Error Handling & Self-Correction

When an error occurs, NutroIQ returns a structured ToolErrorEnvelope designed for LLM self-correction:

{
  "code": "validation_error",
  "message": "input validation failed",
  "hint": "Check input field formats and values against constraints.",
  "fields": [
    {
      "field": "category",
      "reason": "category must be one of Breakfast, Lunch, Dinner, Snacks",
      "allowed": ["Breakfast", "Lunch", "Dinner", "Snacks"]
    }
  ],
  "retryable": true
}

If a required scope is missing, the response includes an insufficient_scope error code along with _meta["mcp/www_authenticate"] referencing the protected resource metadata URL so clients can prompt the user to re-authorize with the required permission.

7.3 Reviewer Credentials & Domain Verification

App directory reviewers from Apple, Anthropic, OpenAI, or Google can authenticate on the OAuth consent screen using Sign in with Apple, Sign in with Google, or the collapsible Reviewer Email & Password form on /oauth/authorize. Domain verification for OpenAI is published at /.well-known/openai-apps-challenge. For directory review questions or dedicated test credentials, contact support@nutroiq.com.