Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CRONOMETER_DATA_DIR | No | Optional override for the directory where sync data and session cookies are stored. Defaults to ~/.local/share/cronometer-mcp/. | |
| CRONOMETER_PASSWORD | Yes | Your Cronometer account password. | |
| CRONOMETER_USERNAME | Yes | Your Cronometer account email address. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_food_log | Get detailed food log with individual food entries and full nutrition. Returns every food entry with macros and micronutrients. Great for analyzing what was eaten and spotting nutrient gaps. Args: start_date: Start date as YYYY-MM-DD (defaults to today). end_date: End date as YYYY-MM-DD (defaults to today). |
| get_daily_nutrition | Get daily nutrition summary with macro totals per day. Returns calorie, protein, carb, fat, and fiber totals for each day. Use this for quick daily overviews and trend analysis. Args: start_date: Start date as YYYY-MM-DD (defaults to 7 days ago). end_date: End date as YYYY-MM-DD (defaults to today). |
| get_micronutrients | Get detailed micronutrient breakdown for meal planning. Shows vitamins, minerals, and other micronutrients per day with period averages. Use this to identify nutrient gaps and plan meals. Args: start_date: Start date as YYYY-MM-DD (defaults to 7 days ago). end_date: End date as YYYY-MM-DD (defaults to today). |
| export_raw_csv | Export raw CSV data from Cronometer for any data type. Useful when you need the full unprocessed export. Args: export_type: One of 'servings', 'daily_summary', 'exercises', 'biometrics', 'notes'. start_date: Start date as YYYY-MM-DD (defaults to today). end_date: End date as YYYY-MM-DD (defaults to today). |
| search_foods | Search Cronometer's food database by name. Returns matching foods with their IDs and source information needed to add a serving (food_id, food_source_id, measure_id). Args: query: Food name or keyword to search for (e.g. "eggs", "chicken breast"). |
| get_food_details | Get detailed food information including available serving measures. Use this after search_foods to get the measure_id needed for add_food_entry. Returns all available serving sizes with their numeric IDs and gram weights. Args: food_source_id: Food source ID from search_foods results. |
| add_food_entry | Add a food entry to the Cronometer diary. Use search_foods to find food_id and food_source_id, then get_food_details for measure_id and weight_grams. For CRDB/custom foods, you can omit measure_id (defaults to a universal NCCDB measure that works for all food sources). When measure_id is omitted, quantity is set to weight_grams. Args: food_id: Numeric food ID from search_foods results. food_source_id: Food source ID from search_foods results. weight_grams: Weight of the serving in grams. date: Date to log the entry as YYYY-MM-DD (e.g. "2026-03-04"). measure_id: Measure/unit ID. Pass 0 (default) to use the universal measure that works for all food sources. quantity: Number of servings. Defaults to weight_grams when measure_id is 0 (universal gram-based measure). diary_group: Meal slot — one of "Breakfast", "Lunch", "Dinner", "Snacks" (case-insensitive, defaults to "Breakfast"). |
| remove_food_entry | Remove a food entry from the Cronometer diary. Args: serving_id: The serving ID returned by add_food_entry (e.g. "D80lp$"). |
| get_macro_targets | Get current daily macro targets from Cronometer. Returns the effective macro targets (protein, fat, carbs, calories) and the template name for a specific date or all days of the week. Args: target_date: Date as YYYY-MM-DD to get targets for (defaults to today). Pass "all" to get the full weekly schedule. |
| set_macro_targets | Update daily macro targets in Cronometer. Reads current targets first, then updates only the provided values. Omitted values remain unchanged. Args: protein_grams: Protein target in grams. fat_grams: Fat target in grams. carbs_grams: Net carbs target in grams. calories: Calorie target in kcal. target_date: Date as YYYY-MM-DD (defaults to today). template_name: Template name (defaults to "Custom Targets"). |
| set_weekly_macro_schedule | Set the recurring weekly macro schedule by assigning a template to days. This updates the DEFAULT schedule that applies to all future dates, not just a specific date override. First finds the template by name (from existing saved templates or from a recently created per-date template), then assigns it to the specified days of the week. Args: template_name: Name of a saved macro target template (e.g. "Retatrutide GI-Optimized", "Keto Rigorous"). days: Comma-separated day names or "all" (default). E.g. "Monday,Wednesday,Friday" or "all". |
| list_macro_templates | List all saved macro target templates in Cronometer. Returns template names, IDs, and their macro values. Use this to find the template_name for set_weekly_macro_schedule. |
| create_macro_template | Create a new saved macro target template in Cronometer. Optionally assigns it to all days of the week as the recurring default. Args: template_name: Name for the new template (e.g. "Retatrutide GI-Optimized"). protein_grams: Protein target in grams. fat_grams: Fat target in grams. carbs_grams: Net carbs target in grams. calories: Calorie target in kcal. assign_to_all_days: If True, also set this as the recurring weekly schedule for all 7 days (default False). |
| get_fasting_history | Get fasting history from Cronometer. Returns all fasts (or fasts within a date range) with their status, names, recurrence rules, and timestamps. Args: start_date: Start date as YYYY-MM-DD (omit for all history). end_date: End date as YYYY-MM-DD (omit for all history). |
| get_fasting_stats | Get aggregate fasting statistics from Cronometer. Returns total fasting hours, longest fast, 7-fast average, and completed fast count. |
| delete_fast | Delete a fast entry from Cronometer. Use get_fasting_history first to find the fast_id. Args: fast_id: The fast ID to delete. |
| cancel_active_fast | Cancel an active (in-progress) fast while preserving the recurring schedule. Use get_fasting_history to find active fasts (is_active=true). Args: fast_id: The fast ID of the active fast to cancel. |
| get_recent_biometrics | Get the most recently logged biometric entries from Cronometer. Returns recent values for weight, blood glucose, blood pressure, heart rate, body fat, and other tracked biometrics. |
| add_biometric | Add a biometric entry to Cronometer. Supported metric types: weight (lbs), blood_glucose (mg/dL), heart_rate (bpm), body_fat (%). Args: metric_type: One of 'weight', 'blood_glucose', 'heart_rate', 'body_fat'. value: The value in display units (lbs, mg/dL, bpm, %). entry_date: Date as YYYY-MM-DD. |
| remove_biometric | Remove a biometric entry from Cronometer. Use get_recent_biometrics to find biometric_id values. Args: biometric_id: The biometric entry ID (e.g. "BXW0DA"). |
| sync_cronometer | Download Cronometer data and save locally as JSON + food-log.md. Downloads servings and daily summary data, saves JSON exports, and regenerates food-log.md. Output directory defaults to ~/.local/share/cronometer-mcp/ but can be overridden with the CRONOMETER_DATA_DIR environment variable. Args:
start_date: Start date as YYYY-MM-DD (defaults to |
| copy_day | Copy all diary entries from one date to another. Server-side operation that copies ALL entries (food, exercise, notes, biometrics) from source to destination. Additive — does not remove existing entries on the destination date. Args: source_date: Date to copy FROM as YYYY-MM-DD. destination_date: Date to copy TO as YYYY-MM-DD. |
| set_day_complete | Mark a diary day as complete or incomplete. Args: date: Date to mark as YYYY-MM-DD. complete: True to mark complete, False to mark incomplete. |
| get_repeated_items | List all recurring food entries. Returns all repeat items configured in Cronometer, including their food name, quantity, measure, diary group, and which days of the week they repeat on. |
| add_repeat_item | Add a recurring food entry that auto-logs on selected days. Quantity is in default servings for the food (e.g., for coffee where the default serving is 1 cup, quantity=12 means 12 cups). Use search_foods to find food_id and food_source_id. Args: food_id: Numeric food ID from search_foods results. food_source_id: Food source ID from search_foods results. quantity: Number of default servings. food_name: Display name for the food. diary_group: Meal slot — "Breakfast", "Lunch", "Dinner", or "Snacks". days_of_week: Comma-separated day numbers (0=Sun, 1=Mon, ..., 6=Sat), or "all" for every day (default), or "weekdays", or "weekends". |
| delete_repeat_item | Delete a recurring food entry. Use get_repeated_items to find the repeat_item_id. Args: repeat_item_id: The ID of the repeat item to delete. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |