Skip to content
MCP server

Cronometer Api MCP

Read and log Cronometer nutrition data: food diary, macros, fasting and biometrics

Runs locally

Cronometer Api MCP is an open-source MCP server for health and science. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, macOS, Linux
Runs
Locally
What it can do
Can delete data (3 tools)
Access
Needs a secret key or token
Version
0.2.8

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add cronometer-api-mcp --env CRONOMETER_USERNAME='<CRONOMETER_USERNAME>' --env CRONOMETER_PASSWORD='<CRONOMETER_PASSWORD>' --env CRONOMETER_TOTP_SECRET='<CRONOMETER_TOTP_SECRET>' -- uvx cronometer-api-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "cronometer-api-mcp": {
      "command": "uvx",
      "args": [
        "cronometer-api-mcp"
      ],
      "env": {
        "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
        "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
        "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "cronometer-api-mcp": {
      "command": "uvx",
      "args": [
        "cronometer-api-mcp"
      ],
      "env": {
        "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
        "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
        "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "cronometer-api-mcp": {
      "command": "uvx",
      "args": [
        "cronometer-api-mcp"
      ],
      "env": {
        "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
        "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
        "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "cronometer-api-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "cronometer-api-mcp"
      ],
      "env": {
        "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
        "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
        "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add cronometer-api-mcp --env CRONOMETER_USERNAME='<CRONOMETER_USERNAME>' --env CRONOMETER_PASSWORD='<CRONOMETER_PASSWORD>' --env CRONOMETER_TOTP_SECRET='<CRONOMETER_TOTP_SECRET>' -- uvx cronometer-api-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.cronometer-api-mcp]
command = "uvx"
args = ["cronometer-api-mcp"]
env = { CRONOMETER_USERNAME = "<CRONOMETER_USERNAME>", CRONOMETER_PASSWORD = "<CRONOMETER_PASSWORD>", CRONOMETER_TOTP_SECRET = "<CRONOMETER_TOTP_SECRET>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "cronometer-api-mcp": {
      "command": "uvx",
      "args": [
        "cronometer-api-mcp"
      ],
      "env": {
        "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
        "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
        "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "cronometer-api-mcp": {
          "command": "uvx",
          "args": [
            "cronometer-api-mcp"
          ],
          "env": {
            "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
            "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
            "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e CRONOMETER_USERNAME='<CRONOMETER_USERNAME>' -e CRONOMETER_PASSWORD='<CRONOMETER_PASSWORD>' -e CRONOMETER_TOTP_SECRET='<CRONOMETER_TOTP_SECRET>' cronometer-api-mcp uvx -- cronometer-api-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "cronometer-api-mcp": {
          "command": "uvx",
          "args": [
            "cronometer-api-mcp"
          ],
          "env": {
            "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
            "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
            "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "cronometer-api-mcp": {
          "command": "uvx",
          "args": [
            "cronometer-api-mcp"
          ],
          "env": {
            "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
            "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
            "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "cronometer-api-mcp": {
          "command": "uvx",
          "args": [
            "cronometer-api-mcp"
          ],
          "env": {
            "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
            "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
            "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "cronometer-api-mcp": {
          "command": "uvx",
          "args": [
            "cronometer-api-mcp"
          ],
          "env": {
            "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
            "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
            "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "cronometer-api-mcp": {
          "command": "uvx",
          "args": [
            "cronometer-api-mcp"
          ],
          "env": {
            "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
            "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
            "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "cronometer-api-mcp": {
          "command": "uvx",
          "args": [
            "cronometer-api-mcp"
          ],
          "env": {
            "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
            "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
            "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "cronometer-api-mcp": {
          "command": "uvx",
          "args": [
            "cronometer-api-mcp"
          ],
          "env": {
            "CRONOMETER_USERNAME": "<CRONOMETER_USERNAME>",
            "CRONOMETER_PASSWORD": "<CRONOMETER_PASSWORD>",
            "CRONOMETER_TOTP_SECRET": "<CRONOMETER_TOTP_SECRET>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • CRONOMETER_USERNAMEYour Cronometer account emailRequired
  • CRONOMETER_PASSWORDYour Cronometer account passwordRequired
  • CRONOMETER_TOTP_SECRETBase32 key for accounts with two-factor authentication
  • CRONOMETER_ACCOUNT_TZOptional IANA timezone override, for example America/Los_Angeles

About Cronometer Api MCP

This server talks to the same JSON REST API that the Cronometer Android app uses, which the README says was reverse-engineered, rather than scraping the web backend. That gives cleaner payloads than the other Cronometer MCP it compares itself with. You sign in with your Cronometer email and password through environment variables, and accounts with two-factor authentication can supply the base32 TOTP secret so the server derives the code itself at each login.

Beyond reading, it can write: log foods and exercise, create or edit custom foods and recipes (including importing a recipe from a plain ingredient list), add notes, copy a day, mark days complete and set macro targets or splits. Date parameters accept values like today, yesterday or "3 days ago", resolved in your account timezone, and multi-day queries return up to 31 days.

It runs locally over stdio via uvx from PyPI. A hosted version for Claude.ai, ChatGPT and Grok is advertised as coming soon with a waitlist.

Tools this server provides (27)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 3 of 27 tools delete data and 10 change data; 3 names don't say.

From the server's own tool labels and tool names; not verified by us.

get_food_logName suggests: reads
Diary entries for a date with nutrient contributions.
get_daily_nutritionName suggests: reads
Consumed macro and micronutrient totals.
get_nutrition_scoresName suggests: reads
Category scores with per-nutrient confidence.
search_foodsName suggests: reads
Search the Cronometer food database.
get_food_detailsName suggests: reads
Full nutrition profile and serving sizes for a food.
add_food_entryName suggests: changes
Log a food serving to the diary.
remove_food_entryName suggests: deletes
Remove diary entries.
add_custom_foodName suggests: changes
Create a custom food.
update_custom_foodName suggests: changes
Edit a custom food.
delete_custom_foodName suggests: deletes
Retire a custom food.
delete_recipeName suggests: deletes
Delete a recipe or saved meal.
add_recipeName suggests: changes
Create a recipe from existing foods.
import_recipe
Create a recipe from a free-text ingredient list.
copy_day
Copy entries from the previous day.
mark_day_complete
Mark a diary day complete or incomplete.
add_noteName suggests: changes
Add a diary note.
update_noteName suggests: changes
Update a diary note.
search_activitiesName suggests: reads
Find activities to log.
add_exerciseName suggests: changes
Log an exercise.
get_macro_targetsName suggests: reads
Read macro targets and templates.
set_macro_targetsName suggests: changes
Set macro and sodium targets.
set_macro_splitName suggests: changes
Set protein, carbs and fat split.
get_fasting_historyName suggests: reads
Fasting history for a date range.
get_fasting_statsName suggests: reads
Aggregate fasting statistics.
list_biometricsName suggests: reads
List trackable biometrics.
get_biometricsName suggests: reads
Biometric time series.
add_biometricName suggests: changes
Record a biometric reading.

What it does

Food diary
Entries with food names, amounts, meal groups and per-entry nutrients.
Daily nutrition totals
Macro and micronutrient totals and category scores with confidence.
Diary editing
Add or remove entries, copy days and mark days complete.
Custom foods and recipes
Create, edit and retire foods, or import a recipe from text.
Targets and fasting
Read and set macro targets; view fasting history and stats.
Biometrics
Read and record weight, body fat and other metrics.

Good for

  • Ask an assistant what you ate and your macro totals yesterday
  • Log a meal by describing it
  • Review fasting history and weight trend over a date range
  • Set up recipes and custom foods without the app

Pricing

Open source

MIT-licensed; needs a Cronometer account

Cronometer Api MCP FAQ

How does Cronometer Api MCP log in?

With your Cronometer email and password in environment variables, plus an optional TOTP secret for two-factor accounts.

Does Cronometer Api MCP use an official API?

The README says it is built on the reverse-engineered mobile REST API.

Does Cronometer Api MCP only read data?

No, it can also add and remove diary entries and change targets.

Can I use relative dates?

Yes, today, yesterday and N days ago are accepted for several tools.

Is Cronometer Api MCP free?

Yes. Cronometer Api MCP is open source, so you can use and self-host it for free.

How do I add Cronometer Api MCP to Claude Code?

Run this command in your terminal: claude mcp add cronometer-api-mcp --env CRONOMETER_USERNAME='<CRONOMETER_USERNAME>' --env CRONOMETER_PASSWORD='<CRONOMETER_PASSWORD>' --env CRONOMETER_TOTP_SECRET='<CRONOMETER_TOTP_SECRET>' -- uvx cronometer-api-mcp

What are the best alternatives to Cronometer Api MCP?

The closest alternatives to Cronometer Api MCP are Tooluniverse, Oya Browser, BasalFit, Bloodwork and Omics Health Chile.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers