macrofactor-mcp
v0.1.1Fueling & recovery decision engine combining MacroFactor nutrition with Garmin training data
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
setup_check
Check local setup and explain the easiest next action. Use this first when the MCP seems empty, stale, misconfigured, or when you are not sure which tool to call next. Args: show_workflows: Include common question-to-tool workflows.
| Parameter | Type | Description |
|---|---|---|
show_workflows | boolean |
import_export
Import a MacroFactor .xlsx export file into the database. Supports both Quick Export and All-Time Data formats. If filename is empty, auto-detects the most recent .xlsx in the data directory. Args: filename: Path to .xlsx file, or empty to auto-detect.
| Parameter | Type | Description |
|---|---|---|
filename | string |
clear_data
Clear all imported data so you can reimport fresh exports.
data_status
Check what data is currently loaded — date ranges, row counts, last import.
query
Run a custom SQL query against the MacroFactor database. Available tables: - daily: date, calories, macros, targets, weight, expenditure, steps, micros - food_log: date, time, food details (from Quick Export) - workouts: date, exercise, sets, reps, weight (from Quick Export) - muscle_sets: date, muscle_group, sets - muscle_volume: date, muscle_group, volume_kg - exercise_tracking: date, exercise, metric, value (from All-Time) - body_metrics: date, metric, value - custom_foods: food_name, nutrition info - nutrition_targets: program_date…
| Parameter | Type | Description |
|---|---|---|
sql * | string |
get_nutrition_summary
Get nutrition summary for a specific date. Args: date_str: Date in YYYY-MM-DD format. Empty = today.
| Parameter | Type | Description |
|---|---|---|
date_str | string |
get_nutrition_range
Get daily nutrition data for a date range. Args: start_date: Start date (YYYY-MM-DD) end_date: End date (YYYY-MM-DD)
| Parameter | Type | Description |
|---|---|---|
end_date * | string | |
start_date * | string |
get_food_log
Get all foods logged on a specific date. Args: date_str: Date (YYYY-MM-DD). Default: today.
| Parameter | Type | Description |
|---|---|---|
date_str | string |
search_food
Search logged foods by name across all dates. Also searches custom foods if no log results found. Args: query: Search term (case-insensitive). limit: Max results (default 20).
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer |
get_weight_trend
Get weight trend data. Defaults to last 30 days. Args: start_date: Start date (YYYY-MM-DD). Default: 30 days ago. end_date: End date (YYYY-MM-DD). Default: today.
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
start_date | string |
get_workout_log
Get workout details for a specific date. Args: date_str: Date (YYYY-MM-DD). Default: most recent workout.
| Parameter | Type | Description |
|---|---|---|
date_str | string |
get_workout_history
Get a summary of all workouts in a date range. Defaults to last 30 days. Args: start_date: Start date (YYYY-MM-DD) end_date: End date (YYYY-MM-DD)
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
start_date | string |
get_muscle_group_summary
Get muscle group sets and volume summary. Defaults to last 7 days. Args: start_date: Start date (YYYY-MM-DD) end_date: End date (YYYY-MM-DD)
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
start_date | string |
get_exercise_progress
Track progress for a specific exercise over time. Args: exercise: Exercise name (case-insensitive, partial match). metric: One of: estimated_1rm, estimated_3rm, estimated_10rm, total_volume, best_set_volume, heaviest_weight, total_reps, best_set_reps, total_sets, total_duration, best_set_duration, total_distance, best_set_distance. limit: Max data points to return (default 20, most recent).
| Parameter | Type | Description |
|---|---|---|
exercise * | string | |
limit | integer | |
metric | string |
list_exercises
List all tracked exercises with available metrics.
sync_garmin
Sync Garmin health data into local DuckDB for fast cross-queries with MacroFactor data. Pulls daily stats, activities, sleep, training status, and body fat from Garmin Connect for the last N days. Data is upserted (idempotent). Args: days: Number of days to sync (default 7).
| Parameter | Type | Description |
|---|---|---|
days | integer |
garmin_status
Quick Garmin health snapshot for a date. No API calls — reads from synced DuckDB data. Combines daily stats, sleep, and training status in one view. Run sync_garmin first to populate data. Args: date_str: Date in YYYY-MM-DD format. Empty = today.
| Parameter | Type | Description |
|---|---|---|
date_str | string |
daily_briefing
Complete day view combining MacroFactor nutrition + Garmin health data. The cross-data tool — shows nutrition, adherence, body, activity, sleep, and training in one view. No API calls — reads from DuckDB. Args: date_str: Date in YYYY-MM-DD format. Empty = today.
| Parameter | Type | Description |
|---|---|---|
date_str | string |
get_compliance_report
Compare actual intake vs targets over a date range. Shows adherence. Args: start_date: Start date (YYYY-MM-DD) end_date: End date (YYYY-MM-DD)
| Parameter | Type | Description |
|---|---|---|
end_date * | string | |
start_date * | string |
get_digest
Get a comprehensive weekly or monthly digest combining nutrition, weight, training, and adherence. One call instead of five — gives a complete picture of a period. Args: period: "week" (last 7 days) or "month" (last 30 days). end_date: End date (YYYY-MM-DD). Default: today.
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
period | string |
detect_phases
Auto-detect cut/bulk/maintenance phases from weight trend and energy balance. Analyzes the full history and identifies distinct phases based on trend weight direction and caloric balance. Each phase shows duration, weight change, and average deficit/surplus. Args: min_days: Minimum days for a phase to be reported (default 14).
| Parameter | Type | Description |
|---|---|---|
min_days | integer |
analyze_meal_patterns
Analyze meal timing, frequency, and which foods correlate with hitting targets. Shows when you eat, how many meals per day, most frequent foods, and which foods appear most on days where you hit your calorie and protein targets. Args: start_date: Start date (YYYY-MM-DD). Default: 30 days ago. end_date: End date (YYYY-MM-DD). Default: today. limit: Max foods to show per category (default 15).
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
limit | integer | |
start_date | string |
get_combined_data
Unified cross-domain query — returns merged nutrition + health data by date. One call replaces multiple tool calls. Returns all requested domains in one payload. Args: start_date: Start date (YYYY-MM-DD). Default: 7 days ago. end_date: End date (YYYY-MM-DD). Default: today. domains: List of domains to include. Options: nutrition, weight, sleep, training, activity, workouts. Default: all.
| Parameter | Type | Description |
|---|---|---|
domains | ||
end_date | string | |
start_date | string |
weekly_report
Comprehensive 7-day report — nutrition, workouts, sleep, body, activity in one call. Includes daily detail for weight and nutrition, full workout breakdown with merged MacroFactor + Garmin strength data, sleep trends, and training load. Args: end_date: Last day of the week (YYYY-MM-DD). Default: today.
| Parameter | Type | Description |
|---|---|---|
end_date | string |
recovery_check
Readiness assessment — should you train hard today? Combines last night's sleep, body battery, training load ratio, and yesterday's nutrition compliance into a single readiness view. Args: date_str: Date to check (YYYY-MM-DD). Default: today.
| Parameter | Type | Description |
|---|---|---|
date_str | string |
nutrition_performance_correlation
Correlate nutrition intake with next-day training metrics. Shows whether protein/calorie intake patterns affect next-day body battery, HRV, and workout performance. Splits days into high/low intake buckets. Args: start_date: Start date (YYYY-MM-DD). Default: 30 days ago. end_date: End date (YYYY-MM-DD). Default: today.
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
start_date | string |
sleep_analysis
Analyze what affects sleep quality — prior-day training, calories, timing. Correlates sleep scores with training intensity, total calories, and meal timing from the preceding day. Args: start_date: Start date (YYYY-MM-DD). Default: 30 days ago. end_date: End date (YYYY-MM-DD). Default: today.
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
start_date | string |
body_comp_trend
Track body composition over time — weight, body fat, training volume, energy balance. Answers: am I gaining muscle or fat? Combines weight trend with body fat, training volume, and calorie surplus/deficit. Args: start_date: Start date (YYYY-MM-DD). Default: 90 days ago. end_date: End date (YYYY-MM-DD). Default: today.
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
start_date | string |
get_insights
Get personalized insights based on your nutrition, training, sleep, and recovery data. Analyzes cross-domain patterns specific to YOUR data. Includes: - Current state (phase, weight trajectory, weekly nutrition pacing) - Trend alerts (sleep, HRV, body battery, compliance changes) - Personal correlations (what actually affects YOUR recovery) - Actionable recommendations prioritized by urgency - Sparkline trends for key metrics Works best with both MacroFactor and Garmin data synced. No arguments needed — analyzes everything automatically.