Commit graph

2 commits

Author SHA1 Message Date
ebb44fd712 test: add 25-test suite + fix sum_nutriments display keys
- 25 integration tests: DB init, default goals, FTS5 cache, upsert,
  portion scaling (100g/50g/200g/empty/non-numeric), sum_nutriments
  (single/multiple/empty/partial/no-data), meal detection, date format,
  log entry + summary round trip, custom food + sum, delete entry,
  goals get/update, weight log + history + upsert
- Fix: sum_nutriments now uses TRACKED_NUTRIENTS display names (first
  tuple element) instead of deriving from OFF field names — fixes
  proteins→protein, energy-kcal→energy_kcal mismatches
- Fix: weight_log.date is now UNIQUE for proper upsert behavior
- Fix: build_daily_summary remaining keys use display names
- Added lib.rs for integration test access
- Added regex dev-dependency

Closes nutrition-mcp-45t
2026-08-20 17:25:41 +01:00
244e141053 feat: scaffold nutrition-mcp server with all 13 tools
Rust MCP server using rmcp SDK with streamable HTTP transport.
- Config from env vars (bind, api_key, db_path, off_user_agent)
- SQLite schema: products (FTS5), entries, daily_goal, weight_log
- OFF API client: Search-a-licious + v3 barcode + SQLite caching
- 13 MCP tools: search_food, get_food_by_barcode, log_food,
  log_custom_food, delete_entry, daily_summary, history,
  list_entries, get_goals, set_goals, log_weight, weight_history,
  bulk_import (stub)
- 14 tracked nutrients (gout + hypertension aware)
- Bearer token auth middleware
- Smoke tested: health, initialize, tools/list, get_goals, daily_summary

Closes nutrition-mcp-dfl
2026-08-20 16:52:11 +01:00