{
  "$schema": "https://macropass.app/mcp-tools.json",
  "name": "macropass-mcp",
  "description": "The nine tools a connected assistant (Claude, ChatGPT or any MCP client) can call on a Macropass diary. The assistant estimates nutrition with its own model and submits complete records; Macropass photo, voice and AI estimation, goals, recipes and export are never exposed externally.",
  "endpoint": "https://auth.macropass.app/mcp",
  "protocol": "Model Context Protocol (JSON-RPC 2.0 over HTTPS POST), protocolVersion 2024-11-05",
  "auth": {
    "type": "oauth2",
    "flow": "authorization_code with PKCE, dynamic client registration",
    "authorization_server": "https://auth.macropass.app/.well-known/oauth-authorization-server",
    "protected_resource": "https://auth.macropass.app/.well-known/oauth-protected-resource/mcp",
    "scopes": {
      "macropass.read": "Read today's meals and nutrition totals.",
      "macropass.write": "Log complete meals, correct or delete meals, log or delete weigh-ins.",
      "macropass.history.read": "List and search past meals and weigh-ins."
    }
  },
  "conventions": {
    "timestamps": "ISO 8601 with a timezone offset, for example 2026-09-19T12:30:00+02:00.",
    "units": "Calories as kcal; protein_g, carbs_g, fat_g, fiber_g, sugar_g in grams; weight_kg in kilograms.",
    "zero": "Zero means the food genuinely contains none; never use zero for unknown.",
    "idempotency": "Every write accepts idempotency_key so a retried call does not duplicate a record.",
    "entitlement": "tools/call returns JSON-RPC error code -32402 (payment required) when the Macropass subscription is inactive."
  },
  "tools": [
    {
      "name": "macropass_log_meal",
      "description": "Log a meal after discussing it with the user in conversation. Estimate calories plus protein, carbs, fat, fiber and sugar yourself, then submit every whole-meal value and a complete nutrition row for every ingredient. Does not accept photos, audio or uploaded media.",
      "scope": "macropass.write",
      "parameters": {
        "type": "object",
        "properties": {
          "name": { "type": "string", "description": "Whole-meal summary, for example \"Chicken burrito bowl\"." },
          "kcal": { "type": "number", "minimum": 0, "description": "Whole-meal calories." },
          "protein_g": { "type": "number", "minimum": 0 },
          "carbs_g": { "type": "number", "minimum": 0 },
          "fat_g": { "type": "number", "minimum": 0 },
          "fiber_g": { "type": "number", "minimum": 0 },
          "sugar_g": { "type": "number", "minimum": 0 },
          "items": {
            "type": "array", "minItems": 1,
            "description": "One row per ingredient established in the conversation.",
            "items": {
              "type": "object",
              "properties": {
                "name": { "type": "string" },
                "qty": { "type": "string", "description": "Quantity as the user said it, for example \"180g\" or \"1 cup\"." },
                "kcal": { "type": "number", "minimum": 0 },
                "protein_g": { "type": "number", "minimum": 0 },
                "carbs_g": { "type": "number", "minimum": 0 },
                "fat_g": { "type": "number", "minimum": 0 },
                "fiber_g": { "type": "number", "minimum": 0 },
                "sugar_g": { "type": "number", "minimum": 0 }
              },
              "required": ["name", "kcal", "protein_g", "carbs_g", "fat_g", "fiber_g", "sugar_g"]
            }
          },
          "note": { "type": "string", "description": "The user's verbatim phrasing of what they ate; shown in the app as \"You said\"." },
          "assumptions": { "type": "array", "items": { "type": "string" }, "description": "Portion or preparation assumptions used for the estimate." },
          "consumed_at": { "type": "string", "description": "ISO 8601 with offset; defaults to now." },
          "idempotency_key": { "type": "string" }
        },
        "required": ["name", "kcal", "protein_g", "carbs_g", "fat_g", "fiber_g", "sugar_g", "items"]
      },
      "example_prompt": "I had two eggs scrambled in butter and a slice of sourdough."
    },
    {
      "name": "macropass_get_today",
      "description": "Return meals logged today and their calorie, protein, carbs, fat, fiber and sugar totals. Goals and remaining-target context are not included for connected assistants.",
      "scope": "macropass.read",
      "parameters": { "type": "object", "properties": { "tz_offset_minutes": { "type": "number", "description": "The user's local UTC offset in minutes so 'today' is bucketed correctly." } } },
      "example_prompt": "What have I eaten so far today?"
    },
    {
      "name": "macropass_list_history",
      "description": "List meals in a date range.",
      "scope": "macropass.history.read",
      "parameters": { "type": "object", "properties": { "sinceISO": { "type": "string" }, "beforeISO": { "type": "string" }, "limit": { "type": "number", "description": "Default 100, maximum 2000." } } },
      "example_prompt": "What did I eat last Thursday?"
    },
    {
      "name": "macropass_update_meal",
      "description": "Correct a previously logged meal from conversation text. Text-only changes may omit nutrition; a nutrition correction must resubmit every whole-meal value and the complete ingredient breakdown.",
      "scope": "macropass.write",
      "parameters": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "kcal": { "type": "number" }, "protein_g": { "type": "number" }, "carbs_g": { "type": "number" }, "fat_g": { "type": "number" }, "fiber_g": { "type": "number" }, "sugar_g": { "type": "number" }, "items": { "type": "array" }, "assumptions": { "type": "array", "items": { "type": "string" } }, "note": { "type": "string" }, "consumed_at": { "type": "string" } }, "required": ["id"] },
      "example_prompt": "Yesterday's lunch was actually a double portion."
    },
    {
      "name": "macropass_delete_meal",
      "description": "Delete a logged meal by id.",
      "scope": "macropass.write",
      "parameters": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] },
      "example_prompt": "Remove the duplicate coffee from this morning."
    },
    {
      "name": "macropass_search_meals",
      "description": "Search the user's meal history by free text; matches meal names and notes.",
      "scope": "macropass.history.read",
      "parameters": { "type": "object", "properties": { "query": { "type": "string" }, "limit": { "type": "number" } }, "required": ["query"] },
      "example_prompt": "When did I last have sushi?"
    },
    {
      "name": "macropass_log_weight",
      "description": "Log a weigh-in. The response includes the seven-day trend delta.",
      "scope": "macropass.write",
      "parameters": { "type": "object", "properties": { "weight_kg": { "type": "number" }, "measured_at": { "type": "string" }, "note": { "type": "string" }, "idempotency_key": { "type": "string" } }, "required": ["weight_kg"] },
      "example_prompt": "I weighed 82.4 kg this morning."
    },
    {
      "name": "macropass_get_weight_history",
      "description": "Return weigh-ins in a range plus the smoothed weekly trend.",
      "scope": "macropass.history.read",
      "parameters": { "type": "object", "properties": { "sinceISO": { "type": "string" }, "beforeISO": { "type": "string" }, "limit": { "type": "number" } } },
      "example_prompt": "How has my weight moved this month?"
    },
    {
      "name": "macropass_delete_weight",
      "description": "Delete a weigh-in by id.",
      "scope": "macropass.write",
      "parameters": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] },
      "example_prompt": "Delete this morning's weigh-in, it was a typo."
    }
  ],
  "docs": "https://macropass.app/claude-chatgpt/tools",
  "setup": "https://macropass.app/claude-chatgpt/setup",
  "updated": "2026-09-19"
}
