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.
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.
From install to first query in four steps
The app reads Apple Health (iOS) or Health Connect (Android), then exposes those metrics through a private and secure MCP connection.
The app generates a Word + PIN that your agent will use to authenticate. Users control exactly which metrics are accessible.
Your agent calls the direct_login tool with the user's Word and PIN:
{
"name": "direct_login",
"arguments": {
"word": "island",
"code": "828930"
}
}
Now your agent can fetch any health metric. Here's an example requesting the last 7 days of heart rate data:
{
"name": "get_health_metrics",
"arguments": {
"metric_type": "HEART_RATE",
"start_date": "2025-01-01",
"end_date": "2025-01-07",
"aggregation": "DAILY"
}
}
Three tools your agent can call after connecting
Authenticate with the user's Word + PIN. This is the recommended auth method: no redirects, no browser steps, and a single tool call.
Multi-metric summary for a date range. Returns an overview across steps, sleep, heart rate, and more in one call.
Fetch specific metrics with a time range and aggregation level (raw, hourly, daily). The primary tool for reading health data.
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.
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);
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)
The fastest path from zero to health data in your AI agent
No vendor SDKs, no platform-specific code. One MCP server gives your agent access to Apple Health, Health Connect, and every wearable they support.
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.
5 minutes from npm install to your first health data query. Standard MCP protocol means it works with any framework and any LLM provider.