io.github.rwestergren/cronometer-api-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CRONOMETER_PASSWORD | Yes | Your Cronometer password | |
| CRONOMETER_USERNAME | Yes | Your Cronometer email address |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Cronometer MCP server for nutrition tracking via the mobile REST API. Provides access to food search, diary management, daily nutrition data, macro targets, biometrics, and fasting history from Cronometer. Use search_foods to find foods, get_food_details for nutrition info and serving sizes, add_food_entry to log meals, and get_food_log to review what was eaten. For relative-date questions, prefer relative inputs (today, yesterday, N days ago) in get_food_log, get_daily_nutrition, and get_nutrition_scores instead of calculating dates from conversation history. Use get_daily_nutrition(days=N) for calories or nutrients over the last N calendar days, including today; set date='yesterday' for complete days only. Relative dates are resolved at call time in the account timezone.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_food_logA | Get diary entries for one day or the last N calendar days. Prefer relative inputs for relative questions, rather than dates calculated from conversation history. For calorie/nutrient totals without individual entries, prefer get_daily_nutrition(days=N). Returns every food entry logged for the day. Each "Serving" entry is enriched (best-effort) with the food's name, source, serving_size, servings, and that food's own nutrient profile scaled to the amount eaten. Non-food entries (exercise, biometrics) carry their own name. serving_size defines one portion: quantity units weighing grams in total. servings is how many of those portions were consumed. For example, serving_size={quantity: 2, unit: "cookies", grams: 30} with servings=1 means two cookies eaten; servings=0.5 means one cookie eaten. The size uses the entry's selected measure, or the food's default as a fallback. For serving-based recipes, serving_size.grams is null because the API uses reference-serving counts instead of gram weights. An invalid serving_size.quantity is reported as null. Every diary entry carries diary_group: {group, name}, the meal slot it sits in (e.g. {"group": 4, "name": "Dinner"}). Group names are customizable per account, so read the meal from this field rather than inferring it from the entry's order or time. name is null for a group number the account doesn't define. See get_diary_groups for the full list. A busy day in "full" detail can be ~170,000 characters, which can exceed a client's output limit. Use detail="compact" (and/or food_id) to keep the response small. Note: the per-entry "nutrients" are each food's individual contribution, which is distinct from the day-level nutrition_summary aggregate below. Also returns a top-level energy_summary field with pre-computed values most relevant to the user:
Also returns a nutrition_summary field with consumed totals for every nutrient the user tracks in Cronometer (macros plus any tracked micronutrients such as saturated fat, cholesterol, or omega-3/6):
Args: date: Inclusive end date: YYYY-MM-DD, today, yesterday, or N days ago. Defaults to today in the account timezone, resolved at call time. days: Number of calendar days, 1–31 (default 1). Includes the end date; days=3 includes today, date='yesterday', days=3 excludes today. detail: "full" (default) returns every entry as described above. "compact" replaces each diary entry with a small object without per-entry nutrient arrays: entry_id (the servingId, noteId, exerciseId or biometricId that remove_food_entry takes), type, name, food_id, measure_id, grams, servings, time, order (raw), diary_group ({group, name}, as above), kcal, protein_g, carbs_g, fat_g, sodium_mg. Notes also carry their text. grams is passed through as-is (null stays null; for serving-based recipes it is a serving count). Values that cannot be derived are null. energy_summary and nutrition_summary are unchanged. Applies to each day. food_id: Only entries for this Cronometer food ID (non-food entries are excluded). It narrows the diary list only; energy_summary and nutrition_summary still describe the whole day. Applies in both detail modes and to each day. One day returns the usual date/diary/summaries. Multiple days return start_date, end_date, and a days list of those objects, oldest first. |
| get_diary_groupsA | Get the account's diary groups (meal slots) and their names. Group names are customizable, so "Lunch" is not always the same slot:
an account with extra groups such as "Post-workout" shifts every later
group. Use this to interpret entries from get_food_log, whose Returns each group as {group, pref, name, enabled}, in diary order. Group 0 is a regular slot whose name depends on the account. A group with enabled=false is hidden in the app but may still contain older entries. |
| add_food_entryA | Add a food entry to the Cronometer diary. Use search_foods to find food_id and measure_id, then get_food_details to confirm serving sizes and gram weights. Args: food_id: Numeric food ID from search_foods results. measure_id: Measure/unit ID from get_food_details. grams: Weight of the serving in grams. date: Date to log as YYYY-MM-DD (defaults to today). translation_id: Translation ID from search results (usually 0). diary_group: Meal slot: "auto" (default, picks by time of day) or the name of one of the account's diary groups, matched ignoring case and whitespace. "auto" requires unique enabled Breakfast, Lunch, Dinner and Snacks groups; otherwise choose an explicit name from get_diary_groups. time: Time of day to log at, 24-hour HH:MM or HH:MM:SS in the account timezone (defaults to now). With diary_group "auto", this also picks the meal slot, so logging lunch late still lands in lunch. |
| update_food_entryA | Change a logged food entry: its amount, its measure, or its meal. Use get_food_log to find the entry ID. Pass only what should change. Args: entry_id: Serving/entry ID from get_food_log. date: Date the entry is logged on as YYYY-MM-DD (defaults to today). grams: New weight of the serving in grams. Only supported for weight-based foods and recipes; change serving-based recipe amounts in Cronometer. measure_id: New measure/unit ID from get_food_details (the amount is still given in grams). diary_group: Move to another meal: the name of one of the account's enabled diary groups (see get_diary_groups), matched ignoring case and whitespace. "auto" is not accepted here. |
| remove_food_entryA | Remove one or more entries from the Cronometer diary. Works for every entry type in get_food_log's diary: foods (servingId), exercises (exerciseId), notes (noteId) and biometrics such as a weight (biometricId). Args: entry_ids: List of entry IDs to remove. date: Date the entries belong to as YYYY-MM-DD (defaults to today). |
| add_noteA | Add a note to a diary day. Notes show up in get_food_log's diary as entries of type "Note". Remove one with remove_food_entry and its noteId. Args: text: The note text. date: Date as YYYY-MM-DD (defaults to today). diary_group: Meal slot the note sits in: "auto" (default, picks by time of day) or the name of one of the account's diary groups, matched ignoring case and whitespace. "auto" requires unique enabled Breakfast, Lunch, Dinner and Snacks groups; otherwise choose an explicit name from get_diary_groups. time: Time of day for the note, 24-hour HH:MM or HH:MM:SS in the account timezone (defaults to now). With diary_group "auto", this also picks the meal slot. |
| update_noteA | Replace the text of a diary note. Args: note_id: noteId of the note, from get_food_log. text: The new note text. date: Date the note is on as YYYY-MM-DD (defaults to today). |
| mark_day_completeA | Mark a diary day as complete or incomplete. Args: date: Date to mark as YYYY-MM-DD. complete: True to mark complete, False for incomplete. |
| copy_dayA | Copy all diary entries from the previous day to the given date. Additive -- does not remove existing entries on the destination date. Args: date: Destination date as YYYY-MM-DD (defaults to today). |
| get_daily_nutritionA | Get consumed macro and micronutrient totals for one or more days. Use days=N for calories/nutrients over the last N calendar days. Prefer relative inputs over dates calculated from conversation history. Returns the amounts actually consumed for the day, covering every nutrient the user tracks in Cronometer (i.e. has a target set for). The response has:
A nutrient only appears if it's tracked in Cronometer. To surface e.g. saturated fat, cholesterol, or trans fat, set a target for it in Cronometer and it will flow through automatically. Args: date: Inclusive end date: YYYY-MM-DD, today, yesterday, or N days ago. Defaults to today in the account timezone, resolved at call time. days: Number of calendar days, 1–31 (default 1). Includes the end date; days=3 includes today, date='yesterday', days=3 excludes today. One day returns date, summary, and nutrients. Multiple days return start_date, end_date, and a days list of those objects, oldest first. |
| get_nutrition_scoresA | Get nutrition scores with per-nutrient consumed amounts and category grades. Returns category scores (All Targets, Vitamins, Minerals, Electrolytes, Antioxidants, Immune Support, Metabolism, Bone Health) with the actual consumed amount and confidence level for each tracked nutrient. This is the richest nutrition endpoint -- use it when you need to know both how much of each nutrient was consumed AND how close each is to the target. Args: date: YYYY-MM-DD, today, yesterday, or N days ago. Defaults to today in the account timezone, resolved at call time. Prefer relative inputs for relative questions over dates from conversation history. |
| search_foodsA | Search Cronometer's food database by name. Returns matching foods with their IDs and source information. Use the food_id and measure_id from results with add_food_entry, or pass food_id to get_food_details for full nutrition info. Args: query: Food name or keyword (e.g. "eggs", "chicken breast"). |
| get_food_detailsA | Get detailed food information including nutrition and serving sizes. Use this after search_foods to get the full nutrient profile and available measure_ids needed for add_food_entry. Args: food_id: Food ID from search_foods results. |
| add_custom_foodA | Create a custom food in Cronometer with specified nutrition. Nutrient amounts should be for the full serving size specified. After creation, use the returned food_id with add_food_entry to log it. Args: name: Food name. calories: Calories per serving (kcal). protein_g: Protein per serving (g). fat_g: Fat per serving (g). carbs_g: Carbs per serving (g). fiber_g: Fiber per serving (g, default 0). sugar_g: Sugar per serving (g, default 0). sodium_mg: Sodium per serving (mg, default 0). saturated_fat_g: Saturated fat per serving (g, default 0). extra_nutrients: Additional nutrients beyond the core macros above (vitamins, minerals, amino acids, etc.), keyed by Cronometer nutrient ID (from get_daily_nutrition, which pairs each id with its name) and valued per the full serving. IDs aren't validated, so a wrong one writes the wrong nutrient; must not reuse an ID the named macro args already cover. serving_name: Name for the serving size (default "1 serving"). serving_grams: Weight of one serving in grams (default 100). barcodes: Product barcodes (EAN-13, UPC-A, EAN-8, UPC-E or GTIN-14), e.g. the digits printed under the bars on the package; spaces and dashes are ignored. Scanning one of them in the Cronometer app then finds this food (search_foods does not match barcodes). The check digit is verified, so a misread digit is rejected rather than saved. |
| update_custom_foodA | Edit an existing custom food (one you created) in place. Only the arguments you pass change; everything else keeps its current value. Find the food_id with search_foods (source "Custom") or get_food_details. Diary entries that already use the food pick up the new values. Recipes cannot be edited with this tool, even though they also show as source "Custom". Nutrient amounts are per serving: the food's default serving, or serving_grams when you pass it. To change the serving weight without re-entering nutrition, pass serving_grams alone; the stored per-100g values stay put, so the per-serving numbers scale with the new weight. Args: food_id: ID of the custom food to edit. name: New food name. calories: Calories per serving (kcal). protein_g: Protein per serving (g). fat_g: Fat per serving (g). carbs_g: Carbs per serving (g). fiber_g: Fiber per serving (g). sugar_g: Sugar per serving (g). sodium_mg: Sodium per serving (mg). saturated_fat_g: Saturated fat per serving (g). extra_nutrients: Additional nutrients keyed by Cronometer nutrient ID (from get_daily_nutrition) and valued per serving; must not reuse an ID the named args already cover. serving_name: New name for the default serving. The app shows the serving as " "; a leading number ("2 cookies") is taken as the quantity (see serving_quantity). serving_grams: New total weight of the default serving in grams. Also resets the quantity to serving_quantity (or 1). serving_quantity: How many units make up the default serving (default 1 whenever serving_grams is passed). Without serving_grams the serving's total weight stays the same, so each unit gets lighter or heavier: changing "2 cookies = 30 g" to 3 gives "3 cookies = 30 g". To keep the per-unit weight, also pass serving_grams (45 here). Check the result with get_food_details, which lists each measure's quantity. barcodes: Replaces the food's barcodes (see add_custom_food for the accepted formats); pass [] to remove them all. To add one, pass the current barcodes from get_food_details plus the new one. |
| delete_custom_foodA | Delete a custom food (one you created) by retiring it. The food disappears from search and from the Custom Foods list. Diary entries that already use it are kept, and get_food_details can still read it by ID. Database foods (USDA, NCCDB, CRDB, ...) and recipes cannot be deleted with this tool. Args: food_id: ID of the custom food to delete. |
| delete_recipeA | Delete a recipe or saved meal that you created. By default the recipe is retired, as the app does for a recipe that has been logged: it disappears from search and from the recipe and meal lists, and diary entries that already use it are kept. permanent=True deletes it outright. This ALSO REMOVES THE DIARY ENTRIES that logged it. Use it only for a recipe that was never logged, or when the user has explicitly asked for those entries to go. Plain custom foods are not accepted; use delete_custom_food for those. Args: food_id: ID of the recipe or meal to delete. permanent: Delete outright instead of retiring (see above). |
| add_recipeA | Create a recipe in Cronometer from other foods in the database. Unlike add_custom_food, which takes hand-entered nutrition, a recipe references existing foods by ID and Cronometer derives the full nutrient profile (including micronutrients) from those ingredients. Use search_foods to find each ingredient's food_id. After creation, use the returned food_id with add_food_entry to log it. Args: name: Recipe name. ingredients: List of {"food_id": int, "grams": float} objects, one per ingredient. An optional "measure_id" overrides the unit shown in Cronometer's UI; "grams" always drives the nutrition math. serving_name: Name of the default serving measure (default "Serving"). serving_grams: Grams in one serving. Defaults to the full batch weight (one serving = the whole recipe). comments: Free-text recipe notes. |
| update_recipeA | Edit a recipe you created: rename it, change its ingredients or amounts, resize its default serving, or change its notes. Pass only what should change. A new ingredient list replaces the whole old one (use get_food_details to read the current ingredients first), and the nutrition is recalculated from it. Diary entries that already logged the recipe keep pointing at it and follow the new nutrition, as in the app. Saved meals cannot be edited with this tool. Ingredient and serving-size edits require a weight-based recipe; serving-based recipes only support name and notes edits. If the default serving is "full recipe", set a separate default serving in Cronometer before resizing it independently of the batch. Args: food_id: The recipe's food ID. name: New recipe name. ingredients: New list of {"food_id": int, "grams": float} objects, with an optional "measure_id", as for add_recipe. serving_grams: New weight of the default serving in grams. If omitted and the serving was the whole batch, it follows the new batch. comments: New free-text recipe notes. |
| import_recipeA | Create a recipe from a free-text ingredient list. Cronometer's "Import Recipe" feature: pass ingredients as plain text, one per line, and the server matches each to a food and converts the amount to grams. No need to call search_foods first. Prefer this when the user describes ingredients in their own words. Use add_recipe instead when you have exact food_ids and gram weights -- e.g. the user confirmed specific foods from search_foods results. Matching is fuzzy, so report the returned matches back to the user for confirmation. Unresolved lines are listed under "unmatched" and excluded from the recipe. This saves to My Foods; use add_food_entry to log it. Args: ingredients: Ingredient lines separated by newlines, e.g. "2 tbsp olive oil\n200g chicken". Include quantities where known, since bare names can match surprising amounts. name: Recipe name. Defaults to a server-generated one. |
| get_macro_targetsA | Get current macro targets including weekly schedule and templates. Returns fixed-gram targets, weight goal, sodium range, the macro split (percent of energy for protein, carbs and fat), the weekly macro schedule (which template applies to each day) and all saved macro target templates with their values. The split describes saved ratios, which are inactive in fixed-target or keto mode; shares are null when the ratio total is unknown or zero. |
| set_macro_targetsA | Set the daily macro targets in grams, the weekly weight goal and/or sodium. Confirm the new values with the user first, and read the current ones with get_macro_targets so they can be put back. Only the arguments you pass change. Gram targets require Fixed Targets mode in Cronometer's Macro & Energy Targets settings. The calorie target cannot be set directly: Cronometer computes it from BMR, activity level and the weight goal. Move it with weight_goal_per_week (in the account's weight unit per week, negative to lose; each 1 lb/week is about 500 kcal/day). Check the result with get_food_log's energy_summary.total_target_kcal. Args: protein_g: Daily protein target in grams. fat_g: Daily fat target in grams. net_carbs_g: Daily net-carb target in grams. weight_goal_per_week: Weight change per week, -2 to 2 (e.g. -1.5). sodium_mg_min: Daily sodium target (lower bound) in mg. sodium_mg_max: Daily sodium upper limit in mg. Gram targets are written to both places the app keeps them (profile prefs and the per-nutrient target rows), so the diary summary and the target bars agree. |
| set_macro_splitA | Set how the energy target is split between protein, carbs and fat. This changes the user's real targets: confirm the numbers with the user first, and read the current split with get_macro_targets so it can be put back. Values are percent of energy and must add up to 100. Requires Macro Ratios mode; fixed-target and keto modes are rejected. Failed writes attempt restoration and report the resulting state, which may remain partially changed or unknown if recovery fails. Args: protein: Protein share in percent (e.g. 30). carbs: Carbohydrate share in percent (e.g. 40). fat: Fat share in percent (e.g. 30). |
| get_fasting_historyA | Get fasting history from Cronometer. Returns fasts within the date range including status, timestamps, and duration. Args: start_date: Start date as YYYY-MM-DD (defaults to 30 days ago). end_date: End date as YYYY-MM-DD (defaults to today). |
| get_fasting_statsA | Get aggregate fasting statistics. Returns total fasting hours, longest fast, average fast duration, and completed fast count. |
| list_biometricsA | List the biometric metrics tracked in Cronometer. Returns every metric type the account can record (Weight, Body Fat, Heart Rate, Blood Glucose, Waist Size, Sleep, blood panels, body measurements, etc.). Use the metric_id and a unit_id from the results with get_biometrics. |
| get_biometricsA | Get a biometric time series such as weight or body fat from Cronometer. Returns the recorded values over the date range as a list of {day, value} points. Use list_biometrics to find metric_id and unit_id (e.g. Weight is metric_id 1, with unit_id 1 for kg or 2 for lbs). Args: metric_id: Numeric metric ID from list_biometrics. unit_id: Numeric unit ID from the metric's units in list_biometrics. start_date: Start date as YYYY-MM-DD (defaults to 30 days ago). end_date: End date as YYYY-MM-DD (defaults to today). |
| add_biometricA | Record a biometric reading such as a weight or body fat. Use list_biometrics for metric_id and unit_id (e.g. Weight is metric_id 1 with unit_id 1 for kg; Body Fat is metric_id 8 with unit_id 13 for %). The reading appears in get_food_log's diary as a "Biometric" entry; remove_food_entry with its biometricId deletes it. Args: metric_id: Numeric metric ID from list_biometrics. unit_id: Numeric unit ID from the metric's units; the amount is in this unit. amount: The reading. date: Date as YYYY-MM-DD (defaults to today). |
| search_activitiesA | Find activities to log with add_exercise, by name. Searches Cronometer's two activity catalogs: the current one ("General Walking", "HIIT") and the older, more specific one ("Walking 3.0 mph, moderate"). Every word of the query must appear in the name. Args: query: Activity name or keywords (e.g. "walking", "cycling"). |
| add_exerciseA | Log an exercise to the Cronometer diary. Use search_activities to find activity_id. The calorie burn is not calculated for you: pass it (estimate it from the activity's MET value, the minutes and the user's weight if the user doesn't know it). The exercise appears in get_food_log's diary as an "Exercise" entry; remove_food_entry with its exerciseId deletes it. Args: activity_id: Activity ID from search_activities. minutes: Duration in minutes. calories: Calories burned, as a positive number. date: Date as YYYY-MM-DD (defaults to today). diary_group: Meal slot: "auto" (default, picks by time of day) or the name of one of the account's diary groups, matched ignoring case and whitespace. "auto" requires unique enabled Breakfast, Lunch, Dinner and Snacks groups; otherwise choose an explicit name from get_diary_groups. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 30 tools
Most tools target a clearly distinct resource+action, and descriptions actively disambiguate the trickier pairs (get_food_log vs get_daily_nutrition vs get_nutrition_scores; add_custom_food vs add_recipe vs import_recipe). The remaining overlap is between the three nutrition-read tools and the three food/recipe-creation paths, but the guidance on when to use each is explicit enough that misselection is unlikely.
Every tool uses snake_case with a predictable verb_noun shape (get_food_log, add_food_entry, update_note, delete_recipe, set_macro_targets, list_biometrics). A few names like copy_day and mark_day_complete deviate slightly in noun structure but stay in the same convention.
30 tools is heavy for the rubric's sweet spot, though the domain genuinely spans diary, notes, foods, custom foods, recipes, nutrition, macros, fasting, biometrics, and exercise. Each tool maps to a real operation, but the surface is at the upper edge and includes some near-duplicate creation/read paths that inflate the count.
Coverage is strong: full diary entry lifecycle, notes, custom food CRUD, recipe create/update/import/delete, macro targets and split, biometrics, exercise, and fasting reads. Minor gaps remain—no update path for logged biometrics or exercises (only deletion via remove_food_entry), no water logging, and no dedicated note-delete tool—but these are workable.