Yazio MCP Server

Yazio MCP Server

An MCP server that connects AI assistants to your Yazio nutrition diary, enabling food tracking, product search, and nutrition goal management via reverse-engineered endpoints.

Category
访问服务器

README

Yazio MCP Server (Python)

[!IMPORTANT] This is not an official MCP server and Yazio does not provide an official API. It talks to the same reverse-engineered endpoints the Yazio apps use and may stop working at any time.

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

A Python port of yazio-mcp, requiring no Node.js toolchain.

Quick start

No install step and no cloning — uv fetches, builds, and runs it straight from GitHub:

uvx --python 3.12 --from git+https://github.com/bserem/yazio-mcp-python yazio-mcp

Add it to your MCP client config:

{
  "mcpServers": {
    "yazio": {
      "command": "uvx",
      "args": [
        "--python", "3.12",
        "--from", "git+https://github.com/bserem/yazio-mcp-python",
        "yazio-mcp"
      ],
      "env": {
        "YAZIO_USERNAME": "your_email@example.com",
        "YAZIO_PASSWORD": "your_password"
      }
    }
  }
}

Claude Code (CLI)

claude mcp add yazio \
  -e YAZIO_USERNAME=your_email@example.com \
  -e YAZIO_PASSWORD=your_password \
  -- uvx --python 3.12 --from git+https://github.com/bserem/yazio-mcp-python yazio-mcp

Verify with claude mcp list.

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json on macOS, or %APPDATA%\Claude\claude_desktop_config.json on Windows — use the JSON above.

Cursor

Add the same JSON to .cursor/mcp.json (per project) or ~/.cursor/mcp.json (global), or fill in the command and env via Settings → MCP → + Add new MCP server.

Pinning and updating

uvx caches the resolved git commit, so it will not pick up new commits on its own. Either pin a tag for reproducibility:

uvx --from git+https://github.com/bserem/yazio-mcp-python@v0.1.0 yazio-mcp

or force a re-resolve when you want the latest:

uvx --refresh --from git+https://github.com/bserem/yazio-mcp-python yazio-mcp

Test your connection

YAZIO_USERNAME='you@example.com' YAZIO_PASSWORD='...' \
  uvx --python 3.12 --from git+https://github.com/bserem/yazio-mcp-python yazio-mcp

The server authenticates during startup, so wrong credentials fail immediately with a message on stderr rather than at the first tool call.

Available tools

Tool Description Parameters
get_user User profile
get_user_settings Settings and preferences
get_user_dietary_preferences Dietary restrictions
get_user_goals Nutrition and fitness goals date?
get_user_daily_summary Daily nutrition summary date
get_user_consumed_items Food entries for a date date
get_user_exercises Exercise data date?
get_user_weight Latest weight entry date?
get_user_water_intake Water intake for a date date
search_products Search the food database query, sex?, countries?, locales?
get_product Full product details product_id
get_user_suggested_products Suggestions for a meal daytime?, date?
add_user_consumed_item Add food to the log product_id, date, daytime, amount, serving?, serving_quantity?
remove_user_consumed_item Remove food from the log item_id
add_user_water_intake Log water intake date, water_intake

Dates are YYYY-MM-DD, except add_user_water_intake, which needs YYYY-MM-DD HH:MM:SS. Amounts are in base units (g or ml).

Prompts

Three prompts cover the flows that need more than one call:

  • add_food_item — search → disambiguate → check servings → log
  • remove_food_item — read the diary to get the entry id, then remove
  • add_water_intake — read the current total, add to it, write back the new total

Repository layout

This is a uv workspace with two independently publishable packages:

.
├── src/yazio_mcp/              # yazio-mcp — the MCP server
└── packages/yazio-client/      # yazio-client — a standalone async Yazio API client

yazio-client knows nothing about MCP and is usable on its own — see its README. uv resolves the workspace dependency automatically when installing from git, so the single uvx --from git+... command above builds both.

Development

uv sync              # create the venv and install both packages plus dev tools
uv run pytest        # 58 tests, no credentials or network needed
uv run ruff check .
uv run ruff format .

Tests mock the HTTP layer with respx, so they never touch the real Yazio API.

Run the server from a local checkout:

YAZIO_USERNAME=... YAZIO_PASSWORD=... uv run yazio-mcp

Notes on behaviour

  • Water intake is cumulative. water_intake is the running total for the day, not the amount being added. Read get_user_water_intake first and add to it.
  • item_id is not product_id. Removal needs the id of a diary entry from get_user_consumed_items. add_user_consumed_item returns the id it created, so an addition can be undone without re-reading the diary.
  • Credentials are sent only to Yazio's own servers, and only to obtain an OAuth token.

Differences from the TypeScript version

  • The yazio npm package and its monkey-patched water-intake method are replaced by the first-class yazio-client package in this repo.
  • Tool parameters use snake_case: get_product takes product_id (was id) and remove_user_consumed_item takes item_id (was itemId).
  • get_user_suggested_products takes daytime and date, which is what the endpoint actually accepts. The TypeScript version advertised query and limit, which the API ignored.
  • get_user_goals, get_user_weight, and get_user_exercises accept an optional date.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选