Developers integrate the VytalLink MCP once. End users connect through the VytalLink app with Word + PIN, then use your agent to read wearable data.
No custom app, no HealthKit entitlements, no platform accounts. Just install VytalLink and connect.
Apple Health (iOS) and Health Connect (Android) cover most devices that sync to the phone.
Live metrics while the VytalLink app is active. No polling, no delay.
Health data never leaves the device. No cloud copy, nothing stored server-side.
See the full connection flow first, then wire the MCP tools below.
Start with the minimal setup below, or browse the examples repo for complete TypeScript and Python agents.
A batteries-included Python starter kit with clean architecture, CLI, Jupyter notebooks, and a full observability stack (Grafana, Jaeger, LangSmith). More structure than the raw examples — good for hackathons and prototypes that need a solid base.
View on GitHubimport { 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`);
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()
Send your users the VytalLink app link. The user first opens VytalLink, gets a Word + PIN, then goes into your agent and uses those credentials there while VytalLink stays open as the bridge.
Your agent calls direct_login with the user's Word and PIN:
await client.callTool({
name: "direct_login",
arguments: { word: "island", code: "828930" },
});
await session.call_tool(
"direct_login",
arguments={"word": "island", "code": "828930"},
)
Use word testmode and code 999999 to get realistic synthetic data for all 16 health metrics. No app needed, works right away for development and demos.
Once the user is linked, your agent can start making MCP queries right away. Here's an example that requests the last 7 days of heart rate data:
const result = await client.callTool({
name: "get_health_metrics",
arguments: {
value_type: "HEART_RATE",
start_time: "2025-01-01T00:00:00Z",
end_time: "2025-01-07T23:59:59Z",
group_by: "DAY",
statistic: "SUM",
},
});
console.log(result.content);
result = await session.call_tool(
"get_health_metrics",
arguments={
"value_type": "HEART_RATE",
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-01-07T23:59:59Z",
"group_by": "DAY",
"statistic": "SUM",
},
)
print(result.content)
Read this before you start integrating
The VytalLink app needs to be active in the foreground to stream data. If the user backgrounds or closes the app, the data connection pauses until they return.
When querying large time ranges, the OS may throttle or kill long-running calls. Break requests into smaller date windows and merge the results in your agent.
The backend API works well for prototyping and testing, but it is not yet hardened for production traffic. Use it at your own risk and expect possible breaking changes.
Three tools your agent can call after connecting
Logs in with the user's Word + PIN. No browser, no redirect. One tool call.
Returns a snapshot across steps, sleep, heart rate, and more for any date range.
Query any metric by time range and aggregation: raw, hourly, or daily.