Skip to main content
Glama
mijneetmeter-mcp

mijneetmeter-mcp

by jhofstede

mijneetmeter-mcp

An unofficial Model Context Protocol server for Mijn Eetmeter, the food diary of the Dutch Voedingscentrum. It lets an MCP client such as Claude search products, read your diary, and add or remove entries.

IMPORTANT

This is not an official MCP server. It is not made, endorsed or supported by the Voedingscentrum, and "Mijn Eetmeter" is their product. Mijn Eetmeter has no public API: this server drives the same web pages your browser does, using endpoints that were reverse-engineered from the site. It can break whenever the site changes. Use it with your own account only, keep the request volume modest, and check that your use fits the site's terms.

Tools

Tool

What it does

Changes the diary

search_food

Search products by name; optional filter on generic / recipe / branded

no

get_diary

Entries for one date and meal moment

no

get_diary_day

Entries for a whole day, grouped per meal moment

no

add_food

Add a product from search_food with an amount and unit

yes

delete_food

Delete an entry by its consumption_id

yes

get_favorites

Your favourite products

no

today

Today's date in the format the other tools use

no

Dates are DD-MM-YYYY. Meal moments are ontbijt, lunch, avondeten and tussendoor (breakfast, dinner and snack work too). Diary entries carry the product name, amount, unit and kcal.

Related MCP server: USDA Nutrition MCP Server

Setup

You need Python 3.10+ and a Mijn Eetmeter account. The examples use uv to run the server straight from this repository; a pip install git+https://github.com/jhofstede/mijneetmeter-mcp followed by mijneetmeter-mcp works just as well.

The server reads your login from two environment variables:

export EETMETER_EMAIL="you@example.com"
export EETMETER_PASSWORD="your-password"

Your credentials are only ever sent to mijn.voedingscentrum.nl. They are not logged and not written to disk.

Claude Code

claude mcp add eetmeter \
  --env EETMETER_EMAIL=you@example.com \
  --env EETMETER_PASSWORD=your-password \
  -- uvx --from git+https://github.com/jhofstede/mijneetmeter-mcp mijneetmeter-mcp

Claude Desktop and other stdio clients

{
  "mcpServers": {
    "eetmeter": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/jhofstede/mijneetmeter-mcp", "mijneetmeter-mcp"],
      "env": {
        "EETMETER_EMAIL": "you@example.com",
        "EETMETER_PASSWORD": "your-password"
      }
    }
  }
}

As a local HTTP service

With --http the server runs as a long-lived service that speaks Streamable HTTP. It logs in once and keeps the session, so calls are faster than starting a fresh stdio process each time.

uvx --from git+https://github.com/jhofstede/mijneetmeter-mcp mijneetmeter-mcp --http
# listening on http://127.0.0.1:8765/mcp

Point a client at it:

{ "mcpServers": { "eetmeter": { "type": "http", "url": "http://127.0.0.1:8765/mcp" } } }

GET /health answers {"status": "ok"} without touching Mijn Eetmeter.

The HTTP service gives whoever can reach it full access to your diary, so:

  • it listens on 127.0.0.1 by default and rejects requests whose Origin is not a local page;

  • set MCP_AUTH_TOKEN to require Authorization: Bearer <token>;

  • it refuses to start on a non-loopback --host unless MCP_AUTH_TOKEN is set. It serves plain HTTP, so put TLS in front of it before exposing it beyond your machine.

Configuration

Variable

Default

Meaning

EETMETER_EMAIL

–

Mijn Eetmeter login (required)

EETMETER_PASSWORD

–

Mijn Eetmeter password (required)

EETMETER_SEARCH_MAX_RESULTS

20

Cap on the number of search_food results

MCP_HOST / --host

127.0.0.1

Bind address for --http

MCP_PORT / --port

8765

Port for --http

MCP_AUTH_TOKEN

–

Bearer token required on --http requests

How it works

  • Login is an ASP.NET cookie session. The server logs in on the first tool call and again when the session has expired.

  • The diary is an ASP.NET WebForms page: reading, adding and deleting are form postbacks, and the results are parsed out of the returned HTML. Adding one product takes four to five requests.

  • Product search and favourites are small JSON endpoints.

docs/API_REFERENCE.md documents the endpoints. The client in src/mijneetmeter_mcp/client.py can also be used on its own:

from mijneetmeter_mcp.client import EetmeterClient

client = EetmeterClient()
client.login(email, password)
client.get_diary_day("30-03-2026")

Limitations

  • Entries report kcal only; macro- and micronutrients are not read.

  • add_food picks a unit by position (unit_index) and always uses the first preparation variant of a product. The result lists the units that were available.

  • Amounts of existing entries cannot be edited; delete and add again.

  • HTML parsing is tied to the current markup of the site.

Development

uv sync
uv run pytest
uv run ruff check .

The tests run against fakes and recorded-shape HTML; they never contact Mijn Eetmeter and need no account.

License

Apache 2.0

Available Tools

7 tools
add_foodA

Add a food item to the diary. Call search_food first to get product_id, product_type and synonym_id. The result lists the units the product supports (units_available) and which one was used.

Inputs: date (required), meal (required), product_id (required), product_name (required), +4 more.

delete_foodB
Destructive

Delete a diary entry by its consumption_id (from get_diary or get_diary_day).

Inputs: date (required), meal (required), consumption_id (required).

get_diaryA
Read-only

Read the diary entries for one date and meal moment.

Inputs: date (required), meal (required).

get_diary_dayA
Read-only

Read the diary entries of a full day. Returns {ontbijt, lunch, avondeten, tussendoor}, each a list of entries with product, amount, unit and kcal.

Inputs: date (required).

get_favoritesB
Read-only

Get the user's favourite food products.

Inputs: no named parameters.

search_foodA
Read-only

Search for food products by name in the Mijn Eetmeter database. Returns products with Id, Type and SynonymId, which add_food needs.

Inputs: query (required), product_type.

todayA
Read-only

Get today's date in DD-MM-YYYY format (the format the diary tools use).

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools have clearly distinct resource+action targets (search_food, add_food, delete_food, get_favorites), and the search→add dependency is explicitly documented. The only real overlap is get_diary (single date + meal moment) versus get_diary_day (full day), which the descriptions do clarify but which could still be misselected by a hurried agent.

    Naming Consistency4/5

    Six of seven tools follow a clean verb_noun snake_case pattern (search_food, get_diary, get_diary_day, add_food, delete_food, get_favorites). The outlier is 'today', which has no verb and breaks the pattern, a minor but noticeable deviation.

    Tool Count5/5

    Seven tools is well-scoped for a food-diary server: discovery, day/meal reading, write, delete, favorites, and a date helper. Each tool earns its place with no redundancy or filler.

    Completeness3/5

    The surface covers search, read, create, and delete, but there is no update operation to change an entry's amount or unit, forcing agents to delete and re-add for edits. There is also no way to retrieve daily nutrition totals or meal-level aggregates, which limits the stated diary-management domain.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables programmatic access to Fitatu nutrition tracking via MCP tools for login, food search, product lookup, daily nutrition read, and adding entries.
      9
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables MCP clients to look up products by barcode, search products and text, retrieve taxonomy suggestions, and compare nutrition data through read-only tools.
      5
      MIT