Skip to main content
Glama

cronometer-core

Shared Python core for a Cronometer CLI and a Cronometer MCP server, so an assistant (Claude, or any MCP client) can read your own Cronometer nutrition and biometric data.

All API-client, auth, model, and business logic lives in src/cronometer_core/ once. spec.py declares every operation, and both adapters are generated from it, so the CLI and MCP surfaces can never drift:

  • cronometer_core.cli:cli — a click CLI (cronometer <command> [switches]).

  • cronometer_core.mcp_server:main — a FastMCP server (Streamable HTTP) whose tools are a 1:1 wrapper of the CLI switches.

Output is normalised JSON by default; --text (CLI) / text=true (MCP read tools) renders a human-readable view. Cronometer has no public API key — auth is a session + GWT-RPC login handshake using your ordinary cronometer.com username/password. Everything is read-only.

Layout

Module

Role

config.py

Resolve CRONOMETER_USERNAME / CRONOMETER_PASSWORD / base URL.

errors.py

Typed CronometerError taxonomy.

auth.py

PasswordSessionAuth — the GWT-RPC login handshake + session.

client.py

CronometerClient — HTTP + retry/backoff + rate-limit handling.

models.py

CSV parsers + number-normalisation + nutrient IDs.

operations.py

Single source of truth — one pure function per op.

spec.py

Declarative op registry that drives both adapters.

format.py

Human-readable rendering (--text).

cli.py / mcp_server.py

Thin adapters generated from spec.py.

Related MCP server: renpho-mcp

Develop

pip install -e '.[dev]'
ruff check . && mypy && pytest --cov

Requires Python 3.10+ (FastMCP). The bundled python:3.12-slim Dockerfile matches the version CI builds against.

Configuration

Env var

Required

Default

CRONOMETER_USERNAME

yes

—

CRONOMETER_PASSWORD

yes

—

CRONOMETER_BASE_URL

no

https://cronometer.com

MCP_TRANSPORT

no

http

PORT

no

3000

Attribution

Licensed MIT — see LICENSE. Cronometer has no public API; this uses the same session/GWT-RPC path the website does, with your own account credentials, and is read-only. It is unofficial and not affiliated with Cronometer.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients like Codex and Claude Code to securely read and manage a personal Cronometer account, including food logs, nutrient summaries with missing-data awareness, food search, biometrics, and export analysis.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables read-only access to RENPHO Health smart scale measurements through MCP, allowing users to retrieve latest readings, body composition history, and weight trends via an MCP client.
      7
      11 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables read-only access to WHOOP health data through MCP clients, including recovery, HRV, sleep, strain, workouts, cycles, trends, and period comparisons, with resilient handling of outages, token refresh, and natural-language dates.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude and other MCP clients to query your Fitbit/Pixel Watch health data via the Google Health API, including sleep, heart rate, activity, workouts, and trends with read-only access.
      MIT