Cronometer MCP on Cloudflare Workers
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Cronometer MCP on Cloudflare Workers
A TypeScript port of cronometer-api-mcp by Randy Westergren. It runs as a Cloudflare Worker and connects to Claude as a custom connector. See Credits.
This is an unofficial project. It isn't affiliated with or endorsed by Cronometer or by the original project's author. It uses an unofficial API that can change without notice. Check Cronometer's terms and use it at your own risk.
Each deployment is for one Cronometer account. Deploy your own copy, and don't share your ACCESS_PASSWORD.
It includes all 32 tools from the original: food log, nutrition totals and scores, food search, custom foods, recipes, recipe import, macro targets, fasting, biometrics, exercise and notes. It uses the same unofficial mobile API the Cronometer Android app uses.
How it works
/mcpis a stateless Streamable HTTP MCP endpoint, served bycreateMcpHandlerfrom theagentspackage. No Durable Objects are needed.OAuth 2.1 is handled by
@cloudflare/workers-oauth-provider. When Claude connects, you're shown a small login page. Enter yourACCESS_PASSWORDthere and Claude gets a token.Your Cronometer login token is cached in KV, so new connections and new isolates reuse it. Cronometer rate-limits logins.
Related MCP server: mfp-mcp
Deploy
You need a Cloudflare account, a Cronometer account and a current version of Node.js.
git clone https://github.com/reedpen/cronometer-mcp-worker.git
cd cronometer-mcp-worker
npm ci
npx wrangler login
# Creates the Worker and its KV namespace, and writes the namespace ID to wrangler.jsonc
npx wrangler deploy
# Set the secrets (each command prompts for the value)
npx wrangler secret put CRONOMETER_USERNAME # your Cronometer email
npx wrangler secret put CRONOMETER_PASSWORD
npx wrangler secret put ACCESS_PASSWORD # long and random, e.g. from: openssl rand -base64 32
# Optional
npx wrangler secret put CRONOMETER_TOTP_SECRET # only if your account has 2FA: the base32 key shown at setup
npx wrangler secret put CRONOMETER_ACCOUNT_TZ # e.g. America/Denver, if the account's zone comes back wrongNobody can connect until ACCESS_PASSWORD is set. New secrets take effect without another deploy.
Deploy from the browser
The button copies this repo to your GitHub account, creates the Worker and its KV namespace, and asks for the three required secrets. Two things to know:
ACCESS_PASSWORDis the password you'll type when you connect Claude. Make it long and random, and save it in your password manager.If your account has 2FA, add
CRONOMETER_TOTP_SECRETto the Worker's secrets afterwards (Settings → Variables and Secrets). The button doesn't ask for it.
Connect it to Claude
In Claude, go to Settings → Connectors → Add custom connector.
For the URL, enter
https://cronometer-mcp.<your-subdomain>.workers.dev/mcp.Claude opens the connect page. Enter your
ACCESS_PASSWORDand choose Allow access.
Notes
Custom domain: if you serve the Worker from your own domain instead of
workers.dev, set aPUBLIC_URLvar (for examplehttps://cronometer.example.com). Also passallowedHostnames/allowedOriginHostnamestocreateMcpHandlerinsrc/index.ts.Anyone with
ACCESS_PASSWORDcan read and edit your diary. Make it long and random, because the login page doesn't limit repeated guesses. To lock everyone out, change the password and clear theOAUTH_KVnamespace. It only holds OAuth grants and the cached Cronometer session, so you just reconnect afterwards.Unofficial API: Cronometer doesn't publish this API, so a Cronometer app update can break things. Changes upstream can be ported from the Python repo, since the file layout mirrors it:
client.ts↔client.pyandtools.ts↔server.py.
Develop
Run npm ci, copy .dev.vars.example to .dev.vars and fill in the values (Git ignores .dev.vars). Then run:
npm run dev # wrangler dev on :8787
npm test # unit tests (mocked Cronometer)
npm run typecheckCredits
This project is based on cronometer-api-mcp by Randy Westergren. The original Python project provided the Cronometer API client, the design of all 32 tools and the behavior this port follows. Thank you!
This version ports that work to TypeScript and adds the Cloudflare Workers hosting, the OAuth login page and session caching in KV.
License
MIT. The license includes the copyright notices for the original project and this port. The original project's license is also included unchanged in LICENSE.upstream.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Calorie tracker app for ChatGPT and Claude: read meals, macros, weight and log meals from chat.
Calorie, workout and body-weight log inside ChatGPT and Claude. Log meals by text, photo or voice.
Log meals and read your nutrition diary from Claude or ChatGPT.
Calorie tracker MCP: log meals in Claude Code or Cursor with macros from a 6.8M+ food catalog.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables Claude to manage MyFitnessPal food diaries, nutrition goals, exercises, body measurements, and water intake via a remote MCP server using session cookie authentication.194MIT
- AlicenseAqualityBmaintenanceConnect MyFitnessPal to Claude or any MCP client. Log meals, search food database with macros, track trends, and export nutrition history against your real MyFitnessPal diary.18284 PyPI39MIT
- AlicenseAqualityBmaintenanceEnables reading and writing your Cronometer food diary from Claude.ai and Claude Code, including food entries, notes, biometrics, exercises, and fasts.412MIT
- AlicenseNot gradedqualityCmaintenanceEnables logging meals, tracking calories and macros, reviewing daily and range summaries, setting weight goals, searching foods and recipes, and getting meal suggestions from any Claude client, with optional multi-user household support. Includes a local food database for items missing from FatSecret and OAuth-based authentication to FatSecret profiles.MIT