polarmcp — Claude Code MCP server: what it does, how to install
MCP server connecting AI agents to Polar AccessLink v4 sleep and workout records. Tokens stay on your machine.
claude mcp add --env POLAR_CLIENT_ID=<POLAR_CLIENT_ID> --env POLAR_CLIENT_SECRET=<POLAR_CLIENT_SECRET> --env POLAR_REDIRECT_URI=<POLAR_REDIRECT_URI> --env POLAR_TOKEN_PATH=<POLAR_TOKEN_PATH> --env POLAR_PRIVACY_MODE=<POLAR_PRIVACY_MODE> --transport stdio polarmcp -- npx -y polar-mcp-unofficialWhat polarmcp does
The connector routes health metrics from Polar AccessLink Dynamic API v4 into agent sessions. It retrieves Nightly Recharge scores and pulse-to-pulse intervals without manual data export. Location coordinates stay redacted by default.
Setup begins by registering an application in Polar AccessLink with redirect URL http://127.0.0.1:3000/callback. Initial configuration runs locally through setup and auth commands in polar-mcp-unofficial. The default transport is stdio. Without valid Polar API credentials the bridge will not start. The API also omits live sensor telemetry.
What it helps with
- feed Nightly Recharge and sleep records directly to assistant context
- assess weekly training strain without manually copying Polar Flow logs
- inspect pulse-to-pulse PPI intervals and continuous pulse readings
- evaluate recovery status from recorded orthostatic and fitness tests
Example prompts for the agent
- Check connection with
polar_connection_statusand summarize today's activity usingpolar_daily_summary. - Run
polar_weekly_summarywithresponse_format=jsonto pinpoint recovery gaps for the past week. - Execute prompt
polar_training_load_investigationwith parameterafter=2026-04-01to review recent exercise sessions.
How to install polarmcp
Platform CLI
claude mcp add --env POLAR_CLIENT_ID=<POLAR_CLIENT_ID> --env POLAR_CLIENT_SECRET=<POLAR_CLIENT_SECRET> --env POLAR_REDIRECT_URI=<POLAR_REDIRECT_URI> --env POLAR_TOKEN_PATH=<POLAR_TOKEN_PATH> --env POLAR_PRIVACY_MODE=<POLAR_PRIVACY_MODE> --transport stdio polarmcp -- npx -y polar-mcp-unofficialReplace <…> with your own values. 3 more environment variables are in the server README
Platform CLI
codex mcp add polarmcp --env POLAR_CLIENT_ID=<POLAR_CLIENT_ID> --env POLAR_CLIENT_SECRET=<POLAR_CLIENT_SECRET> --env POLAR_REDIRECT_URI=<POLAR_REDIRECT_URI> --env POLAR_TOKEN_PATH=<POLAR_TOKEN_PATH> --env POLAR_PRIVACY_MODE=<POLAR_PRIVACY_MODE> -- npx -y polar-mcp-unofficialReplace <…> with your own values. 3 more environment variables are in the server README
Config file
{
"mcpServers": {
"polarmcp": {
"command": "npx",
"args": [
"-y",
"polar-mcp-unofficial"
],
"env": {
"POLAR_CLIENT_ID": "<POLAR_CLIENT_ID>",
"POLAR_CLIENT_SECRET": "<POLAR_CLIENT_SECRET>",
"POLAR_REDIRECT_URI": "<POLAR_REDIRECT_URI>",
"POLAR_TOKEN_PATH": "<POLAR_TOKEN_PATH>",
"POLAR_PRIVACY_MODE": "<POLAR_PRIVACY_MODE>"
}
}
}
}Replace <…> with your own values. 3 more environment variables are in the server README
Config file
{
"servers": {
"polarmcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"polar-mcp-unofficial"
],
"env": {
"POLAR_CLIENT_ID": "<POLAR_CLIENT_ID>",
"POLAR_CLIENT_SECRET": "<POLAR_CLIENT_SECRET>",
"POLAR_REDIRECT_URI": "<POLAR_REDIRECT_URI>",
"POLAR_TOKEN_PATH": "<POLAR_TOKEN_PATH>",
"POLAR_PRIVACY_MODE": "<POLAR_PRIVACY_MODE>"
}
}
}
}Replace <…> with your own values. 3 more environment variables are in the server README
Platform CLI
gemini mcp add -e POLAR_CLIENT_ID=<POLAR_CLIENT_ID> -e POLAR_CLIENT_SECRET=<POLAR_CLIENT_SECRET> -e POLAR_REDIRECT_URI=<POLAR_REDIRECT_URI> -e POLAR_TOKEN_PATH=<POLAR_TOKEN_PATH> -e POLAR_PRIVACY_MODE=<POLAR_PRIVACY_MODE> polarmcp npx -y polar-mcp-unofficialReplace <…> with your own values. 3 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about polarmcp
How do I install polarmcp in Claude Code?
Run claude mcp add polarmcp -e POLAR_CLIENT_SECRET=<POLAR_CLIENT_SECRET> -- npx -y polar-mcp-unofficial in your terminal. You can also pass additional environment variables such as POLAR_CLIENT_ID with individual --env options.
What does polarmcp do?
It provides tools for assistants to query Polar workout history, sleep summaries, heart rate samples, and recovery metrics while keeping access tokens on your local drive.
Does polarmcp stream real-time sensor telemetry?
No, the Polar AccessLink API v4 does not support live data streaming from wearable sensors. The connector works strictly with synced account history.