Self-hosted Polar analytics server that syncs health data to PostgreSQL and exposes sleep, recovery, workout, and baseline tools over MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Polar Health Data (self Hosted).
The Polar Health Data (self-hosted) MCP server connects to Polar Flow through the Polar API, retains synchronized records in PostgreSQL, and makes those records available through a dashboard, REST API, and MCP. It is designed to preserve more history than the Polar API's stated 28โ30-day access window and to evaluate measurements against individual baselines.
The application synchronizes sleep, nightly recovery, daily activity, exercises, cardio load, SleepWise predictions, activity samples, continuous heart rate, SpO2, ECG, body temperature, and skin temperature. It calculates rolling personal averages and IQR-based anomaly bounds, supporting questions about whether a reading is typical for the user.
A background sync service retrieves data from Polar through the polar-flow SDK and writes it to PostgreSQL. By default, synchronization runs hourly; startup synchronization and the history lookback period can be changed through environment variables. The dashboard is served by the application and uses HTMX and vendored frontend assets, so the interface can run on a local network without external CDNs.
The MCP interface is built into the main web application rather than deployed as a separate process. It uses streamable HTTP at /mcp. Claude Desktop and other compatible clients can connect through the server's OAuth 2.1 authorization flow when BASE_URL is configured. Headless clients can instead send a per-user API key or the configured master API key.
The recommended deployment uses Docker Compose. After starting the application, open /admin, provide Polar credentials from the Polar AccessLink administration site, and use the callback URL configured for the deployment. Select โSync Nowโ to begin importing data; automatic synchronization then follows the configured interval.
At minimum, configure DATABASE_URL with a PostgreSQL connection string. Production deployments also require ENCRYPTION_KEY, a 32-byte Fernet key used to protect stored tokens. Optional settings include DEPLOYMENT_MODE, SYNC_INTERVAL_HOURS, SYNC_ON_STARTUP, SYNC_DAYS_LOOKBACK, LOG_LEVEL, and API_KEY.
The Polar Health Data (self-hosted) MCP server includes ten curated tool areas covering:
MCP Apps-compatible clients can render a health assessment card in the conversation. The admin dashboard provides overview metrics, readiness recommendations, trend and baseline views, sleep charts, heart-rate and HRV charts, biosensing data, training-load charts, selectable 7-, 14-, and 30-day ranges, and CSV export.
Polar device compatibility varies by data type; SpO2 and ECG records require compatible devices. API endpoints are authenticated, and the documentation recommends keeping health data private. Per-user API keys are rate-limited to 1,000 requests per hour by default, while the master API_KEY bypasses that limit.
The Polar Health Data (self-hosted) MCP server is self-hosted software, so PostgreSQL, deployment, credential management, and network exposure remain the operator's responsibility. OAuth tokens expire hourly and refresh automatically; connected applications can be revoked from Settings. A hosted version is mentioned as planned, but the described project is the self-hosted deployment.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/polar-health-data-self-hosted)<a href="https://allmcps.com/mcp/polar-health-data-self-hosted"><img src="https://allmcps.com/api/badge/polar-health-data-self-hosted?style=directory" alt="Polar Health Data (self Hosted) on AllMCPs" /></a>