- 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
60 lines
No EOL
1.2 KiB
TOML
60 lines
No EOL
1.2 KiB
TOML
[package]
|
|
name = "nutrition-mcp"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
description = "MCP server for personal calorie/nutrient tracking with OpenFood Facts integration"
|
|
license = "MIT"
|
|
|
|
[lib]
|
|
name = "nutrition_mcp"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "nutrition-mcp"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
# MCP protocol
|
|
rmcp = { version = "0.7", features = [
|
|
"server",
|
|
"macros",
|
|
"schemars",
|
|
"transport-streamable-http-server",
|
|
] }
|
|
|
|
# Async runtime
|
|
tokio = { version = "1", features = ["full"] }
|
|
tokio-util = { version = "0.7", features = ["rt"] }
|
|
|
|
# HTTP client (for OFF API)
|
|
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
|
|
|
|
# Database
|
|
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite", "macros"] }
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
schemars = "1"
|
|
|
|
# Web framework (for HTTP transport + auth middleware)
|
|
axum = "0.8"
|
|
|
|
# Error handling
|
|
anyhow = "1"
|
|
thiserror = "2"
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Misc
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
uuid = { version = "1", features = ["v4"] }
|
|
|
|
[profile.release]
|
|
opt-level = 2
|
|
strip = true
|
|
|
|
[dev-dependencies]
|
|
regex = "1" |