nutrition-mcp
Allows Hermes to track nutrition by providing tools to manage foods, aliases, recipes, and meal logs, with local-first persistence.
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., "@nutrition-mcplog tuna pizza for lunch"
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.
nutrition-mcp
A small local-first nutrition tracker exposed as an HTTP MCP server for Hermes.
The database is the source of truth. Hermes should call tools here to remember foods, aliases, recipes, and meal logs instead of storing nutrition facts in agent memory.
Design
The server stores three useful concepts:
Foods: atomic macro sources such as Babybel, Greek yogurt, tuna, dough, mozzarella, or homemade sauce.
Aliases: stable names Hermes can resolve, such as
babybel,default tuna, orpizza dough.Recipes: reusable templates composed from foods, such as
tuna pizza = 165g dough + 60g tuna + 40g cheese.
Recipes can be logged with one-off adjustments. For example, after creating a tuna pizza recipe, Hermes can log it with:
{
"alias": "tuna pizza",
"adjustments": [
{"alias": "cheese", "delta_grams": 20}
]
}The logged meal stores macro snapshots and a component snapshot, so historical logs do not change when you later edit a food or recipe.
Related MCP server: nutrition-mcp
MCP Endpoint
URL:
http://HOST:8765/mcpTransport: Streamable HTTP via the official Python MCP SDK v1
FastMCPHealth endpoints:
GET /GET /health
If MCP_TOKEN is set, every HTTP request must include:
Authorization: Bearer <token>Tools
Core tools:
add_foodupdate_foodadd_aliasget_foodsearch_foodslist_foodslog_foodget_dayget_entriesdelete_entrydelete_foodupdate_entryfinalize_dayget_weekly_reportlist_aliaseshealth
Recipe tools:
add_recipeupdate_recipeget_recipesearch_recipeslog_recipedelete_recipe
Data Paths
Inside the container:
SQLite DB:
/data/nutrition.dbExports:
/data/exportsDaily Markdown:
/data/exports/daily/YYYY-MM-DD.mdCSV:
/data/exports/csv/YYYY-MM-DD.csvJSON:
/data/exports/json/YYYY-MM-DD.json
Local Development
py -m venv .venv
.\.venv\Scripts\python -m pip install -e ".[test]"
.\.venv\Scripts\pytest
.\.venv\Scripts\python -m app.mainOn Linux/macOS:
python -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[test]"
pytest
python -m app.mainTest the health endpoint:
curl http://localhost:8765/healthWith a token:
curl -H "Authorization: Bearer change-me" http://localhost:8765/healthDemo Data
After the server is running, add demo foods through MCP:
{
"name": "Babybel",
"serving_name": "1 piece",
"kcal": 70,
"protein_g": 5,
"carbs_g": 0,
"fat_g": 5,
"aliases": ["babybel"]
}{
"name": "Greek yogurt",
"serving_name": "1 serving",
"kcal": 180,
"protein_g": 20,
"carbs_g": 8,
"fat_g": 4,
"aliases": ["greek yogurt"]
}Example recipe ingredients use grams when the food has grams_per_serving:
{
"name": "Tuna pizza",
"aliases": ["tuna pizza"],
"ingredients": [
{"alias": "pizza dough", "grams": 165},
{"alias": "default tuna", "grams": 60},
{"alias": "cheese", "grams": 40}
]
}Docker
Build:
docker build -t nutrition-mcp:0.2.0 .Run:
docker run -d \
--name nutrition-mcp \
-p 8765:8765 \
-e TZ=Europe/Bucharest \
-e MCP_TOKEN=change-me \
-e PUBLIC_HOSTS=192.168.1.142,nutrition-mcp \
-v /mnt/user/appdata/nutrition-mcp:/data \
nutrition-mcp:0.2.0For a published image:
docker run -d \
--name nutrition-mcp \
-p 8765:8765 \
-e TZ=Europe/Bucharest \
-e MCP_TOKEN=change-me \
-e PUBLIC_HOSTS=192.168.1.142,nutrition-mcp \
-v /mnt/user/appdata/nutrition-mcp:/data \
ghcr.io/REPLACE_ME/nutrition-mcp:0.2.0Unraid Add Container
Name:
nutrition-mcpRepository:
ghcr.io/REPLACE_ME/nutrition-mcp:0.2.0Network Type:
bridgePort: host
8765-> container8765TCPPath:
/mnt/user/appdata/nutrition-mcp->/dataEnv:
TZ=Europe/BucharestMCP_TOKEN=<long random token>PUBLIC_HOSTS=192.168.1.142,nutrition-mcp
WebUI:
http://[IP]:[PORT:8765]/
Hermes MCP Config
If Hermes connects over LAN:
mcp_servers:
nutrition:
url: "http://192.168.1.142:8765/mcp"
headers:
Authorization: "Bearer change-me"If Hermes and this server are on the same custom Docker network:
mcp_servers:
nutrition:
url: "http://nutrition-mcp:8765/mcp"
headers:
Authorization: "Bearer change-me"Environment
DATA_DIR=/data
TZ=Europe/Bucharest
MCP_TOKEN=
PUBLIC_HOSTS=192.168.1.142,nutrition-mcp
HOST=0.0.0.0
PORT=8765Notes
SQLite is the only database.
All persistent files live under
/data.No arbitrary SQL tool is exposed.
Deletes require an exact meal
entry_id.Historical entries keep snapshots when foods or recipes are updated.
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.
Latest Blog Posts
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/Ispas-Catalin/hermes-nutrition-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server