Betterness
Bett-iDocsTutorialsAboutAugmented Wellness

Overview

Trust

Resources

System

Get Started

Clients

Recipes

Tools

Reference

DocsMCPRecipesConnect Wearables

Connect Wearables (MCP)

List, link, disconnect, and pull from connected health devices.

Step 1 — see what's connected

listConnectedDevices() — only returns active connections. Disconnected providers are excluded.

Step 2 — see what can be added

listAvailableIntegrations() — returns providers the user can still connect.

Available providers: APPLE_HEALTH_KIT, GARMIN, OURA, PELOTON, WAHOO, EIGHT_SLEEP, WITHINGS.

Step 3 — connect

Apple Health only path:

  1. generateAppleHealthCode() — returns a one-time code for the Junction app and a deep link betti://settings/wearables?autoConnect=APPLE_HEALTH_KIT that opens the Betterness iOS app and starts the connection automatically
  2. Present both options to the user and let them pick

All other providers (Garmin, Oura, Withings, etc.):

  1. generateLinkToken(integrationKey, redirectUrl) — returns linkWebUrl
  2. Show the URL — the user opens it to authorize on the provider's side
  3. The agent must pass a real redirectUrl in the host application — typically the session origin or a configured page

Step 4 — disconnect

disconnectIntegration(integrationKey) — removes the connection.

Common pitfalls

  • Don't pass APPLE_HEALTH_KIT to generateLinkToken — it errors out. Use generateAppleHealthCode instead.
  • Already connected? generateLinkToken errors if the user is already linked to that provider — check with listConnectedDevices first.
  • Empty data after connection — wearables backfill in waves; expect data within minutes to a few hours.

Querying data

See the data tools for each category:

  • Health Data tools — activity, sleep, vitals, body composition
Biomarker Gap AnalysisHealth Profile
© 2026 Betterness Inc.
Privacy PolicyTerms of ServiceHealth Data