# Cronometer Api MCP

> Cronometer Api MCP is an open-source MCP server for health and science. Read and log Cronometer nutrition data: food diary, macros, fasting and biometrics. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows
- **Repository:** https://github.com/rwestergren/cronometer-api-mcp
- **MCP Registry name:** io.github.rwestergren/cronometer-api-mcp
- **Categories:** [health and science](https://ai-powered.com/categories/health-and-science), [food and drink](https://ai-powered.com/categories/food-and-drink)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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.

### Claude Code: Or share it with your project (.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>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.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>"
      }
    }
  }
}
```

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

### Cursor (~/.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>"
      }
    }
  }
}
```

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

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
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
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```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>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.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>"
      }
    }
  }
}
```

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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.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>"
      }
    }
  }
}
```

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

### Devin Desktop (~/.config/devin/mcp_config.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>"
      }
    }
  }
}
```

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

### Cline (cline_mcp_settings.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>"
      }
    }
  }
}
```

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

### Zed (Zed settings.json)

```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.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```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>"
      }
    }
  }
}
```

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/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>"
      }
    }
  }
}
```

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

### Kiro (~/.kiro/settings/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>"
      }
    }
  }
}
```

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

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## Tools

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_log` (name suggests: reads): Diary entries for a date with nutrient contributions.
- `get_daily_nutrition` (name suggests: reads): Consumed macro and micronutrient totals.
- `get_nutrition_scores` (name suggests: reads): Category scores with per-nutrient confidence.
- `search_foods` (name suggests: reads): Search the Cronometer food database.
- `get_food_details` (name suggests: reads): Full nutrition profile and serving sizes for a food.
- `add_food_entry` (name suggests: changes): Log a food serving to the diary.
- `remove_food_entry` (name suggests: deletes): Remove diary entries.
- `add_custom_food` (name suggests: changes): Create a custom food.
- `update_custom_food` (name suggests: changes): Edit a custom food.
- `delete_custom_food` (name suggests: deletes): Retire a custom food.
- `delete_recipe` (name suggests: deletes): Delete a recipe or saved meal.
- `add_recipe` (name 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_note` (name suggests: changes): Add a diary note.
- `update_note` (name suggests: changes): Update a diary note.
- `search_activities` (name suggests: reads): Find activities to log.
- `add_exercise` (name suggests: changes): Log an exercise.
- `get_macro_targets` (name suggests: reads): Read macro targets and templates.
- `set_macro_targets` (name suggests: changes): Set macro and sodium targets.
- `set_macro_split` (name suggests: changes): Set protein, carbs and fat split.
- `get_fasting_history` (name suggests: reads): Fasting history for a date range.
- `get_fasting_stats` (name suggests: reads): Aggregate fasting statistics.
- `list_biometrics` (name suggests: reads): List trackable biometrics.
- `get_biometrics` (name suggests: reads): Biometric time series.
- `add_biometric` (name suggests: changes): Record a biometric reading.

## 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.

## Alternatives

- [Tooluniverse](https://ai-powered.com/mcp/tooluniverse): Tooluniverse is an open-source MCP server for health and science.
- [Oya Browser](https://ai-powered.com/mcp/oya-browser): Oya Browser is a freemium MCP server for browser automation.
- [BasalFit](https://ai-powered.com/mcp/basalfit): BasalFit is a free MCP server for health and science.
- [Bloodwork](https://ai-powered.com/mcp/bloodwork): Bloodwork is an MCP server for health data.
- [Omics Health Chile](https://ai-powered.com/mcp/omics-health-chile): Omics Health Chile is an MCP server for health and science.
- [Proactive Parent guidance](https://ai-powered.com/mcp/proactive-parent-guidance): Proactive Parent guidance is an MCP server for health and science.
- [abiu](https://ai-powered.com/mcp/abiu): abiu is an MCP server for food and drink.
- [Psychotherapy](https://ai-powered.com/mcp/psychotherapy): Psychotherapy is an MCP server for health and science.

---
Source: https://ai-powered.com/mcp/cronometer-api-mcp
