Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Log MyFitnessPal by talking to your AI: search foods with macros, log meals, weight, water and more.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
MFP_COOKIE, MFP_USERNAME标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"mfp": {
"command": "uvx",
"args": [
"mfp-mcp"
],
"env": {
"MFP_COOKIE": "your-value",
"MFP_USERNAME": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add mfp --env MFP_COOKIE=your-value --env MFP_USERNAME=your-value -- uvx mfp-mcp运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"mfp": {
"command": "uvx",
"args": [
"mfp-mcp"
],
"env": {
"MFP_COOKIE": "your-value",
"MFP_USERNAME": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"mfp": {
"type": "stdio",
"command": "uvx",
"args": [
"mfp-mcp"
],
"env": {
"MFP_COOKIE": "your-value",
"MFP_USERNAME": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
MFP_USERNAME env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
注册名称已通过 GitHub 账户 Mason-Levyy 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:MFP_COOKIE
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.5.0)于4天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Log MyFitnessPal by talking to your AI.
Quickstart · Tools · Authentication · Changelog
MyFitnessPal MCP is a free, open-source MCP server that connects MyFitnessPal to Claude, Cursor, VS Code, or any MCP client. Log meals by talking, search the food database with macros, track trends, and export your nutrition history, all against your real MyFitnessPal diary.
Published on PyPI as mfp-mcp and in the official MCP Registry as io.github.Mason-Levyy/mfp-mcp.
Unofficial. MyFitnessPal has no public API; this reverse-engineers the
web app's own endpoints. It can break whenever MFP changes their site. Use at
your own risk, with your own account.
MyFitnessPal moved behind Cloudflare + NextAuth, which broke the username/password login that most existing integrations rely on. This server:
uvx mfp-mcp auth
Claude Code
claude mcp add myfitnesspal -- uvx mfp-mcp
Or install it as a plugin:
/plugin install myfitnesspal-mcp --marketplace Mason-Levyy/myfitnesspal-mcp
Claude Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json), Windsurf (~/.codeium/windsurf/mcp_config.json), and Cline (cline_mcp_settings.json) all take the same entry:
{
"mcpServers": { "myfitnesspal": { "command": "uvx", "args": ["mfp-mcp"] } } }
VS Code, Codex CLI, Gemini CLI
VS Code (or use the button above):
code --add-mcp '{"name":"myfitnesspal","command":"uvx","args":["mfp-mcp"]}'
Codex CLI:
codex mcp add myfitnesspal -- uvx mfp-mcp
Gemini CLI:
gemini mcp add myfitnesspal uvx mfp-mcp
Requires uv. Any MCP client that speaks stdio or streamable HTTP works, not just Claude.
Finding this useful? A ⭐ on
GitHub helps other
MyFitnessPal users find it.
This server signs in with your browser's MyFitnessPal session cookie:
https://www.myfitnesspal.com__Secure-next-auth.session-tokenmfp-mcp auth prompt, or on macOS run mfp-mcp auth --clipboard and copy the cookie: it connects as soon as the token reaches the clipboardSessions last 30 days from their last renewal. The server renews the session whenever it builds a client and saves the cookies MyFitnessPal re-issues, so the saved session stays current as long as it's used at least once a month. mfp-mcp auth --check reports whether the saved session still works and whether auto-refresh is set up; it renews and saves the session as it checks and exits 1 when the session needs attention, so running it on a schedule (cron, launchd) keeps an idle session alive and warns before it lapses.
With the autorefresh extra, auth also seeds a persistent headless browser profile. When MyFitnessPal rejects the session mid-call, the server tells your client it is retrying, boots the profile headlessly, lets MyFitnessPal rotate the session token, saves the fresh cookie, and retries the call.
uvx --from 'mfp-mcp[autorefresh]' playwright install chromium
uvx --from 'mfp-mcp[autorefresh]' mfp-mcp auth
Then use the same --from 'mfp-mcp[autorefresh]' form in your client config (e.g. uvx --from 'mfp-mcp[autorefresh]' mfp-mcp).
| Tool | What it does |
|---|---|
fitness_get_day | Nutrition totals, goals and remaining macros, diary entries, the MFP daily note, and feel note for a day |
fitness_search_food | Candidate matches with brand, calories, macros, serving, and ids |
fitness_draft_food | Numbered options with every serving size, filtered/ranked by optional calorie and macro targets |
fitness_log_food | Log a draft option (and serving), a remembered food, or exact ids to the real diary |
fitness_list_food_pins | Remembered query → food/serving choices (local) |
fitness_clear_food_pin | Forget one remembered choice, or all of them |
fitness_delete_food | Remove a diary entry by name match |
fitness_modify_food | Replace an entry (or change its quantity), choosing the replacement like fitness_log_food |
fitness_complete_day | Report whether a diary day is complete, mark it complete ("Complete This Entry"), or reopen it |
fitness_log_weight | Log a weight measurement (updates the same day on re-log) |
fitness_log_water | Add water (cups, fl oz, mL, L) or set the day's total with replace |
fitness_get_exercise | Read the exercise diary (cardio + strength) |
fitness_get_exercise_entries | List cardio and strength entries with each section's columns |
fitness_delete_exercise | Remove an exercise entry by name match (all_matches for multi-row sync cleanup) |
fitness_get_note | Read the MyFitnessPal daily diary note (the "Notes" box) for a day |
fitness_log_note | Write that daily note to MFP (replace, or append a new line) |
fitness_log_feel | Save a subjective "how I feel" note (stored locally, never sent to MFP) |
fitness_get_trends | One metric over a date range: weight, calories_in, protein, carbs, fat |
fitness_bulk_export | Whole date range in one call, including goals and remaining macros |
Food logging is draft-then-confirm, so what lands in your diary never depends on MyFitnessPal's search order:
fitness_draft_food("greek yogurt", min_protein=15, max_calories=150) returns numbered options. Each lists every serving size with calories and macros for the whole entry (serving × quantity) plus a suggested serving; options that meet the targets come first, near misses follow. Call it again with different targets to refine.fitness_log_food(draft_id=..., option=2, serving=1) logs exactly that food and serving, and remembers the choice for that query.fitness_log_food(query="greek yogurt") logs the remembered food and serving without searching.A bare fitness_log_food(query=...) with nothing remembered logs only when exactly one result matches the name exactly; otherwise it logs nothing and returns a draft to choose from. Remembered choices live in the local cache (fitness_list_food_pins, fitness_clear_food_pin). Drafts expire after 24 hours.
fitness_modify_food picks the replacement the same way, before deleting anything: a remembered food or a single exact-name match is used directly; otherwise the entry is left alone and a draft comes back — call fitness_modify_food again with the same query plus draft_id and option.
fitness_log_food, fitness_delete_food, and fitness_modify_food all take a meal argument the same way: breakfast/lunch/dinner/snacks, or the literal name of any meal section currently on your diary — including a renamed default meal or one of the up to two extra meals MyFitnessPal lets you add in Diary Settings. Matching is case-insensitive against your account's current meal labels. If you renamed a default meal, the keywords still work: breakfast/lunch/dinner/snacks fall back to your first through fourth meal, unless that slot now carries a different default name (e.g. lunch won't land in a second meal you renamed to "Dinner"). Any other unrecognized meal raises an error instead of silently logging into the wrong section.
Day summaries and trends read from a local SQLite cache that gap-fills from MyFitnessPal (first call on a fresh install fetches up to 30 days, one request per day).
Water logging reads the day's current total from /food/water, adds the requested quantity, and posts the new total back to the same endpoint. Pass replace=True to set the day's total outright (e.g. to fix a mislogged amount); every call returns previous_ml, so a mistake can be reverted by passing it back as amount with unit="ml" and replace=True. The separate /stats request with a water_logged event is analytics telemetry; it does not persist the water total.
The default transp
只显示了开头部分;其余内容请在仓库中阅读