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 分