Polar Fitness MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Polar Fitness MCP Server summarize my workouts and sleep from the last 7 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Polar Fitness MCP Server
An MCP server that turns raw Polar device data into AI-ready fitness insights. Exercise samples, heart rate streams, sleep hypnograms, and recovery metrics are preprocessed into compact summaries — so an AI assistant can analyse days of health data without blowing its context window.
Quick Start
1. Register at admin.polaraccesslink.com — create a new API client, note your client_id and client_secret, and set the redirect URI to https://localhost:8080/callback.
2. Install
npm install
npm run build3. Configure — add to your MCP client (Claude Code settings.json, Claude Desktop, etc.):
{
"mcpServers": {
"polar-accesslink": {
"command": "node",
"args": ["/path/to/polar-accesslink-mcp-server/dist/index.js"]
}
}
}4. Authenticate — ask Claude to generate your authorization URL using your client ID, complete the browser flow, then exchange the code for an access token. Add the returned credentials to your config:
{
"mcpServers": {
"polar-accesslink": {
"command": "node",
"args": ["/path/to/polar-accesslink-mcp-server/dist/index.js"],
"env": {
"POLAR_ACCESS_TOKEN": "your_access_token",
"POLAR_USER_ID": "your_user_id"
}
}
}
}5. Register your user — after restarting, ask Claude to call polar_register_user. This is required before accessing any data.
Related MCP server: Oura MCP Server
Features
Exercise tracking — workouts with heart rate zones, training load, and preprocessed sample metrics (pace splits, power, altitude, cadence, HRV)
Daily activity — steps, calories, active/inactive duration with hourly step buckets and activity zone breakdowns
Sleep analysis — sleep score, stages (light/deep/REM), sleep architecture, and heart rate trends during sleep
Continuous heart rate — 24/7 heart rate data with preprocessed half-hourly buckets (avg/min/max)
Nightly recharge — ANS charge, HRV trends, and breathing rate analysis
Cardio load — daily strain, tolerance, and load ratio metrics
SleepWise alertness — hourly alertness predictions based on sleep quality
Exercise downloads — export workouts in FIT, TCX, or GPX format
Dual output — all tools support
markdown(human-readable) orjson(structured) response formats
Why Preprocessing Matters
The Polar AccessLink API returns raw sensor data — thousands of individual heart rate readings, comma-separated sample strings with tens of thousands of values, and per-minute hypnogram entries. Passing this directly to an AI assistant would consume most of the context window on a single tool call, leaving little room for conversation or multi-tool workflows.
This server preprocesses raw data into compact, meaningful summaries before it reaches the AI:
Raw API Data | Preprocessed Output |
~5,000 comma-separated speed/distance values | Per-km pace splits with avg speed |
~8,000 heart rate samples per day | 48 half-hourly buckets (avg/min/max) + daily stats |
Per-minute sleep hypnogram entries | Sleep architecture: cycle count, deep/REM distribution, time to first deep sleep |
Per-minute heart rate during sleep | Min, avg, nadir (rolling average), and trend slope (bpm/hr) |
Raw HRV and breathing samples | Min/max/trend statistics via linear regression |
Raw power samples | Avg, normalized power, max, and variability index |
Per-second altitude readings | Total ascent/descent + elevation range |
The result is that a full day of activity, sleep, and heart rate data fits comfortably in a few hundred tokens instead of tens of thousands — making multi-day queries and cross-domain analysis practical within a single conversation.
Tools
The server provides 13 tools across 5 domains.
OAuth
Tool | Description |
| Generate the OAuth authorization URL to start the setup flow. |
| Exchange an authorization code for an access token. Returns |
User Management
Tool | Description |
| Register a new user with Polar AccessLink. Required before accessing any data. |
| Get user information including name, registration date, and physical attributes. |
Exercises
Tool | Description |
| Get exercises from the last 30 days. Optionally include preprocessed sample metrics (pace splits, power, altitude, cadence, HRV, temperature). Supports date range filtering. |
| Download exercise data to a file in FIT, TCX, or GPX format. |
Daily Activity
Tool | Description |
| Get daily activity summaries with preprocessed hourly step buckets and activity zone duration breakdowns. Returns last 28 days by default, or a custom date range. |
Health & Recovery
Tool | Description |
| List physical information entries including weight, height, heart rate zones, and VO2 max. |
| Get continuous heart rate data with preprocessed half-hourly buckets (avg/min/max) and daily statistics. |
| List sleep records with sleep score, stages, continuity, and preprocessed sleep architecture (cycle analysis, deep/REM distribution). |
| List nightly recharge data with ANS charge, HRV min/max/trend, and breathing rate analysis. |
| Get daily cardio load metrics including strain, tolerance, load ratio, and load level thresholds. |
| Get SleepWise alertness predictions with hourly breakdowns including alertness grade, classification, and sleep inertia. |
Data Retention
The Polar AccessLink API only provides access to recent data:
Data Type | Retention |
Exercises | 30 days |
Daily Activity | 28 days |
Continuous Heart Rate | 28 days |
Sleep | 28 days |
Nightly Recharge | 28 days |
Cardio Load | 28 days |
SleepWise Alertness | 28 days |
Physical Information | No limit |
To preserve historical data, export regularly using polar_download_exercise or the json response format.
Troubleshooting
"Access Denied" errors
You need to register your user. Ask Claude to call polar_register_user after configuring your access token.
Invalid or expired authorization code
Authorization codes are single-use and expire quickly. Generate a new authorization URL and complete the flow again.
401 Unauthorized errors
Verify your client_id and client_secret are correct at admin.polaraccesslink.com.
No data returned
Ensure your Polar device has synced with Polar Flow
The API only returns recent data (see Data Retention)
If you prefer not to use Claude's OAuth helper tools:
Create an application at admin.polaraccesslink.com
Set your redirect URI (e.g.,
https://localhost:8080/callback)Direct users to authorize:
https://flow.polar.com/oauth2/authorization?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=accesslink.read_allCopy the
codeparameter from the redirect URLExchange the code for tokens:
curl -X POST https://polarremote.com/v2/oauth2/token \ -u "CLIENT_ID:CLIENT_SECRET" \ -d "grant_type=authorization_code&code=AUTH_CODE&redirect_uri=YOUR_REDIRECT_URI"Use
access_tokenasPOLAR_ACCESS_TOKENandx_user_idasPOLAR_USER_IDRegister your user:
curl -X POST https://www.polaraccesslink.com/v3/users \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"member-id": "YOUR_USER_ID"}'
License
Available Tools
13 toolspolar_download_exerciseAIdempotent
Download exercise data to a file in FIT, TCX, or GPX format. The format is determined by the file extension. GPX is only available for exercises with GPS data.
Inputs: filePath (required), exerciseId (required).
polar_exchange_authorization_codeA
Exchange an OAuth authorization code for an access token. Returns the POLAR_ACCESS_TOKEN and POLAR_USER_ID needed to configure the MCP server.
Inputs: clientId (required), clientSecret (required), authorizationCode (required), redirectUri.
polar_get_activitiesARead-onlyIdempotent
Get daily activity summaries from the last 28 days with preprocessed hourly step buckets and zone duration breakdowns. Optionally filter by date range.
Inputs: to, from, format.
polar_get_authorization_urlARead-onlyIdempotent
Generate the Polar OAuth authorization URL. Use this to start the OAuth flow and get an authorization code. Requires your Polar API client ID from https://admin.polaraccesslink.com/
Inputs: clientId (required), redirectUri.
polar_get_cardio_loadARead-onlyIdempotent
Get daily cardio load metrics including strain, tolerance, load ratio, and load level thresholds. Returns last 28 days by default, or a custom date range.
Inputs: to, from, format.
polar_get_exercisesARead-onlyIdempotent
Get exercises from the last 30 days. Optionally filter by date range or include preprocessed sample metrics (heart rate stats, speed splits, power, altitude, etc.). Always returns heart rate zones and training load data.
Inputs: to, from, format, samples.
polar_get_heart_rateARead-onlyIdempotent
Get continuous heart rate data for a date range with preprocessed half-hourly buckets (avg/min/max). Always returns heart rate zone summaries and daily statistics.
Inputs: to (required), from (required), format.
polar_get_sleepwiseARead-onlyIdempotent
Get SleepWise alertness data including alertness grade, classification, and sleep inertia. Returns last 28 days by default, or a custom date range. Set hourly=true to include hourly alertness breakdowns.
Inputs: to, from, format, hourly.
polar_get_userARead-onlyIdempotent
Get information about the registered Polar user including registration date, name, and physical attributes.
Inputs: format.
polar_list_nightly_rechargeBRead-onlyIdempotent
List nightly recharge data including ANS charge, HRV, and recovery metrics. Always returns preprocessed sample data (heart rate stats, HRV min/max/trend, breathing rate min/max/trend) positioned alongside existing API averages.
Inputs: to, from, format.
polar_list_physical_infoA
List physical information entries including weight, height, heart rate zones, and VO2 max. Creates a temporary transaction to pull data (not committed, so data remains available for future pulls).
Inputs: format.
polar_list_sleepBRead-onlyIdempotent
List sleep records including sleep score, duration, and sleep stages (light, deep, REM). Always returns heart rate stats and sleep architecture summary from preprocessed hypnogram and heart rate samples.
Inputs: to, from, format.
polar_register_userBIdempotent
Register a new user with the Polar AccessLink API. This creates a link between your application and the Polar user.
Inputs: format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct resource and action, such as authorization, user management, sleep, activities, exercises, heart rate, and cardio load. No two tools have overlapping purposes.
All tools follow a consistent 'polar_verb_noun' pattern. Verbs like get, list, exchange, register, and download are used appropriately, and nouns are clear (user, sleep, activities, exercises).
With 13 tools, the set is well-scoped for a fitness data API covering authentication, user profiles, and various health metrics. It fits comfortably within the typical 3-15 range.
The tool surface covers the core Polar Flow data domains: user, activities, exercises, sleep, heart rate, cardio load, physical info, and OAuth flow. No major missing operations are apparent.
Maintenance
Related MCP Connectors
Your Garmin, Oura, WHOOP, Hevy and 35 more fitness apps, queryable from your own AI.
Connect your wearables, rings and training apps, then ask your AI about your own health data.
Connect your health, fitness, nutrition, sleep, and wearable data to your AI assistant.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to access and analyze Oura Ring health data including sleep, readiness, activity, and stress metrics. Supports customizable queries, correlation analysis, and visualization capabilities for comprehensive health insights.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access Oura Ring health data including sleep, readiness, activity, heart rate, and workouts through OAuth2-authenticated API calls with automatic token refresh and smart caching.7 npmMIT
- AlicenseAqualityBmaintenanceBridges Suunto watch data to AI assistants like Claude, enabling natural language queries about workouts, sleep, and recovery.26189 npm39MIT
- AlicenseBqualityBmaintenanceLocal-first MCP server that connects AI agents to your Polar training, sleep, Nightly Recharge and continuous-sample data.3896 npm6MIT