Skip to main content
Glama
yazio-mcp

yazio-mcp

by fliptheweb
README.md
# Yazio MCP Server <img src="https://assets.yazio.com/frontend/images/branded-logo-dark.svg" alt="Yazio Logo" width="104" height="28" />

> [!IMPORTANT]
> This is **not an official MCP server** and Yazio does **not provide an official API**.

An MCP (Model Context Protocol) server that connects Claude/Cursor to your Yazio nutrition data. Track your diet, search food products, and manage your nutrition goals directly from your AI assistant.

**Available on NPM**: `npx yazio-mcp`

**Claude Desktop Extension**: ~~[yazio-mcp.mcpb](https://github.com/fliptheweb/yazio-mcp/releases/latest/download/yazio-mcp.mcpb)~~ — one-click install is [broken upstream](https://github.com/modelcontextprotocol/mcpb/issues/281), see [workaround](#claude-desktop-extension).

## ✨ Features

- 👤 **Profile & Goals** - Read your profile, settings, dietary preferences and daily goals
- 🔍 **Food & Product Search** - Search Yazio's [food database](https://www.yazio.com/en/foods), get suggestions, and manage your own products
- 📝 **Food Diary** - Log food and water, read entries and daily totals, and remove entries
- 🥣 **Recipes** - Create, read, update and delete your own recipes
- 🍽️ **Saved Meals** - Save sets of products as meals and manage them
- ⭐ **Favorites** - Manage your favorite products and recipes
- ⚖️ **Weight & Body** - Log weight, body fat, muscle, blood glucose and circumferences, and view the history
- 🏃‍♂️ **Exercise & Activity** - Log exercises and the day's steps
- 📓 **Diary Notes** - Read, write and clear daily notes and feeling tags

## 🚀 Quick Start

Add the following JSON your MCP client configuration:

```json
{
  "mcpServers": {
    "yazio": {
      "command": "npx",
      "args": ["-y", "yazio-mcp"],
      "env": {
        "YAZIO_USERNAME": "your_email@emai.com",
        "YAZIO_PASSWORD": "your_password"
      }
    }
  }
}
```


### Claude Desktop (Extension)

> [!WARNING]
> One-click `.mcpb` install is broken by a Claude Desktop bug ([mcpb#281](https://github.com/modelcontextprotocol/mcpb/issues/281)). **Workaround:** download [yazio-mcp.zip](https://github.com/fliptheweb/yazio-mcp/releases/latest/download/yazio-mcp.zip), extract it, and use **Settings → Extensions → Advanced settings → Install Unpacked Extension**. Or just use the `npx` config above.

### Claude Desktop (Manual)

`~/Library/Application Support/Claude/claude_desktop_config.json`

### Claude Code (CLI)

```bash
claude mcp add yazio -e YAZIO_USERNAME=your_email@email.com -e YAZIO_PASSWORD=your_password -- npx -y yazio-mcp
```

Verify with `claude mcp list`.

### Cursor

There are a few ways to add the server:

- **Settings UI** (easiest) — `Settings → MCP → + Add new MCP server`, then fill in the command, args, and env
- **Project config** — add JSON to `.cursor/mcp.json` in your project root
- **Global config** — add JSON to `~/.cursor/mcp.json` (applies to all projects)


## 💡 Use Cases

![Showcase](https://github.com/user-attachments/assets/3aa47086-d40e-408c-ba51-cbe8cf165404)

### 📈 Analyze Your Nutrition Trends
> *"Get my nutrition data for the last week and analyze my eating patterns"*

Claude can retrieve your daily summaries, identify trends, and provide insights about your eating habits, macro distribution, and areas for improvement.

### 🔍 Search Food Products
> *"Search for 'chicken breast' in the Yazio database"*

Find detailed nutritional information for any food product, including calories, macros, vitamins, and minerals.

### 📝 Add Forgotten Meals
> *"Add 200g of grilled salmon for yesterday's dinner"*

Easily log meals you forgot to track in the Yazio app directly from Claude or Cursor.

## 🛠️ Available Tools

| Tool | Description | Key Parameters |
|------|-------------|----------------|
| **👤 Profile & Goals** | | |
| `get_user` | Get user profile | - |
| `get_user_settings` | Get user preferences | - |
| `get_user_dietary_preferences` | Get dietary preferences | - |
| `get_user_goals` | Get nutrition goals | `date` (optional) |
| `set_user_goals` | Change some of your daily goals from a date on | `goals`, `date` (optional) |
| `get_user_streak` | Get your tracking streak by day | - |
| `get_user_fastings` | Get your fasting timer and completed fasts | - |
| | | |
| **🔍 Food & Product Search** | | |
| `search_products` | Search food database | `query` |
| `get_product` | Get detailed product info | `id` |
| `get_user_suggested_products` | Get suggested products for a meal | `date`, `daytime`, `limit` (all optional) |
| `get_user_products` | Get your own products | - |
| `create_product` | Create a custom product from label values per 100 g/ml | `name`, `category`, `energy_per_100`, `protein_per_100`, `fat_per_100`, `carb_per_100` |
| `delete_user_product` | Delete one of your products | `id` |
| | | |
| **📝 Food Diary** | | |
| `get_user_consumed_items` | Get food entries for a date, with names and nutrients | `date` |
| `get_user_consumed_items_latest` | Get recently logged items | - |
| `get_user_daily_summary` | Get daily nutrition summary | `date` |
| `get_user_daily_nutrients` | Get daily energy and macro totals for a date range | `start`, `end` (optional) |
| `get_user_water_intake` | Get water intake | `date` |
| `add_user_consumed_item` | Add food to your log | `product_id`, `amount`, `date`, `daytime` |
| `add_quick_entry` | Log a one-off entry with total nutrition, without a product ("quick add") | `name`, `date`, `daytime`, `energy` |
| `add_user_consumed_recipe` | Log portions of a recipe | `recipe_id`, `portion_count`, `date`, `daytime` |
| `add_user_consumed_meal` | Log all items of a saved meal | `meal_id`, `date`, `daytime` |
| `add_user_water_intake` | Add water intake entry (cumulative value in ml) | `date`, `water_intake` |
| `remove_user_consumed_item` | Remove food from log | `itemId` |
| | | |
| **🥣 Recipes** | | |
| `get_user_recipes` | Get your own recipes | - |
| `get_recipe` | Get a recipe with ingredients and nutrients | `id` |
| `create_user_recipe` | Create a recipe from products; nutrients per portion are calculated | `name`, `portion_count`, `ingredients` |
| `update_user_recipe` | Replace one of your recipes; nutrients are recalculated | `id`, `name`, `portion_count`, `ingredients` |
| `delete_user_recipe` | Delete one of your own recipes | `id` |
| | | |
| **🍽️ Saved Meals** | | |
| `get_user_meals` | Get your saved meals | - |
| `create_user_meal` | Save a set of products as a meal | `name`, `products` |
| `delete_user_meal` | Delete a saved meal | `id` |
| | | |
| **⭐ Favorites** | | |
| `get_user_favorites` | Get your favorite products and recipes | - |
| `add_user_favorite_product` | Add a product to favorites | `product_id`, `amount` |
| `add_user_favorite_recipe` | Add a recipe to favorites | `recipe_id`, `portion_count` |
| `remove_user_favorite_product` | Remove a product from favorites | `product_id` |
| `remove_user_favorite_recipe` | Remove a recipe from favorites | `id` |
| | | |
| **⚖️ Weight & Body** | | |
| `get_user_weight` | Get the last weight entry up to a date | `date` (optional) |
| `get_user_weight_history` | Get all weight entries in a date range | `start`, `end` (optional) |
| `get_user_body_values` | Get every body value of a day | `date` (optional) |
| `add_user_weight` | Log a weight measurement in kg | `date`, `weight` |
| `add_user_body_value` | Log body fat, muscle, blood glucose or a circumference, in metric units | `type`, `date`, `value` |
| `update_user_body_value` | Change a weight or body value entry | `id`, `value` |
| `delete_user_weight` | Delete a weight entry | `id` |
| `delete_user_body_value` | Delete a body value entry | `id` |
| | | |
| **🏃‍♂️ Exercise & Activity** | | |
| `get_user_exercises` | Get exercise data | `date` |
| `add_user_exercise` | Log a Yazio training or a custom exercise | `date`, `name`, `duration`, `energy` |
| `set_user_activity` | Set the day's total steps or activity energy (replaces the day's values) | `date`, `steps`, `energy` |
| `delete_user_exercise` | Delete an exercise entry | `id` |
| | | |
| **📓 Diary Notes** | | |
| `get_user_note` | Get the diary note and feeling tags for a date | `date` |
| `set_user_note` | Set the diary note and/or feeling tags for a date; `note: null` and `tags: []` clear the day | `date`, `note`, `tags` |

## Test Connection

```bash
YAZIO_USERNAME='your_email' YAZIO_PASSWORD='your_password' npx yazio-mcp
```

## 📦 Use the API Client

The package also exports the Yazio API client that the server uses:

```bash
npm install yazio-mcp
```

```ts
import { YazioApi } from 'yazio-mcp';

const yazio = new YazioApi({ username: 'your_email@email.com', password: 'your_password' });
const goals = await yazio.getGoals();
const entries = await yazio.getConsumedItems('2026-01-15');
```

## ❕ Disclaimers

- **Credentials**: Your Yazio credentials are only used for auth on Yazio servers
- **Use at Your Own Risk**: API changes could affect functionality

> **Gotcha: the Yazio app may cache each day's items.** It may keep the item list of a day from the first time it shows that day. Entries logged here later count in the totals, but get no row in the meal.
> - Log out of the app and in again to see the rows.
> - Or edit and delete them here: `get_user_consumed_items`, then `remove_user_consumed_item`.
> - Or log first, then open the app.

## 📋 Requirements

- Node.js 20+ (for npx)
- Valid Yazio account
- MCP-compatible client (Claude Desktop, Cursor, etc.)

# Development
1. Download the repository
2. Point to local copy in your mcp config
3. Debugging:

```
YAZIO_USERNAME=X YAZIO_PASSWORD=X npx -y @modelcontextprotocol/inspector npx <local-path>/yazio-mcp
```

## Releasing

Publishing a GitHub Release publishes the package. Release Drafter keeps a stable and a beta draft up to date.

- **Beta:** publish the beta draft (tag `vX.Y.Z-beta.N`, marked as pre-release). It goes to npm `beta`: `npx yazio-mcp@beta`.
- **Stable:** run `npm run release:prepare -- X.Y.Z`, commit and merge, then publish the stable draft with tag `vX.Y.Z`. It goes to npm `latest` and the MCP Registry.
---

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details.

TDQS

B3.3/5.0

Scored across 47 tools

Disambiguation4/5

Most tools target a clearly distinct resource and action, and the descriptions actively resolve the few risky pairs (get_user_weight vs get_user_weight_history, add_user_weight vs add_user_body_value, add_quick_entry vs create_product vs add_user_consumed_item). Residual overlap remains between get_user_daily_summary and get_user_daily_nutrients, and between the seven different remove/delete tools for different resources, which an agent must read carefully to keep straight.

Naming Consistency4/5

The dominant pattern is verb_user_resource (get_user_water_intake, add_user_consumed_meal, delete_user_weight), applied consistently across the bulk of the surface. Deviations are modest: the verb 'remove' vs 'delete' for deletions (remove_user_consumed_item vs delete_user_recipe) and 'add' vs 'create' for creations, plus a handful of unscoped domain tools (search_products, get_product, get_recipe, create_product).

Tool Count2/5

47 tools is heavy for a nutrition-tracker surface and forces the agent to navigate near-parallel families (five weight/body-value getters, eight delete/remove tools, three separate favorite add/remove pairs). The domain is genuinely large, so many tools are justified, but the surface could be consolidated (e.g. generic delete for entries, merged summary/nutrients) without losing capability.

Completeness4/5

Coverage is unusually thorough: full lifecycle for diary entries, recipes, meals, products, water, weight, body values, exercises, notes, goals and favorites, with explicit cross-references from create to the ID needed for delete. The main gaps are update operations for custom products and saved meals (create/delete only), which agents can work around by recreating.

Maintenance

ActivityNo data
ResponsivenessOutdated data