{
  "markdown": "# delx-living-body\n\n> Meta-MCP that turns 15 wellness MCPs into one unified body data layer for AI agents.\n\n[![npm](https://img.shields.io/npm/v/delx-living-body)](https://www.npmjs.com/package/delx-living-body)\n[![GitHub Release](https://img.shields.io/github/v/release/davidmosiah/delx-living-body?label=release)](https://github.com/davidmosiah/delx-living-body/releases/latest)\n[![npm downloads](https://img.shields.io/npm/dm/delx-living-body)](https://www.npmjs.com/package/delx-living-body)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![conduct](https://img.shields.io/badge/code%20of%20conduct-Contributor%20Covenant-ff69b4.svg)](CODE_OF_CONDUCT.md)\n[![Delx Wellness](https://img.shields.io/badge/part%20of-Delx%20Wellness-0EA5A3)](https://github.com/davidmosiah/delx-wellness)\n[![Verified Release Index](https://img.shields.io/badge/verified-release_index-0EA5A3)](https://github.com/davidmosiah/delx-wellness/blob/main/docs/release-index.md)\n\nToday, answering \"should I train hard today?\" forces an agent to orchestrate WHOOP recovery, Garmin Body Battery, Oura sleep, Nourish nutrition, and cycle phase across five separate MCP servers. That's brittle for users and confusing for the agent.\n\n`delx-living-body` is **one** MCP server that:\n\n1. **Auto-detects** which of 15 Delx Wellness connectors you already have installed locally — no manual config\n2. **Composes** parallel calls to the right subset\n3. **Synthesizes** a natural-language answer plus a structured reasoning trace and per-source confidence — using rule-based reasoning, **no LLM calls**\n\nInstall it once. Get a unified body data layer. Works with whatever wellness MCPs you already have.\n\nCompose matrix (which children have `*_series` vs summary-only): [docs/compose-matrix.md](docs/compose-matrix.md).\nPin drift: [docs/pin-drift.md](docs/pin-drift.md).\n\nIf it helps your agent workflow, star the repo. Stars make the single-entry\nDelx Wellness path easier for other AI builders to find.\n\n---\n\n## HTTP (v2 stateless)\n\nDefault is **stdio**. Optional Streamable HTTP — no session id, JSON responses, loopback only:\n\n```bash\nnpx -y delx-living-body --http\n# GET  http://127.0.0.1:3030/health\n# POST http://127.0.0.1:3030/mcp   (sessionless)\n```\n\nEnv: `LIVING_BODY_MCP_HOST`, `LIVING_BODY_MCP_PORT`, `LIVING_BODY_MCP_TRANSPORT=http`.\n\n\n- **Try it now, no accounts** — `npx -y delx-living-body demo` (\"Should I train hard today?\")\n- **Run it in** Claude · Cursor · ChatGPT · Hermes · OpenClaw — see [agent setup examples](https://github.com/davidmosiah/delx-wellness/tree/main/examples)\n- **Local-first** — `delx-living-body` never reads your tokens; children read their own creds ([privacy](#privacy--security))\n- **Which connector should I use?** — start at the [Delx Wellness front door](https://github.com/davidmosiah/delx-wellness#which-connector-should-i-use)\n\nThe three flagship connectors this composes over: **[google-health-mcp](https://github.com/davidmosiah/google-health-mcp)** (`google-health-mcp-unofficial`), **[garmin-mcp](https://github.com/davidmosiah/garmin-mcp)** (`garmin-mcp-unofficial`), and **[wellness-nourish](https://github.com/davidmosiah/wellness-nourish)** (`wellness-nourish`).\n\n---\n\n## Install\n\n```bash\nnpx -y delx-living-body\n```\n\nThat's the whole install. No OAuth flow, no API keys — `delx-living-body` has no auth of its own. Each child connector handles its own credentials.\n\n## See the full agent demo → \"Should I train hard today?\" (no accounts needed)\n\n```bash\nnpx -y delx-living-body demo\n```\n\nOne command, no clone. The demo boots the **real** MCP server, fakes three\ninstalled connectors (WHOOP + Oura + Garmin, backed by a bundled stub child that\ncarries synthetic body data), and drives it over stdio exactly the way an agent\ndoes. No real accounts, API keys, or network. Add `--scenario=red` to see the\nlow-readiness (\"back off today\") path; `demo --help` lists options. Captured\noutput lives at\n[`examples/demo-what-should-i-do-today.txt`](examples/demo-what-should-i-do-today.txt):\n\n```\n2) living_body_ask  question=\"What should I do today?\"\n────────────────────────────────────────────────────────────────\nRecommendation:\n   Today at a glance: recovery 74, sleep 83, body battery 68.\n\nConfidence: high   Sources: whoop, oura, garmin\n\n3) living_body_ask  question=\"Should I train hard today?\"\n────────────────────────────────────────────────────────────────\nRecommendation:\n   Green light for a hard session. Recovery and sleep both support high intensity.\n\nConfidence: high   Sources: whoop, oura, garmin\n\nReasoning trace (rule-based, no LLM):\n   Intent classified as: training_readiness\n   - (rec_high) Recovery 74 supports a high-intensity day.\n   - (sleep_good) Sleep score 83 is supporting recovery.\n```\n\nOne question in → one synthesized answer composed across all three connectors,\nwith a stable reasoning trace and **zero LLM calls**. This is the Body-vertical\nentrypoint: install once, ask in plain language, get a unified answer.\n\n## Tools (6)\n\n| Tool | Purpose |\n|---|---|\n| `living_body_status` | Which connectors are detected? Safe; no subprocess spawning. |\n| `living_body_ask` | Main tool. Spawns detected children in parallel, returns synthesized answer. Requires `explicit_user_intent: true`. |\n| `living_body_daily_brief` | Markdown brief built from each connector's `daily_summary`. |\n| `living_body_compose_context` | Normalized `delx-wellness-context/v1` shape merged across sources. |\n| `living_body_health_check` | All 15 known connectors with install hints for missing ones. |\n| `living_body_capabilities` | Self-description + per-connector availability matrix. |\n\n## How detection works\n\nFor each known connector, `delx-living-body` checks:\n\n1. `~/.<vendor>-mcp/tokens.json` exists\n2. `~/.<vendor>-mcp/config.json` exists (password-based connectors like Eight Sleep)\n3. An export file at the path in the vendor's env var (Apple Health, Samsung Health)\n4. `~/.delx-wellness/profile.json` lists the device\n\nIf any check passes → `detected`. Otherwise → `missing` (with install hint). Stateless connectors (Cycle Coach) are always considered available.\n\nDetection results cache for 60s (`DELX_LIVING_BODY_DETECT_TTL`).\n\n## Known connectors (15)\n\n| ID | Package | Category |\n|---|---|---|\n| `whoop` | `whoop-mcp-unofficial` | recovery |\n| `oura` | `oura-mcp-unofficial` | sleep |\n| `garmin` | `garmin-mcp-unofficial` | recovery |\n| `strava` | `strava-mcp-unofficial` | training |\n| `fitbit` | `fitbit-mcp-unofficial` | recovery |\n| `google_health` | `google-health-mcp-unofficial` | multi |\n| `withings` | `withings-mcp-unofficial` | multi |\n| `apple_health` | `apple-health-mcp-unofficial` | multi |\n| `samsung_health` | `samsung-health-mcp-unofficial` | multi |\n| `polar` | `polar-mcp-unofficial` | training |\n| `eight_sleep` | `eight-sleep-mcp-unofficial` | sleep |\n| `nourish` | `wellness-nourish` | nutrition |\n| `air` | `wellness-air` | environment |\n| `cycle_coach` | `wellness-cycle-coach` | cycle |\n| `cgm` | `wellness-cgm-mcp` | glucose |\n\n## Composition flow\n\nWhen `living_body_ask` or `living_body_compose_context` runs:\n\n1. Detect installed connectors.\n2. For each, spawn it as a child MCP via `npx -y <package>` over StdioClientTransport.\n3. Call the child's `*_wellness_context` (or `*_daily_summary`) tool in parallel.\n4. Normalize results into a `delx-wellness-context/v1` shape with merged scores.\n5. Run the synthesizer (rule-based, offline) to produce a recommendation + reasoning trace.\n\nCritically: **`delx-living-body` never calls an LLM.** Synthesis is deterministic so downstream agents can reason on top of a stable trace.\n\n## Synthesizer rules\n\n14 heuristic rules, each with a stable `rule_id` that appears in the reasoning trace:\n\n- `rec_low` / `rec_mid` / `rec_high` — recovery score bands\n- `bb_low` / `bb_high` — Garmin Body Battery bands\n- `sleep_poor` / `sleep_good` — sleep score bands\n- `strain_high` — WHOOP strain ≥ 18\n- `cycle_luteal` / `cycle_follicular` — cycle phase signals\n- `load_high` / `load_low` — aggregate training load\n- `no_data` — nothing installed, advisory only\n- `conflict` — sources disagree → low confidence\n\n## Privacy & security\n\n- `delx-living-body` **never reads child connector tokens or config files** — children read their own credentials independently.\n- Upstream secret env vars (`*_CLIENT_SECRET`, `*_ACCESS_TOKEN`, `*_REFRESH_TOKEN`, `*_API_KEY`, `*_PASSWORD`) are stripped before spawning children.\n- Children are spawned with `privacy_mode=structured` by default. `raw` is only honored when the caller sets `explicit_user_intent: true` on `living_body_ask`.\n- Child responses are not logged verbatim — only counts and summary fields.\n- Per-child call timeout: 30s. A hanging child is marked `timeout` and skipped.\n- Cache lives at `~/.delx-living-body/cache.sqlite` (chmod 600), 5 min TTL. Disable with `DELX_LIVING_BODY_NO_CACHE=true`.\n- No phone-home from `delx-living-body` itself.\n\nSee [SECURITY.md](SECURITY.md) for the full threat model.\n\n## Env vars\n\n| Variable | Default | Purpose |\n|---|---|---|\n| `DELX_LIVING_BODY_DETECT_TTL` | `60` | Detection cache TTL in seconds |\n| `DELX_LIVING_BODY_NO_CACHE` | unset | Disable SQLite response cache |\n| `DELX_LIVING_BODY_CACHE_PATH` | `~/.delx-living-body/cache.sqlite` | Override cache path |\n| `DELX_LIVING_BODY_NPM_RUNNER` | `npx` | Override npm runner for child spawning |\n| `DELX_LIVING_BODY_CHILD_OVERRIDE_<ID>` | unset | Override child binary path (testing only) |\n| `LIVING_BODY_MCP_HOST` / `LIVING_BODY_MCP_PORT` | `127.0.0.1` / `3030` | HTTP transport bind address |\n\n## CLI\n\n```bash\nliving-body-mcp-server                # MCP stdio server (default)\nliving-body-mcp-server --http         # Local HTTP transport\nliving-body-mcp-server doctor         # Detect installed connectors\nliving-body-mcp-server doctor --json  # JSON output\nliving-body-mcp-server setup          # Print profile path + install hints\nliving-body-mcp-server demo           # Zero-secret end-to-end demo (--scenario=red, --help)\nliving-body-mcp-server version\n```\n\n## Use with Claude Desktop\n\n```json\n{\n  \"mcpServers\": {\n    \"living-body\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"delx-living-body\"]\n    }\n  }\n}\n```\n\n## Use with Cursor\n\n```json\n{\n  \"mcpServers\": {\n    \"living-body\": { \"command\": \"npx\", \"args\": [\"-y\", \"delx-living-body\"] }\n  }\n}\n```\n\n## Not medical advice\n\nOutputs are operational context for training/recovery/sleep/nutrition agents. Not for medical diagnosis or clinical use.\n\n## License\n\nMIT — see [LICENSE](LICENSE). Built by [David Mosiah](https://github.com/davidmosiah).\n\n## Dense series\nWhen child connectors expose `*_series` tools (agent-safe-series/v1), prefer them over raw stream dumps.\n\n## Skill or MCP\n\nSame package, two doors. MCP registers tools on stdio/HTTP. The [skill](skill/SKILL.md) can drive the **same** tools through the CLI when the client has no MCP:\n\n```bash\nnpx -y delx-living-body call living_body_connection_status --json '{}'\n```\n\nCopy `skill/SKILL.md` into your agent skills dir.\n",
  "bytes": 11012,
  "sha": "e55f1aa3a6ab2c22566aa6dfce303ebc4e0a5899400e7f1a64d8657a03971e24",
  "repo_slug": "davidmosiah/delx-living-body",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_davidmosiah_delx_living_body_1019d0c4/readme"
}