Macrofactor Mcp

io.github.NasserAlbusaidi由 GitHub 账号 NasserAlbusaidi 发布v0.1.1更新于 Oct 24, 2026

Fueling & recovery decision engine combining MacroFactor nutrition with Garmin training data

已验证STDIO仅桌面位置与生活数据与分析

概览

AI 生成的概览

本地 MCP 服务器,导入 MacroFactor 营养导出数据,可选叠加 Garmin 训练数据,回答补给与恢复相关问题。

可以做什么
  • 将 MacroFactor 导出工作簿导入本地 DuckDB 数据库并检查配置
  • 结合睡眠、HRV、身体电量、训练负荷与前一日补给评估恢复状态
  • 生成汇总摄入、达标率、身体与训练信号的每日简报
  • 输出涵盖营养、体重、训练、睡眠与训练负荷的周报
  • 将营养与次日 Garmin 恢复信号做相关性分析并报告样本量
  • 从本地已有令牌目录同步 Garmin 数据
适用场景
适合在 MacroFactor 中记录饮食、并希望助手结合 Garmin 训练与恢复数据来回答“我恢复了吗”“补给是否有效”“下周该调整什么”等问题的用户。仅用 MacroFactor 时也可获得营养、体重、训练与周报功能。
运行要求
通过 uvx 在本地运行,需 Python 3.10 或更高版本,支持 macOS 与 Linux,Windows 未测试。需将手动导出的 MacroFactor .xlsx 文件放入由 MACROFACTOR_DATA_DIR 指定的目录,设置 MACROFACTOR_DB_PATH 数据库路径;如需 Garmin 同步,还需用 GARMINTOKENS 指向已有的 Garmin 令牌目录。
安装前请注意
健康、营养与训练数据在本地导入和存储,但工具结果会发送给所连接的模型或客户端,请先了解其数据政策。Garmin 访问依赖 GARMINTOKENS 中已有的令牌文件。相关性分析仅为观察性结论,不代表因果;该项目为非官方项目,且不构成医疗建议。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Macrofactor Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Am I recovered? Did my fueling work? What should change next week? The only MCP combining MacroFactor nutrition with Garmin training data.

MacroFactor MCP is a local Fueling & Recovery Decision Engine. Give your MCP client a MacroFactor export, optionally add Garmin, and ask for a decision instead of manually comparing nutrition, sleep, body, and training screens.

Quickstart

Install uv, then confirm the packaged server starts:

bash
uvx macrofactor-mcp

Export your data from MacroFactor, put the .xlsx file in one local directory, and add this to your MCP client configuration. Use absolute paths.

json
{  "mcpServers": {    "macrofactor": {      "command": "uvx",      "args": ["macrofactor-mcp"],      "env": {        "MACROFACTOR_DATA_DIR": "/absolute/path/to/macrofactor-exports",        "MACROFACTOR_DB_PATH": "/absolute/path/to/macrofactor.duckdb"      }    }  }}

Restart the MCP client. The server imports new workbooks on startup. Run setup_check, then ask one of the questions below. If a desktop client cannot find uvx, replace "uvx" with the absolute path returned by which uvx.

Four flagship workflows

All examples below use synthetic data.

recovery_check — Am I recovered?

Combines last night's sleep, HRV, body battery, training load, and yesterday's fueling into a readiness view.

text
Recovery Check: 2026-07-08Sleep: 7h 38m, score 82; HRV +4 vs 7-day averageTraining load: ACWR 1.08 (optimal)Yesterday: 96% calorie target; 101% protein targetOverall: All systems go — 4 positive signals.

daily_briefing — What do today's signals say together?

Shows the day as one picture instead of separate nutrition and training logs.

text
Daily Briefing: 2026-07-08Intake: 2,340 kcal (P 171g / F 72g / C 248g)Adherence: 98% calories | 101% proteinBody Battery: 28 → 83 | Sleep: 7h 38m, score 82Training: Productive | Load 612/568 (ACWR 1.08)

weekly_report — What should change next week?

Reviews seven days of nutrition, weight, workouts, sleep, and training load.

text
Weekly Report: 2026-07-02 to 2026-07-08Average: 2,315 kcal | 168g proteinOn target: calories 6/7 days | protein 7/7 daysTraining: 4 sessions | Sleep: 7h 26m averageNext-week signal: fueling was consistent; protect sleep before adding load.

nutrition_performance_correlation — Did my fueling work?

Compares nutrition with next-day Garmin recovery signals. It reports sample sizes so small or missing datasets stay visible.

text
Nutrition → Performance Correlation: 28 paired daysProtein >=90% target: next-day HRV 51 vs 45 (+6)Protein >=90% target: sleep score 81 vs 76 (+5)Energy deficit days: body battery 68 vs 75 (-7)Observation: higher-protein days tended to precede better recovery.

MacroFactor-only or MacroFactor + Garmin

ModeDecisions available
MacroFactor onlyNutrition, weight, workouts, daily_briefing, and weekly_report. Recovery output uses the nutrition signals that exist.
MacroFactor + GarminAll four flagship workflows, including sleep, HRV, body battery, activities, and training load.

Garmin is optional. To enable it, point GARMINTOKENS at an existing local Garth/Garmin token directory, then run sync_garmin.

Platform support

  • macOS and Linux
  • Windows is untested
  • Python 3.10 or newer

Limitations

  • v0.1 requires a manual MacroFactor export; it does not connect to a MacroFactor API.
  • Garmin correlation workflows need overlapping MacroFactor and Garmin dates.
  • Correlations are observational, not proof that one behavior caused another outcome.
  • Import support follows the current MacroFactor Quick Export and All-Time Data workbook layouts.

Privacy

Raw nutrition, body, workout, and Garmin data stays in the local DuckDB database. The server does not upload that database. However, MCP tool results are sent to whatever model or client the server is connected to. Review that client's data policy and avoid requesting more detail than you want to share.

Disclaimer

This is an unofficial project. It is not affiliated with, endorsed by, or supported by MacroFactor or Stronger By Science. It is not medical advice and must not replace care from a qualified health professional.

Released under the MIT License.

mcp-name: io.github.NasserAlbusaidi/macrofactor-mcp

来源:README.md,提交 613747f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分