# cronometer-api-mcp

Connects your Cronometer nutrition log to an AI assistant via mobile REST endpoints. Tracks daily calories, macros, biometrics, and diary entries right in chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 65
- Author: rwestergren
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rwestergren/cronometer-api-mcp
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/cronometer-api-mcp

## What it does

The server communicates with the mobile JSON endpoints used by the Cronometer Android app rather than the web interface. It gives the assistant tools to inspect food logs (`get_food_log`), calculate nutrient sums (`get_daily_nutrition`), search items (`search_foods`), and record meals. It also handles recipe creation from text lists, fasting intervals, and biometric metrics such as weight or heart rate.

Running the tool requires `uvx` alongside `CRONOMETER_USERNAME` and `CRONOMETER_PASSWORD` in the environment. If two-factor authentication is active on the account, omitting `CRONOMETER_TOTP_SECRET` results in an authentication failure with `TOTP_CODE_REQUIRED`. You can also configure an explicit IANA zone through `CRONOMETER_ACCOUNT_TZ` to keep diary timestamps accurate.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `CRONOMETER_USERNAME`, `CRONOMETER_PASSWORD`, `CRONOMETER_TOTP_SECRET`, `CRONOMETER_ACCOUNT_TZ` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env CRONOMETER_USERNAME=<CRONOMETER_USERNAME> --env CRONOMETER_PASSWORD=<CRONOMETER_PASSWORD> --env CRONOMETER_TOTP_SECRET=<CRONOMETER_TOTP_SECRET> --env CRONOMETER_ACCOUNT_TZ=<CRONOMETER_ACCOUNT_TZ> --transport stdio cronometer-api-mcp -- uvx cronometer-api-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cronometer-api-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add cronometer-api-mcp --env CRONOMETER_USERNAME=<CRONOMETER_USERNAME> --env CRONOMETER_PASSWORD=<CRONOMETER_PASSWORD> --env CRONOMETER_TOTP_SECRET=<CRONOMETER_TOTP_SECRET> --env CRONOMETER_ACCOUNT_TZ=<CRONOMETER_ACCOUNT_TZ> -- uvx cronometer-api-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cronometer-api-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```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>",
                "CRONOMETER_ACCOUNT_TZ": "<CRONOMETER_ACCOUNT_TZ>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cronometer-api-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "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>",
                "CRONOMETER_ACCOUNT_TZ": "<CRONOMETER_ACCOUNT_TZ>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cronometer-api-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e CRONOMETER_USERNAME=<CRONOMETER_USERNAME> -e CRONOMETER_PASSWORD=<CRONOMETER_PASSWORD> -e CRONOMETER_TOTP_SECRET=<CRONOMETER_TOTP_SECRET> -e CRONOMETER_ACCOUNT_TZ=<CRONOMETER_ACCOUNT_TZ> cronometer-api-mcp uvx cronometer-api-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from cronometer-api-mcp <command>

## When to use it
- log meals and food portions into the daily diary
- inspect daily macro and micronutrient intake
- search the Cronometer food database for nutritional breakdowns
- retrieve fasting logs and biometric trends over time

## Example prompts
- What are my total calories and protein intake logged for yesterday?
- Add 150 grams of cooked brown rice to my lunch diary.
- Show my weight and body fat trends for the past two weeks.

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44874
- [screenpipe](https://affpapa.org/en/nevibecode/mcp/screenpipe.md) — MCP server · ★ 22053
- [Inbox Zero](https://affpapa.org/en/nevibecode/mcp/inbox-zero.md) — MCP server · ★ 12791
- [kaneo](https://affpapa.org/en/nevibecode/mcp/kaneo.md) — MCP server · ★ 9602
- [Mindwtr](https://affpapa.org/en/nevibecode/mcp/mindwtr.md) — MCP server · ★ 2318
- [Azure DevOps (ADO)](https://affpapa.org/en/nevibecode/mcp/azure-devops-ado.md) — MCP server · ★ 2067

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
