
Cronometer
io.github.ekelly95由 GitHub 账号 ekelly95 发布v1.0.2更新于 Oct 26, 2026
Your Cronometer diary, nutrition with honest coverage (missing is never zero), and safe writes.
概览
非官方 MCP 服务器,以你的 Cronometer 账号登录,让助手读取饮食日记与营养数据,并在每次批准后记录、修改或删除条目。
- 可以做什么
- 读取一天或最多 14 天的日记,含条目 id、目标、已摄入、剩余与消耗能量
- 获取带每种营养素覆盖情况的营养总计、Cronometer 评分,以及 31 项营养素雷达图
- 搜索食物、查询条码,并读取宏量目标、模板、断食记录、身体指标与运动项目
- 将饮食、运动、身体指标与笔记导出为最长一年的 CSV,并分析已下载的导出文件
- 写入日记、笔记、身体指标、运动、自定义食物、食谱、目标、断食与重复食物,每次写入都需批准
- 适用场景
- 适合在 Cronometer 中记录饮食和身体数据、希望助手回答摄入量、剩余宏量或每周微量营养素缺口,或代为记录和修正条目的人。仅用于本人账号的个人用途。
- 运行要求
- 以 stdio 本地进程通过 npx 运行,需要 Node.js 20 或更高版本。设置时会询问 Cronometer 邮箱、密码、可选的双因素验证密钥和日记时区;也可通过 CRONOMETER_USERNAME、CRONOMETER_PASSWORD 和 CRONOMETER_TOTP_SECRET 提供凭据,并将 CRONOMETER_LIVE_ENABLED 设为 1。需要访问 cronometer.com 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Cronometer,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Cronometer MCP
An MCP server for your Cronometer account. Ask Claude (or any MCP client) what you ate, what is left for today, how your micronutrients look over the week — and have it log, edit or delete diary entries, with your approval each time.
- The whole diary, with ids. Foods, exercise, notes and biometrics, each with the id the edit and delete tools need, plus the day's targets, what remains, and energy burned.
- Honest nutrition. Totals are computed food by food. A nutrient a food doesn't report is counted as missing, not as zero — so "61 mg of magnesium" comes back as "at least 61 mg; only 4 of 12 foods report magnesium", which is what Cronometer's own total hides.
- Safe writes. Every account-changing tool asks for approval, deletes need an explicit confirmation, a timed-out write is never retried, and a read-only mode removes writes entirely.
- One command to set up, with your password kept in the operating system's credential store. Also runs as a Claude Desktop extension, or as a secure remote connector for claude.ai and the Claude phone apps.
[!IMPORTANT] Cronometer has no public API. This uses the same private interfaces as Cronometer's own app and website, signed in as you. It is unofficial: it can break whenever Cronometer changes them, and Cronometer could restrict an account it sees automated. It is not affiliated with or endorsed by Cronometer. See Risks.
Quick start
Requires Node.js 20 or later.
Setup explains the risk and asks you to type ENABLE, then asks for your Cronometer email,
password, an authenticator key if the account uses two-factor sign-in, and your diary
timezone. It checks the sign-in before saving anything, stores the password in the
Keychain (macOS), the Secret Service keyring (Linux) or DPAPI (Windows), and offers to add
the server to Claude Code, Claude Desktop and Codex.
Restart your client and ask:
- What did I eat yesterday, and how close was I to my targets?
- How much protein do I have left today?
- Log two large eggs for breakfast.
- Which micronutrients were low this week — and which of those can't be trusted because foods didn't report them?
- Show my nutrient radar for the last 7 days. (renders a chart; see
/nutrient_radar)
npx @ekelly95/cronometer-mcp doctor checks the setup at any time.
Other ways to run it
Claude Desktop extension. Download cronometer-mcp.mcpb from the
latest release and open it.
Claude Desktop asks for your email and password and keeps them in your OS credential
store.
Credentials in the client config (for clients without a keyring, or containers):
claude.ai and the phone apps. cronometer-mcp remote-setup configures a Streamable
HTTP endpoint with its own single-user OAuth sign-in, run as a user service and published
through a tunnel such as Tailscale Funnel. See docs/REMOTE.md.
Tools
46 tools: 24 that read and 22 that write. Dates accept YYYY-MM-DD, today, yesterday
or N days ago, resolved in the diary timezone.
Diary and nutrition
Foods, targets, body
Long ranges and downloaded exports
Writes — each asks for approval; ⚠ marks those that also need confirm: true
A write that hasn't yet been verified against a live account says so in its description, and the model is told to read the result back. docs/PROTOCOL.md lists what each tool calls and what has been verified.
Missing is not zero
Cronometer stores each food's nutrients from whatever its source reports. A branded product's label might list eight nutrients; a lab-analysed whole food, ninety. When Cronometer totals a day, a nutrient a food doesn't report is added as zero, so the total looks complete when it isn't.
get_daily_summary keeps them apart. For a made-up day of 12 foods:
A nutrient becomes a number only when every food reports it (or the share you choose with
coverage_threshold); otherwise you get a floor that says what it is. Days with nothing
logged are listed rather than averaged in as zero. The same rule drives the radar, which
draws an incomplete spoke as a dashed "at least" line and a nutrient nobody reported as no
data at all. None of this diagnoses anything; it reports what was logged.
How it keeps the account safe
- Approval on every write. Write tools carry MCP's destructive/read-only hints and
anthropic/requiresUserInteraction, which makes Claude Code ask every time, under every permission mode. Deletes and other irreversible tools also requireconfirm: true. - No duplicate writes. A write that times out is reported as "outcome unknown — check the Cronometer app", never retried. A write is re-sent only when Cronometer refused it outright (401/403), which means it wasn't applied.
- Ids, not guesses. Edits and deletes take ids from
get_diary; the server refuses an id that isn't on that day. - Untrusted data stays data. Food names and notes come back inside a JSON-encoded fence the content cannot close, and the server tells the model to treat them as data.
- Narrow network and storage. HTTPS to
cronometer.comandmobile.cronometer.comonly, size-capped and time-limited. Passwords live in the OS credential store; session caches are private files (mode 600) in a private directory; secrets are redacted from every error and log line. - Gentle on Cronometer. Calls run one at a time with a floor between them, and sessions are cached so the server rarely signs in.
Troubleshooting
Risks
- Unofficial interfaces. Cronometer publishes no API. Its terms limit use to personal, non-commercial purposes and allow access to be ended without notice. This tool is for use with your own account only.
- It can break. The mobile API expects the app's version numbers, which can be updated
with
CRONOMETER_APP_VERSION/CRONOMETER_APP_BUILD; the web protocol's build hashes are discovered automatically. Either can still change in ways only a new release fixes. - Exports are rate-limited by Cronometer; the
export_*tools are for long ranges, andget_diarycovers anything up to 14 days without them. - Not medical advice. Reference intakes are population figures, not personal targets.
How it works
The server talks to Cronometer's mobile API (the Android app's JSON interface) for almost everything, and to the web app's GWT-RPC protocol only for CSV exports, macro templates, fast edits and repeated foods. docs/PROTOCOL.md has the details; docs/DATA_MODEL.md describes the CSV export schemas.
It builds on two MIT-licensed projects: cronometer-api-mcp by Randy Westergren, which established the mobile API, and cronometer-mcp by Paul Hoskins, which established the web protocol. See THIRD_PARTY_NOTICES.md.
Development
Tests are offline and use synthetic fixtures; nothing in the suite has Cronometer credentials. Live behaviour is checked by hand before a release on a throwaway diary date (docs/RELEASING.md). Changes are recorded in CHANGELOG.md.
License
来源:README.md,提交 07dba12
工具
0版本历史
2- v1.0.2最新Oct 18, 2026
- v1.0.1Oct 18, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分