原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

MyFitnessPal MCP

作者:Mason-Levyy版本 0.5.0i★ –i在你的电脑上运行
注册名称io.github.Mason-Levyy/mfp-mcp

安装

概览

作者提供的说明(英文原文)

Log MyFitnessPal by talking to your AI: search foods with macros, log meals, weight, water and more.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 搜索与 AI 记忆
  • 你需要填写:MFP_COOKIE

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: MFP_COOKIE, MFP_USERNAME

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • PyPI已安装 Python 的 uv(用于 uvx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 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 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "mfp": {
      "command": "uvx",
      "args": [
        "mfp-mcp"
      ],
      "env": {
        "MFP_COOKIE": "your-value",
        "MFP_USERNAME": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "mfp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mfp-mcp"
      ],
      "env": {
        "MFP_COOKIE": "your-value",
        "MFP_USERNAME": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • MFP_COOKIE 机密 env
    MyFitnessPal session cookie (optional; 'mfp-mcp auth' is the guided alternative)
  • MFP_USERNAME env
    MyFitnessPal username; only needed if MFP's profile lookup fails for your account

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 Mason-Levyy 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“搜索与 AI 记忆”中的其他服务器比较i

  • 星标数多于此分类中其他 5671 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 5671 个服务器的 90% 更新
  • 基础检查结果等于或优于此分类中其他 5671 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

MyFitnessPal MCP 安全吗?

它在 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

Context7

作者:upstash

Up-to-date docs for AI agents

电脑或云端★ 64,224MIT昨天更新
安装

Codebase Memory

作者:DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

在你的电脑上运行★ 48,148MIT21天前更新
安装

Exa

作者:exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

在云端运行★ 5,213MIT2个月前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Log MyFitnessPal by talking to your AI.

Quickstart · Tools · Authentication · Changelog

▶ Watch the launch video

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.

Why this one?

MyFitnessPal moved behind Cloudflare + NextAuth, which broke the username/password login that most existing integrations rely on. This server:

  • Authenticates with your browser session cookie over a real Chrome TLS fingerprint (curl_cffi), which passes Cloudflare
  • Auto-refreshes the session (optional): a headless browser profile rotates the token when it expires, and failed calls retry automatically
  • Writes, not just reads: log, modify, and delete real diary entries
  • Search-then-log: get candidates with macros, then log the exact item

Quickstart

  1. Connect your account (one-time; prompts you to paste a cookie — see Authentication):
   uvx mfp-mcp auth
  1. Add the server to your client. The install buttons at the top do this in one click for Cursor and VS Code.

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
  1. Talk to it: *"log a banana as a snack"*, *"what did I eat yesterday?"*, *"chart my weight this month"*.

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.

Authentication

This server signs in with your browser's MyFitnessPal session cookie:

  1. Log in at myfitnesspal.com
  2. Open DevTools (F12) → Application (Chrome) or Storage (Firefox) → Cookies → https://www.myfitnesspal.com
  3. Copy the value of __Secure-next-auth.session-token
  4. Paste it into the mfp-mcp auth prompt, or on macOS run mfp-mcp auth --clipboard and copy the cookie: it connects as soon as the token reaches the clipboard

Sessions 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.

Auto-refresh (recommended)

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).

Tools

ToolWhat it does
fitness_get_dayNutrition totals, goals and remaining macros, diary entries, the MFP daily note, and feel note for a day
fitness_search_foodCandidate matches with brand, calories, macros, serving, and ids
fitness_draft_foodNumbered options with every serving size, filtered/ranked by optional calorie and macro targets
fitness_log_foodLog a draft option (and serving), a remembered food, or exact ids to the real diary
fitness_list_food_pinsRemembered query → food/serving choices (local)
fitness_clear_food_pinForget one remembered choice, or all of them
fitness_delete_foodRemove a diary entry by name match
fitness_modify_foodReplace an entry (or change its quantity), choosing the replacement like fitness_log_food
fitness_complete_dayReport whether a diary day is complete, mark it complete ("Complete This Entry"), or reopen it
fitness_log_weightLog a weight measurement (updates the same day on re-log)
fitness_log_waterAdd water (cups, fl oz, mL, L) or set the day's total with replace
fitness_get_exerciseRead the exercise diary (cardio + strength)
fitness_get_exercise_entriesList cardio and strength entries with each section's columns
fitness_delete_exerciseRemove an exercise entry by name match (all_matches for multi-row sync cleanup)
fitness_get_noteRead the MyFitnessPal daily diary note (the "Notes" box) for a day
fitness_log_noteWrite that daily note to MFP (replace, or append a new line)
fitness_log_feelSave a subjective "how I feel" note (stored locally, never sent to MFP)
fitness_get_trendsOne metric over a date range: weight, calories_in, protein, carbs, fat
fitness_bulk_exportWhole date range in one call, including goals and remaining macros
Logging flow

Food logging is draft-then-confirm, so what lands in your diary never depends on MyFitnessPal's search order:

  1. 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.
  2. fitness_log_food(draft_id=..., option=2, serving=1) logs exactly that food and serving, and remembers the choice for that query.
  3. Next time, 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.

Remote / HTTP mode

The default transp

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx