Stores workout logs, nutrition data, and body metrics in a local SQLite database with support for workout exercises and sets, meal tracking, and body measurements including weight and skinfolds.
MCP Logger
A Python/uv + FastMCP server for logging workouts, nutrition, and body metrics. Single-user local SQLite database with stdio MCP interface.
this was entirely vibe coded
Features
Workouts: Flexible
workout -> exercises[] -> sets[]structure with tags, notes, RPE/RIR, distances, unilateral sides, etc.Nutrition: Cronometer/MyFitnessPal-style logging with meals and OpenNutrition-backed food snapshots.
Body Metrics: Weight and customizable skinfold tracking.
Search: Cross-domain search across all data.
Tools
Workout Tools
log_workout- Log a complete workout with exercises and setsget_workouts- Query workouts with filters (date range, type, tag)get_last_workout- Get most recent workout by type or tagget_exercise_history- Get history for a specific exercise
Nutrition Tools
upsert_nutrition_day- Create/update a nutrition dayupsert_meal- Create/update a meal within a dayadd_or_update_meal_item- Add/update food item (use with OpenNutrition MCP)get_nutrition_day- Get complete day with meals, items, and totalsget_nutrition_days_summary- Get summaries for a date rangedelete_meal_item,delete_meal,delete_nutrition_day- Delete operations
Body Metrics Tools
log_body_metrics- Log weight and skinfoldsget_body_metrics- Get body metrics with skinfolds
Search
search_logs- Search across workouts, nutrition, and body data
Installation & Running
MCP Config Example
Add to your MCP configuration:
Nutrition Workflow with OpenNutrition MCP
AI uses OpenNutrition MCP to search for foods (
search-food-by-name,get-food-by-id)AI computes macros for the desired serving size
AI calls
add_or_update_meal_itemwith food_id and calculated macros
Workout Planning
The AI can call get_last_workout or get_exercise_history to retrieve past sessions, then generate suggested workouts. Progression logic lives in the client AI, not this server.
Database
Data is stored in mcp_logger.db (SQLite) in the project root.
Example Usage
Log a Workout with Exercises
Set Fields
Each set can include:
reps: Number of repetitions (int or float)weight_kg/weight_lbs: Weight in kg or lbsdistance_m/distance_yards: Distance for running/rowingduration_s: Duration in secondsside: "left", "right", or "both" (for unilateral exercises)rpe: Rate of Perceived Exertion (1-10)rir: Reps In Reserve (0-5)is_warmup: Boolean for warmup setsset_index: Manual set ordering (defaults to order inserted)