cronometer-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cronometer-mcpshow me my food log and macro summary for today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cronometer-mcp
An MCP (Model Context Protocol) server that provides access to your Cronometer nutrition data. Pull detailed food logs, daily macro/micro summaries, manage diary entries, fasting, biometrics, and recurring foods — all from Claude, Cursor, or any MCP-compatible client.
Requires a Cronometer Gold account (or any paid tier that supports web login).
Features
Food log — individual food entries with full macro and micronutrient breakdown
Daily nutrition — daily calorie, protein, carb, fat, and fiber totals
Micronutrients — detailed vitamin/mineral breakdown with period averages
Diary management — add/remove food entries, copy entire days, mark days complete
Recurring foods — create, list, and delete repeat items that auto-log on selected days
Macro targets — read/write daily targets, create templates, set weekly schedules
Fasting — view history and stats, cancel or delete fasts
Biometrics — log and remove weight, blood glucose, heart rate, body fat
Raw CSV export — servings, daily summary, exercises, biometrics, or notes
Sync to disk — download JSON exports and generate a markdown food log
Quick Start
1. Install
pip install cronometer-mcpOr install from source:
git clone https://github.com/cphoskins/cronometer-mcp.git
cd cronometer-mcp
pip install -e .2. Set credentials
export CRONOMETER_USERNAME="your@email.com"
export CRONOMETER_PASSWORD="your-password"Or add them to a .env file in your project root (if your MCP client supports it).
3. Configure your MCP client
Claude Code (.mcp.json)
{
"mcpServers": {
"cronometer": {
"command": "cronometer-mcp",
"env": {
"CRONOMETER_USERNAME": "your@email.com",
"CRONOMETER_PASSWORD": "your-password"
}
}
}
}Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"cronometer": {
"command": "cronometer-mcp",
"env": {
"CRONOMETER_USERNAME": "your@email.com",
"CRONOMETER_PASSWORD": "your-password"
}
}
}
}If you installed from source with pip install -e ., you can also use the full Python path:
{
"command": "/path/to/venv/bin/python",
"args": ["-m", "cronometer_mcp.server"]
}Available Tools
Food Log & Nutrition
Tool | Description |
| Individual food entries with macros + micros for a date range |
| Daily macro totals (calories, protein, carbs, fat, fiber) |
| Detailed vitamin/mineral breakdown with period averages |
| Raw CSV export for any data type (servings, exercises, biometrics, etc.) |
Food Search & Diary Management
Tool | Description |
| Search the Cronometer food database |
| Get full nutrition info and serving measure IDs for a food |
| Add a food entry to the diary |
| Remove a food entry from the diary |
| Copy all diary entries from one date to another |
| Mark a diary day as complete or incomplete |
Recurring Foods (Repeat Items)
Tool | Description |
| List all recurring food entries |
| Add a recurring food entry that auto-logs on selected days |
| Delete a recurring food entry |
Macro Targets & Templates
Tool | Description |
| Get daily macro targets (or full weekly schedule with |
| Update daily macro targets (partial updates supported) |
| List all saved macro target templates |
| Create a new saved macro target template |
| Assign a template to days of the week as the recurring default |
Fasting
Tool | Description |
| View all fasts or fasts within a date range |
| Aggregate fasting statistics (total hours, longest, averages) |
| Cancel an in-progress fast while preserving the recurring schedule |
| Delete a fast entry |
Biometrics
Tool | Description |
| Get recently logged biometric entries |
| Log weight (lbs), blood glucose (mg/dL), heart rate (bpm), or body fat (%) |
| Remove a biometric entry |
Sync
Tool | Description |
| Download JSON exports + generate food-log.md to disk |
Tool Parameters
All date parameters use YYYY-MM-DD format. Most tools default to today or the last 7 days when dates are omitted.
Key parameter patterns:
diary_group— one of"Breakfast","Lunch","Dinner","Snacks"(case-insensitive)days_of_week—"all","weekdays","weekends", or comma-separated day numbers (0=Sun through6=Sat)measure_id— pass0to use the universal gram-based measure (works for all food sources)target_date— pass"all"onget_macro_targetsto get the full weekly schedule
Sync Output
The sync_cronometer tool saves files to ~/.local/share/cronometer-mcp/ by default. Override with the CRONOMETER_DATA_DIR environment variable:
export CRONOMETER_DATA_DIR="/path/to/your/project/data/cronometer"Output files:
exports/servings_{start}_{end}.jsonexports/daily_summary_{start}_{end}.jsonexports/servings_latest.jsonexports/daily_summary_latest.jsonfood-log.md
How It Works
Cronometer does not have a public API for individual users. This server uses the same GWT-RPC (Google Web Toolkit Remote Procedure Call) protocol that the Cronometer web app uses internally:
Fetches the login page to get an anti-CSRF token
POSTs credentials to authenticate
Calls GWT-RPC
authenticateto get a user IDCalls GWT-RPC
generateAuthorizationTokenfor short-lived export tokensDownloads CSV exports using the token
Calls GWT-RPC methods directly for diary edits, fasting, biometrics, macro targets, and repeat items
Session cookies are persisted to ~/.local/share/cronometer-mcp/.session_cookies so that subsequent invocations reuse the session without re-authenticating (Cronometer has aggressive login rate limiting).
GWT Magic Values
The GWT protocol uses a permutation hash and header value that are baked into each Cronometer web deploy. These values are hardcoded in the client and may break when Cronometer pushes a new build.
Current values (as of February 2026):
Permutation:
7B121DC5483BF272B1BC1916DA9FA963Header:
2D6A926E3729946302DC68073CB0D550
If authentication starts failing with GWT errors, these values likely need updating. You can find the current values by:
Opening Cronometer in your browser
Going to Developer Tools → Network tab
Looking for requests to
cronometer.com/cronometer/appChecking the
x-gwt-permutationheader and the payload structure
You can override them via the CronometerClient constructor:
from cronometer_mcp import CronometerClient
client = CronometerClient(
gwt_permutation="NEW_PERMUTATION_HASH",
gwt_header="NEW_HEADER_VALUE",
)Python API
You can also use the client directly in Python:
from datetime import date, timedelta
from cronometer_mcp import CronometerClient
client = CronometerClient() # reads from env vars
# Get today's food log
foods = client.get_food_log()
# Get last 7 days of daily summaries
start = date.today() - timedelta(days=7)
summaries = client.get_daily_summary(start)
# Raw CSV export
csv_text = client.export_raw("exercises", start, date.today())
# Copy a day's diary entries
client.copy_day(date(2026, 3, 1), date(2026, 3, 8))
# Add a recurring food entry (every weekday)
client.add_repeat_item(
food_source_id=12345,
measure_id=0, # universal gram-based measure
quantity=200,
food_name="Oatmeal",
diary_group=1, # Breakfast
days_of_week=[1, 2, 3, 4, 5],
)
# Log a biometric
client.add_biometric("weight", 218.5, date.today())License
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cphoskins/cronometer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server