Healthy MCP
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.
Healthy MCP template
A private health helper template to use with your favorite AI assistant that supports MCP servers. Say what you ate, drank or did; the assistant calls this server; the server stores it and does all the nutrition math. It is built to be your own copy: you run it on your own Cloudflare account and your data stays there.
This is a template. Click Use this template at the top of the GitHub page (or use it directly) to get your own copy of the code in your own GitHub account, then follow the steps below. Nothing in it belongs to anyone's account: no ids, names or URLs are stored in the repo, the list of people who may sign in starts empty, and every key is yours and lives in your GitHub secrets.
Set up your MCP
You need a GitHub account and a Cloudflare account. The free plans are enough to start (check each provider's current limits).
Throughout, OWNER/REPO means your copy of this repo, for example redSlug/healthy-mcp-template.
1. Use this template
Click Use this template > Create a new repository (you can make it private). Or clone or fork this repo.
2. Cloudflare: account id, subdomain and API token
Sign up and create an account (best practice: a separate account for each MCP server you run), then open Workers & Pages. Pick a
workers.devsubdomain if asked, and note it and your Account ID (on the right).Under My Profile, API Tokens, create a custom token for your account only, with Edit permission for Workers Scripts, D1 and Workers KV Storage, and Read for Account Settings.
3. GitHub OAuth App (this is how people sign in)
GitHub cannot create these automatically, so do it once by hand: github.com/settings/applications/new.
Field | Value |
Application name | Anything. People see it on the sign-in screen |
Homepage URL |
|
Authorization callback URL | That same address followed by |
Leave the checkboxes Allow wildcard matching, Enable Device Flow and Expire user access tokens unchecked: the server uses one exact callback address and the normal browser sign-in, and it uses the GitHub token once to read who signed in and never stores it.
Click Register application, then Generate a new client secret. Copy the Client ID and the client secret.
4. USDA food database key
Get a free key at fdc.nal.usda.gov/api-key.html. It is emailed to you.
5. Put the keys into your GitHub repo
Fill in the values at the top of scripts/sample_script.sh, including the GitHub usernames of the people allowed to sign in, and run it with bash scripts/sample_script.sh. It also prints your server address. Then discard your edits so the keys are never committed.
Who may sign in: edit config/allowed-users.json to a list like [{ "github_id": 12345678, "login": "your-login" }]. Find an id at https://api.github.com/users/ plus the username (for example api.github.com/users/redSlug), under id. Commit it.
Secrets, at https://github.com/OWNER/REPO/settings/secrets/actions (New repository secret):
Secret name | Value |
| The token from step 2 |
| The account id from step 2 |
| The OAuth App's Client ID (step 3) |
| The OAuth App's client secret (step 3) |
| A long random string of 32+ characters, unique to this app. Make one with |
| The USDA key (step 4) |
Variables, at https://github.com/OWNER/REPO/settings/variables/actions (New repository variable, not secrets):
Variable name | Value |
| Your app name ( |
|
|
6. Deploy
Go to https://github.com/OWNER/REPO/actions/workflows/deploy.yml, click Run workflow, then Run workflow again. When it turns green (a minute or two), your connector address is WORKER_URL/mcp.
runs the tests;
checks that every key and setting above is present;
creates your D1 database and KV storage in your Cloudflare account (only what is missing);
sets up the database tables;
deploys the server together with its secrets;
waits for the server to come online (a brand-new one can take a few seconds) and checks that it refuses requests without a token.
Related MCP server: mcp-nutrition-db
Use your MCP
Add WORKER_URL/mcp (it must end in /mcp) as a remote MCP server in your assistant, and sign in with GitHub when asked. Then try: "Log 150 grams of cottage cheese for lunch", "I drank a glass of water", or "I ran for 30 minutes".
Open claude.ai/settings/connectors and choose Add custom connector.
Enter
WORKER_URL/mcp. Choose Sign in now, and let the OAuth client register automatically. Leave headers empty.Approve the screen and sign in with GitHub.
In a new chat, turn the connector on.
More: day to day, updating your copy, troubleshooting, how it works and local development.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Calorie, workout and body-weight log inside ChatGPT and Claude. Log meals by text, photo or voice.
Persistent food journal for AI assistants. Log meals, save recipes, plan meals and track nutrition.
Free AI calorie & macro tracker: tell your AI what you ate and it logs it to your private food diary
Calorie tracker app for ChatGPT and Claude: read meals, macros, weight and log meals from chat.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceTracks daily calorie intake with accurate BMR/TDEE calculations, food logging, and profile management via Cloudflare Workers and D1 database.4-
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT to record, correct, and query meal nutrition and nutrition goals, with durable and auditable data storage.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to read Fitbit/Google Health data (steps, sleep, heart rate, SpO2, workouts) and log weight, food, water, and exercises via natural language, self-hosted on Cloudflare Workers.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables a chat assistant to log what you ate — text, voice notes, recipe portions, or label/plate photos — by resolving foods against the Bundeslebensmittelschlüssel, Open Food Facts, or Tandoor recipe nutrition and storing copy-on-write nutrient entries in a local SQLite log. It serves these tools over stateless streamable HTTP MCP, grouping entries into meals and summarizing days, weeks, and training/body-weight data when an OpenGym endpoint is configured.GPL 3.0