Health Data (your own Supabase)

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

Your health data (weight, macros, weigh-ins) as MCP tools — in your own Supabase, zero custody.

发布方自己的服务:Supabase

概览

AI 生成的概览

一个本地 MCP 服务器,让助手读取你自己创建并拥有的 Supabase 项目中的 Apple 健康数据(体重、热量、宏量营养素、饮水)。

可以做什么
查看数据库结构与指标注册表,并检查同步状态以判断每日导入是否中断。读取最近若干天的记录,可限定单个指标,并获取某一天全部指标的总计与各项测量。对单个指标在日期范围内计算最小值、最大值、平均值和滚动平均序列,支持按日、周、月汇总。作为备用手段执行一条只读 SQL 语句,写入会被拒绝并强制行数上限。导出按日期、体重、热量组织的条目,便于与单独的 TDEE 工具配合。
适用场景
如果你已在 Apple 健康中记录体重、热量或身体成分,并希望助手基于你自己的数据库回答趋势和摄入问题,就值得添加。适合愿意搭建 Supabase 项目并用 iOS 快捷指令每日同步的用户。
运行要求
通过 npm 包以 stdio 在本地运行,需要 Node 18 或更高版本。需要一个你自行创建的 Supabase 项目,设置 SUPABASE_URL 和 SUPABASE_SECRET_KEY 环境变量,并部署连接器与写入函数。需要装有健康 App 的 iPhone 和用于每日同步的 iOS 快捷指令;导入历史数据需使用 Apple 健康导出文件。
安装前请注意
服务器持有 Supabase 密钥,可对你的项目进行广泛访问,请勿放入共享配置。安装过程还会生成写入密钥和连接器令牌,作为机密保存在你的项目中。query 工具会对健康数据库执行 SQL,但仅限只读语句,且数据库角色只有 SELECT 权限。健康数据属敏感信息,虽保存在你自己的项目中,但快捷指令会将其发送到你项目的端点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Health Data (your own Supabase),将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

health-mcp

[CI] [npm] [MCP Registry]

Your health data (weight, body composition, calories, macros, water) as an MCP data layer your AI can query. Zero custody: it lives in a Postgres database in a Supabase project you create and own — nobody but you ever holds your data or your keys. An iOS Shortcut syncs it daily from Apple Health; Claude (or any MCP client) reads it back through a connector that runs entirely inside your own project.

Get set up (four steps, ~20 minutes)

1. Create your database + connector

Three ways, pick one — all three end with the same thing: your connector URL, plus your ingest URL and ingest key.

  • The setup page — no terminal, guided clicks through your Supabase dashboard.
  • npx @almostjacked/health-mcp setup — fastest, needs Node ≥ 18. Walks you through logging in to Supabase, picking or creating a project, applying the schema, deploying both functions, and minting your secrets, then prints the connector URL and Shortcut config.
  • Manual dashboard walkthrough — the same steps as the setup page, written out for anyone who'd rather read them first or do them by hand.

Supabase's free tier allows 2 active projects, so this fits alongside one other free project you may already have.

2. Load your history

Without this, adaptive-TDEE needs about two weeks of daily syncs before it has enough data to work. With it, everything works immediately.

  1. On your iPhone: Health app → your profile picture → Export All Health Data. This produces an export.zip (can take a few minutes for a long history).
  2. Get that file to whatever device you're setting up from, then drop it on the setup page's Import panel. Leave Dry run checked first to preview what would be sent before you commit to it.

3. Set up the daily sync

