MyFitnessPal MCP
Click on "Deploy 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., "@MyFitnessPal MCP show me my food diary for the past 7 days"
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.
MyFitnessPal MCP
English documentation. For the French version, see README.fr.md.
Local TypeScript MCP server that extracts a public MyFitnessPal food diary from the printable page and returns it as readable Markdown, with one block per day.
Before you start
For this MCP to work, your MyFitnessPal food diary must be visible to other users, and you need to know your exact MyFitnessPal username.
Make your diary public
MyFitnessPal states that the food diary is private by default. You need to set it to public so the public printable URL can be used by this MCP.
From the mobile app
Open the MyFitnessPal app.
Tap your profile photo at the top.
Tap the gear icon in the top-right corner to open
Settings.Open
Diary Settings.Set
Diary SharingtoPublic.
From the web app
Sign in to www.myfitnesspal.com.
Click
Settings.Open
Diary SettingsunderAccount Settings.Set
Diary SharingtoPublic.
Find your MyFitnessPal username
From the mobile app
MyFitnessPal indicates that the username can be viewed through the profile edit flow:
Open the MyFitnessPal app.
Tap your profile photo at the top.
Your username appears at the top.
Simple method from the web app
Sign in to www.myfitnesspal.com.
At the top, you should see
Hi, {username}.
Related MCP server: MyFitnessPal MCP Server
Exposed tool
get_food_diary_markdown
Parameters:
startDate: ISO date inYYYY-MM-DDendDate: ISO date inYYYY-MM-DD
Constraints:
the range must cover exactly
1day or7consecutive daysall visible table columns are preserved
the output includes Markdown text and a
structuredContentpayload with daily blocksthe
usernameis defined when the server starts viaargs, not in the tool callin
7-daymode, the server only returns days that are actually present in the diary
Installation in Perplexity App
This procedure targets the Perplexity macOS app. According to the Perplexity Help Center, local MCP support is currently available in the macOS app and relies on the PerplexityXPC helper.
1. Prepare the server
From this repository:
npm install
npm run install:browser
npm run build
which nodeNote the output of which node. It will be used to launch the server with an absolute path. Example:
/opt/homebrew/bin/node2. Add the MCP in Perplexity
Open Perplexity.
Go to
Account Settings, thenConnectors.If prompted, install the
PerplexityXPChelper.Go back to
Connectors, then clickAdd Connector.In the
Simpletab, create a connector.Give it a name, for example
MyFitnessPal Diary.In the command field, use an absolute command like this:
/opt/homebrew/bin/node /Users/fabio/Documents/Projects/mfp-mcp/dist/src/index.js --username=your_mfp_usernameSave it, then verify the status changes to
Running.On the main Perplexity screen, enable this MCP in
Sources.
3. Test
For example, ask:
Use get_food_diary_markdown to retrieve the diary from 2024-08-29 to 2024-08-29.If Perplexity cannot find node, replace the command with the exact absolute path returned by which node.
Installation in Claude App
This procedure targets Claude Desktop on macOS.
1. Prepare the server
From this repository:
npm install
npm run install:browser
npm run build
which node2. Open the Claude Desktop MCP config
In Claude Desktop:
Open
Settings.Go to
Developer.Click
Edit Config.
On macOS, the file is usually:
~/Library/Application Support/Claude/claude_desktop_config.json3. Add this server
Add or merge this JSON block:
{
"mcpServers": {
"myfitnesspal-food-diary": {
"command": "/opt/homebrew/bin/node",
"args": [
"/Users/fabio/Documents/Projects/mfp-mcp/dist/src/index.js",
"--username=your_mfp_username"
]
}
}
}If you already have other MCP servers, just add the myfitnesspal-food-diary entry inside mcpServers without overwriting the rest.
4. Restart Claude
Save
claude_desktop_config.json.Fully quit Claude Desktop.
Reopen Claude Desktop.
The server should then appear in the available MCP tools.
5. Test
For example, ask:
Analyze my meals from yesterday on MyFitnessPal.Quick troubleshooting
Always use absolute paths, not relative paths.
Check that
npm run buildgenerateddist/src/index.js.Check that Playwright Chromium is installed with
npm run install:browser.If Claude does not see the server, inspect the logs in
~/Library/Logs/Claude.If
nodeis not found, replacecommandwith the exact value returned bywhich node.
Output format
The returned text is Markdown, for example:
## Aug 29, 2024
### Breakfast
| Foods | Calories | Carbs | Fat | Protein | Cholest | Sodium | Sugar | Fiber |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Orange juice, 1 cup | 119 | 28g | 0g | 2g | 0mg | 5mg | 21g | 1g |In weekly mode, the server also returns a markdownBlocks structure with a distinct Markdown block for each day.
Known limitations
parsing depends on the current HTML structure of the MyFitnessPal printable page
loading depends on Playwright/Chromium so the page can execute its JavaScript
if MyFitnessPal returns an anti-bot page, the server returns an explicit error
this server is meant for local use with a public diary and no authentication
Development
npm install
npm run install:browser
npm run build
npm testDevelopment in stdio mode:
npm run devProduction build:
npm run build
npm startThe server needs a real browser rendering step so MyFitnessPal can execute its JavaScript. Install Chromium once:
npm run install:browserReferences
Diary visibility and privacy: Can other members see my weight, or my food diary?
Web/mobile privacy steps: How do I report inappropriate users?
Changing and viewing the username: Comment modifier mon nom d'utilisateur ?
Recovering a forgotten username: I have forgotten my password or my username. How can I retrieve them?
Claude Desktop MCP configuration: Model Context Protocol quickstart
Claude Desktop server setup and absolute-path guidance: Model Context Protocol build-server guide
Perplexity local MCP setup on macOS: Perplexity Help Center
Available Tools
1 toolget_food_diary_markdownMyFitnessPal Food DiaryA
Fetch the public MyFitnessPal printable food diary for one day or seven consecutive days and return readable Markdown blocks per day for the username configured at server startup.
Inputs: endDate (required), startDate (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion with another tool. Its purpose—fetching a diary as Markdown—is clearly stated.
The single name follows a clear verb_noun+format pattern (get_food_diary_markdown) and is descriptive. Consistency cannot be fully demonstrated with only one tool, so it falls short of a perfect score.
A single tool is thin even for a narrow read-only server; basic related operations (e.g. nutrition totals, date lookup) are absent. The count is defensible for a minimal integration but feels under-scoped.
The surface covers only a fixed one-day or seven-day diary fetch for a preconfigured user, with no nutrition summary, no flexible date ranges, and no other diary reads. Common agent needs will hit dead ends quickly.
Maintenance
Related MCP Connectors
Read your private Enshape diary and log meals through scoped account authorization.
Log meals and read your nutrition diary from Claude or ChatGPT.
Free food diary for ChatGPT: log meals by chat, track calories, macros and 54 nutrients.
Calorie and protein log with honest ranges: log, edit, plan and review meals from any assistant.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables retrieval and analysis of MyFitnessPal nutrition data including daily summaries, meal breakdowns, exercise tracking, and macro/micronutrient analysis. Uses browser cookie authentication to access your personal MyFitnessPal account data through natural language queries.6-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read and write MyFitnessPal data, including food diary, exercises, body measurements, nutrition goals, and water intake.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to read and log MyFitnessPal nutrition data, including tracking calories, macros, searching foods, and adding meals through natural conversation.7MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to interact with MyFitnessPal data including food diary, exercises, body measurements, nutrition goals, and water intake through natural language.2073MIT