YAZIO MCP Server
Click on "Install 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., "@YAZIO MCP Serverwhat did I eat today and how many calories is that?"
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.
yazio-mcp-server
An MCP server over the YAZIO food diary. Ask a model what you have eaten today, log a meal, build a recipe from tracked products.
Hand-written, unlike the SDK it sits on: it exists to turn ~48 raw endpoints into a couple of dozen tools a model can use without a manual, which is judgement work a generator cannot do.
Unofficial and unaffiliated. YAZIO does not publish, endorse or support this server, and the API it uses is private: it can change without notice, and using it is subject to YAZIO's terms of service.
Built on yazio-sdk, which is generated from yazio-api-specification.
Running it
pip install yazio-mcp-server
yazio-mcp-serverOr from a checkout:
nix-shell --run "make run"Or in a container:
docker compose up -dThe endpoint is http://127.0.0.1:8931/mcp, speaking streamable HTTP. The port
avoids 8000 on purpose — that one collides with too much other tooling for a
server whose URL is registered somewhere in advance.
Related MCP server: nutrition-mcp
In a container
The Dockerfile builds an Alpine image that runs the server as an unprivileged
user (uid 10001) and holds nothing but the interpreter and the installed
virtualenv — 60 MB on disk, 21 MB to pull. It binds 0.0.0.0, because a
container's own loopback is reachable from nothing else.
One thing the image does that a plain pip install does not: it removes
cryptography after installing. That package is 15 MB and arrives through
mcp → pyjwt[crypto], for OAuth and JWT verification paths a Basic-auth
server never takes — PyJWT falls back to its HMAC-only algorithm set, and TLS to
YAZIO goes through the standard library's ssl either way. Adding an OAuth path
to this server means dropping that line from the Dockerfile first.
Tagged releases are published to GHCR for amd64 and arm64, so there is usually nothing to build:
docker run --rm -p 127.0.0.1:8931:8931 ghcr.io/yazio-community/yazio-mcp-server:latestv1.4.2 publishes 1.4.2, 1.4 and 1; latest follows final releases only,
never a prerelease. From a checkout:
docker build -t yazio-mcp-server .
docker run --rm -p 127.0.0.1:8931:8931 yazio-mcp-serverThe one thing worth knowing before deploying it: every hostname clients use to
reach the server has to be named. The transport's DNS-rebinding guard accepts
loopback and nothing more, so a compose service name, a Kubernetes Service or an
Ingress host all come back as 421 Invalid Host header until they are added:
docker run --rm -p 8931:8931 yazio-mcp-server \
yazio-mcp-server --host 0.0.0.0 --allowed-host yazio.example.comdocker-compose.yml does exactly this for the service name and publishes the
port on loopback only — the credentials in play are a YAZIO password in
reversible encoding, so anything wider belongs behind TLS.
On Kubernetes the same argument goes in args, and probes have to be TCP: the
whole app sits behind Basic auth, so an unauthenticated HTTP probe reports 401
for a healthy server.
containers:
- name: yazio-mcp
image: yazio-mcp-server
args: ["yazio-mcp-server", "--host", "0.0.0.0", "--allowed-host", "yazio-mcp.default.svc.cluster.local:*"]
ports:
- containerPort: 8931
readinessProbe:
tcpSocket:
port: 8931
securityContext:
runAsNonRoot: true
readOnlyRootFilesystem: true
allowPrivilegeEscalation: falseNothing is written to disk and no state survives a restart — tokens are cached in memory, per credential pair — so replicas need no coordination and can be scaled freely.
Using it from Claude Code
Registered at user scope, so it is available in every directory:
claude mcp add --transport http --scope user yazio http://127.0.0.1:8931/mcp \
--header "Authorization: Basic $(printf '%s:%s' "$YAZIO_USERNAME" "$YAZIO_PASSWORD" | base64 -w0)"The server has to be running for Claude Code to reach it; start it with the
command above, and it will show as failed in claude mcp list when it is not.
Note that this writes the Basic credential into ~/.claude.json, where it sits
in a form that is trivially reversible — it is your YAZIO password, not a token
you can revoke on its own. claude mcp remove yazio --scope user takes it back
out.
Authenticating
There is no separate account for this server: clients authenticate with the same username and password they use to log in to YAZIO, sent as HTTP Basic credentials — or, if the client cannot build those, as two plain headers. The server exchanges them for a YAZIO OAuth token on the first tool call and caches it per credential pair until it expires.
{
"mcpServers": {
"yazio": {
"type": "http",
"url": "http://127.0.0.1:8931/mcp",
"headers": {
// base64 of "username:password"
"Authorization": "Basic bWVAZXhhbXBsZS5jb206aHVudGVyMg=="
}
}
}
}Basic auth is not what the MCP specification prescribes for HTTP transports — it expects OAuth — so clients have to be pointed at the server with an explicit header rather than through a discovery flow.
Without the base64 step
Some clients — LibreChat among them — let an administrator define custom headers but pass the values through verbatim, so there is no way to have the client assemble the base64 credential from a username and a password. For those, send the two values as separate headers instead:
{
"mcpServers": {
"yazio": {
"type": "http",
"url": "http://127.0.0.1:8931/mcp",
"headers": {
"X-Auth-Username": "me@example.com",
"X-Auth-Password": "hunter2"
}
}
}
}The two forms are equivalent — the same login, the same token cache. When a
request carries both, Authorization wins and the X-Auth-* headers are
ignored. Sending only one half of the pair is refused with 400 Bad Request,
rather than the 401 an unauthenticated request gets, so a client that is only
missing a field can tell that apart from credentials YAZIO turned down. A blank
value is not a credential either: once one of the headers is on the request,
both have to carry something or the request is a 400.
Basic credentials are encoded, not encrypted. Bind to loopback, or terminate TLS in front of the server; never expose it over plain HTTP on a network you do not control.
Behind a reverse proxy, name the public hostname or the transport's DNS-rebinding guard will reject the request:
python3 -m yazio_mcp --host 0.0.0.0 --allowed-host yazio.example.comTools
Overview and nutrition
Tool | What it answers |
| How is today going: intake against goal, per meal, water, activity, weight |
| What was actually eaten, item by item, with the |
| Energy and macros per day across a range, plus averages |
| The day's energy, macro, water, step and weight goals |
| Water intake against goal |
| Steps and exercise energy across a range |
Products
Tool | What it does |
| Search the food database by name or barcode |
| One product in full, including its serving options |
| What this user usually eats at a given meal |
Tracking
Tool | What it does |
| Log a product, by amount or by named serving |
| Log portions of a recipe |
| Remove a logged item by its |
| Set the day's water total |
| Log a weight measurement |
| Log energy burned, steps and distance |
Recipes
Tool | What it does |
| The user's own recipes |
| One recipe: ingredients, instructions, nutrients per portion |
| Build a recipe from tracked products |
| Remove one of the user's own recipes; logged portions stay |
| Upload a photo for one of the user's own recipes |
| Remove the photo from one of the user's own recipes |
| YAZIO's editorial catalogue for a country |
| Recipes marked as favourites |
Profile
get_profile returns the goal direction, activity level, units, height and
birth date — context worth having before interpreting anyone's numbers.
Units
Energy is in kilocalories and macros are in grams. Vitamins and minerals are
reported in milligrams: YAZIO stores them in grams too, but at that scale they
are values like 0.00012 that round away to nothing. Every nutrient block carries a
units map, so the mixture cannot be misread.
Micronutrients stay small even in milligrams, because product nutrients are per one base unit (see below) rather than per 100. Numbers that would round to zero at two decimals are reported to three significant digits instead, so a trace amount never reads as an absent one.
Product nutrients are stored per one base unit, not per 100: olive oil reads
8.84 kcal per gram. This is the factor create_recipe scales by, so it is worth
knowing before touching that code.
How create_recipe works
YAZIO's recipe endpoint stores what the client submits and derives nothing: a
recipe carries its own nutrient totals. So create_recipe resolves every
ingredient to a real product, scales that product's nutrients to the amount the
recipe uses, and sums them before posting. An ingredient that cannot be resolved
fails the call rather than silently contributing zero.
Two of its rules come from the API rather than from taste, and both are enforced before the request goes out because the API signals them badly:
At least two ingredients. One is rejected with "This collection should contain 2 elements or more".
portion_countmust be a whole number. Not merely integral in value — it has to serialise without a decimal point.2is accepted;2.0and2.5are both answered with a bare500and no message.
API behaviour this server works around
The full catalogue of undocumented API behaviour lives in the spec repo. These are the ones that shaped code here rather than the spec:
The client version is checked, and it lives in the User-Agent. Anything unrecognised gets
403 {"error":"version_blocked"}on every endpoint except the token exchange.config.USER_AGENTcarries the captured app's string and will need bumping when YAZIO retires that version — a sudden wall of 403s is the symptom, and it is the single most likely reason this server stops working one day.Product search requires
sexandcountries.search_productsfills both from the user's profile rather than making a caller supply them.untrack_itemcannot trust the delete endpoint.DELETE /v22/user/consumed-itemstakes a body of{"<bucket>": "<uuid>"}— a single string, not a list — and it also accepts an?id=query parameter, answers204, and does nothing. So the tool looks the entry up first to learn its bucket, and reads the day back afterwards rather than believing the status code.create_recipevalidates before sending. Two API rules are enforced client-side because the API signals them badly: fewer than two ingredients is rejected with a message about collections, and aportion_countthat serialises with a decimal point (2.0,2.5) is answered with a bare500and no message at all.
Development
nix-shell # builds yazio_sdk from its PyPI release
make test # mocked suite, never touches a real account
make lintyazio_sdk comes from PyPI everywhere — the dev shell, CI and released builds
alike. The dev shell pins one version of it (see shell.nix); keep that inside
the range pyproject.toml declares when either moves.
The suite mocks every HTTP call, so it covers the shaping logic but cannot catch the API contradicting the spec. If a shape looks wrong rather than the server's handling of it, the problem is upstream — reproduce it against the spec repo and fix it there.
Licence
MIT.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server for managing Yazio user & nutrition data (unofficial)Last updated1525052MIT
- Alicense-qualityDmaintenanceMCP server for USDA nutrition data lookup, meal logging, and daily macro tracking.Last updated186MIT
- Alicense-qualityBmaintenanceEnables querying Yazio food logs including meals, daily summaries, and nutrition totals through MCP tools.Last updatedMIT
- Alicense-qualityDmaintenanceA Model Context Protocol (MCP) server that connects AI assistants to your MyFitnessPal data, enabling reading food diaries, nutrition goals, weight measurements, and more via MFP's web scraping.Last updatedMIT
Related MCP Connectors
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Wger MCP — wraps wger Workout Manager REST API (free, no auth for read)
Recipes MCP — wraps TheMealDB API (free tier, no auth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yazio-community/yazio-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server