The Shortcut panel has one download button — no signing step, no Terminal. Download the shortcut, install it on your iPhone (iOS asks you to paste in your ingest URL and key during import), then turn on the 9 AM daily automation. Full click-by-click detail (including what to do if a step doesn't survive the iOS import): docs/shortcut.md.

Easiest install (Mac-first): download the signed shortcut on your Mac and double-click it — the two import prompts appear right next to the page's copy buttons, and iCloud syncs the shortcut to your iPhone automatically. (No Mac? Send the file to your phone and answer the prompts there.)

4. Connect Claude

  1. Open claude.ai → Settings → Connectors → Add custom connector.
  2. Paste in your connector URL from step 1.
  3. Save. Claude can now use your health-mcp tools.

If adding the connector fails with "Couldn't register with [name]'s sign-in service", that's a transient claude.ai hiccup, not a problem with your connector — just try adding it again.

Use it

Ask Claude things like:

What's my average calorie intake this week vs last?

Show me my weight trend over the last 90 days.

Has my daily sync stalled? Check get_sync_status.

Pair it with fitness-tools

health-mcp answers "what happened" (your logged weight and calories); fitness-tools answers "so what" (TDEE, macros, body fat, 1RM). The get_energy_inputs tool returns {date, weight, kcal} entries shaped exactly for fitness-tools' adaptive-tdee — no reformatting needed. Ask Claude:

Get my energy inputs for the last 90 days, then compute my adaptive TDEE with fitness-tools.

adaptive-tdee needs at least 10 days that have BOTH a weigh-in and a calorie total — if you skipped step 2, expect ~2 weeks of syncing before the pairing works.

If you also train with Hevy, pair with hevy-mcp for the training side of the picture (routines, logged sets, 1RM trend).

Tools

ToolDescription
get_schemaThe Postgres schema (two tables) and the metric registry (names, units, classes). Call before writing SQL for the query tool.
get_sync_statusLatest date, row count, and days-since-last-entry per metric. Use to detect a stalled daily sync before trusting an analysis.
get_recentRows for the last N days (default 30), optionally one metric. Daily totals and individual measurements in one date-sorted list.
get_daily_summaryAll metrics for one day (default: the most recent day with any data): totals plus every weigh-in/measurement.
get_statsMin/max/avg plus a rolling-average series for one metric over a date range (daily/weekly/monthly rollup).
queryEscape hatch: run one read-only SQL statement (SELECT or WITH…SELECT) against the schema from get_schema. Writes/DDL rejected; LIMIT 500 enforced.
get_energy_inputsDaily (date, weight, kcal) entries for days with both a calorie total and a weigh-in — shaped exactly for fitness-tools' adaptive-tdee.

Architecture

Apple Health --> "Sync Health Data" Shortcut --> your health-ingest function --> your Postgres                                                                                      |Claude  <-- run_readonly (SELECT-only) <-- your health-mcp connector function <------+

Nothing above touches infrastructure we operate. The two Edge Functions run on your Supabase project; the only thing that ever leaves your device is the Shortcut's HTTP POST straight to your own project's URL.

Privacy Policy

Zero custody. health-mcp is software you run against infrastructure you own — we (the maintainers) never operate a server that sees your health data or your keys, and there is nothing to disconnect from us because nothing was ever connected to us.

  • Your data lives only in the Supabase Postgres project you created. We have no access to it, no copy of it, and no way to see it.
  • Your keys (MCP_TOKEN, INGEST_KEY, your Supabase secret key) are generated by you or the wizard running on your machine, stored as secrets in your own Supabase project, and — for the stdio/.mcpb install path — held locally by your MCP client (Claude Desktop / Claude Code) and sent only to your own project's URL.
  • The Shortcut sends data straight from your phone to your Edge Function URL; it never passes through any server of ours.
  • The query tool is SQL-guarded to read-only statements, and the database role it runs as (health_reader) is granted SELECT only — enforced at the Postgres level, not just in application code.

Other clients

Prefer Claude Desktop, or running the server yourself instead of the hosted connector? Both use the same Supabase project from step 1 — just a different way of talking to it.

Claude Desktop: download health-mcp.mcpb, double-click it, and paste in your Supabase project URL and secret key when prompted.

Any stdio MCP client (Claude Code, etc.):

bash
claude mcp add health-mcp -e SUPABASE_URL=<url> -e SUPABASE_SECRET_KEY=<key> -- npx -y @almostjacked/health-mcp

Repo layout

packages/core   @almostjacked/health-mcp-core — tools, ingest/normalization, setup.sqlapps/mcp        @almostjacked/health-mcp       — stdio server, .mcpb, setup wizardweb             the setup page (provision + import + Shortcut panels)supabase/functions/health-mcp     the read connector (deployed to your project)supabase/functions/health-ingest  the write endpoint the Shortcut posts to

Develop

bash
corepack enablepnpm installpnpm -r testpnpm -r typecheck

License

MIT — see LICENSE.

来源:README.md,提交 e002ced

工具

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

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

其他 Supabase 集成