Connect Your AI Agent to Wearable Data

Use one MCP server to access heart rate, sleep, steps, workouts, and more from the devices your users already use. Connect from TypeScript, Python, or any MCP-compatible language.

What VytalLink Does

VytalLink connects wearable health data to AI agents. Users install the mobile app, and your agent connects through a standard MCP interface to read their metrics.

  • Reads Apple Health (iOS) and Health Connect (Android)
  • 15+ metric types: steps, heart rate, sleep, workouts, calories, HRV, blood oxygen, and more
  • Real-time streaming while the mobile app is active
  • No cloud copy. Data stays on the user's phone

How It Works

From install to first query in four steps

1

User installs the VytalLink mobile app

The app reads Apple Health (iOS) or Health Connect (Android), then exposes those metrics through a private and secure MCP connection.

2

User selects what to share

The app generates a Word + PIN that your agent will use to authenticate. Users control exactly which metrics are accessible.

3

Agent authenticates

Your agent calls the direct_login tool with the user's Word and PIN:

Tool Call
{
  "name": "direct_login",
  "arguments": {
    "word": "island",
    "code": "828930"
  }
}
4

Agent requests data

Now your agent can fetch any health metric. Here's an example requesting the last 7 days of heart rate data:

Tool Call
{
  "name": "get_health_metrics",
  "arguments": {
    "metric_type": "HEART_RATE",
    "start_date": "2025-01-01",
    "end_date": "2025-01-07",
    "aggregation": "DAILY"
  }
}

MCP Tools Reference

Three tools your agent can call after connecting

direct_login

Authenticate with the user's Word + PIN. This is the recommended auth method: no redirects, no browser steps, and a single tool call.

get_summary

Multi-metric summary for a date range. Returns an overview across steps, sleep, heart rate, and more in one call.

get_health_metrics

Fetch specific metrics with a time range and aggregation level (raw, hourly, daily). The primary tool for reading health data.

Supported Metric Types

STEPS HEART_RATE SLEEP WORKOUT CALORIES DISTANCE HRV BLOOD_OXYGEN RESTING_HEART_RATE RESPIRATORY_RATE BODY_TEMPERATURE BLOOD_PRESSURE BLOOD_GLUCOSE WEIGHT BODY_FAT

Build an Agent in 5 Minutes

Use these snippets as reference pseudocode and adapt them to your runtime.

The MCP server is shown running with npx; no global package install is required here.

agent.ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

// 1. Create client and transport
const client = new Client({ name: "my-agent", version: "1.0.0" });
const transport = new StdioClientTransport({
  command: "npx",
  args: ["@xmartlabs/vytallink-mcp-server"],
});

// 2. Connect and discover tools
await client.connect(transport);
const { tools } = await client.listTools();
console.log(`Connected: ${tools.length} tools available`);

// 3. Authenticate with Word + PIN
await client.callTool({
  name: "direct_login",
  arguments: { word: "island", code: "828930" },
});

// 4. Fetch health data
const result = await client.callTool({
  name: "get_health_metrics",
  arguments: {
    metric_type: "HEART_RATE",
    start_date: "2025-01-01",
    end_date: "2025-01-07",
    aggregation: "DAILY",
  },
});

console.log(result.content);
agent.py
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

# 1. Connect to VytalLink MCP server
server_params = StdioServerParameters(
    command="npx",
    args=["@xmartlabs/vytallink-mcp-server"],
)

async with stdio_client(server_params) as (read, write):
    async with ClientSession(read, write) as session:
        await session.initialize()

        # 2. Authenticate with Word + PIN
        await session.call_tool(
            "direct_login",
            arguments={"word": "island", "code": "828930"},
        )

        # 3. Fetch health data
        result = await session.call_tool(
            "get_health_metrics",
            arguments={
                "metric_type": "HEART_RATE",
                "start_date": "2025-01-01",
                "end_date": "2025-01-07",
                "aggregation": "DAILY",
            },
        )

        print(result.content)

Why VytalLink

The fastest path from zero to health data in your AI agent

One Server, All Health Data

No vendor SDKs, no platform-specific code. One MCP server gives your agent access to Apple Health, Health Connect, and every wearable they support.

Privacy by Design

Health data never leaves the user's phone. Your agent reads it in real time through a secure connection, and nothing is stored in the cloud.

Ship Faster

5 minutes from npm install to your first health data query. Standard MCP protocol means it works with any framework and any LLM provider.