Polar Health Data (self Hosted) logo

Polar Health Data (self Hosted)

Self-hosted Polar analytics with PostgreSQL storage, personal baselines, REST access, and ten MCP tools for health data.

Install Polar Health Data (self Hosted)

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
https://your-server/mcp

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Overview

Polar Health Data (self-hosted) MCP server syncs Polar API data into PostgreSQL and exposes health analytics through a built-in streamable HTTP MCP endpoint. Its tools cover sleep, recovery, activity, workouts, biosensing data, personal baselines, anomaly patterns, and synchronization. The application also provides a dashboard, REST API, OAuth sign-in, and API-key authentication for local or multi-user deployments. Choose it when you want to retain Polar history on infrastructure you control and let compatible AI clients query it.

Use cases

  • Sync Polar sleep, recovery, activity, and workout history into PostgreSQL
  • Ask an AI client about readiness using personal HRV and recovery baselines
  • Review health trends and anomalies through the administration dashboard
  • Expose Polar analytics to applications through REST, OAuth, or MCP

Key features

  • Syncs 13 Polar API data areas
  • Stores health data in PostgreSQL
  • Computes personal baselines and anomaly bounds
  • Provides ten curated MCP tools over streamable HTTP
  • Includes dashboard, REST API, OAuth, and API-key authentication

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

21/24 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars27Stargazers on the source repository.
Last commit8d agoMost recent push to the default branch.
Directory activity7 viewsConfig copies, upvotes, and views on AllMCPs.

How Polar Health Data (self Hosted) works

What Polar Health Data (self-hosted) MCP server does

Polar Health Data (self-hosted) collects health and training data from Polar devices through the Polar API, stores it in PostgreSQL, and makes it available to analytics interfaces and AI assistants. The sync covers sleep, nightly recovery, daily activity, exercises, cardio load, SleepWise predictions, activity samples, continuous heart rate, SpO2, ECG, body temperature, and skin temperature.

Its analytics are based on the individual user rather than only population-wide reference values. Rolling averages and interquartile-range bounds support personal baselines, pattern detection, and anomaly checks. The included dashboard presents readiness, sleep, heart-rate, biosensing, activity, and training-load views, with selectable seven-, fourteen-, and thirty-day chart ranges and CSV export.

How it works

Polar credentials are connected through the administration interface, after which the application pulls data into PostgreSQL. Automatic synchronization runs hourly by default, and a manual sync can be started from the dashboard or through MCP. The default history window is 28 days, while the service is designed to retain synchronized data locally beyond Polar API's roughly 28- to 30-day access window.

The MCP endpoint is served by the main application at /mcp using streamable HTTP. With BASE_URL configured, it can act as an OAuth 2.1 authorization server: users sign in on the self-hosted instance, approve access, and receive user-scoped tokens. Tokens expire hourly and refresh automatically. Headless clients can instead send a per-user API key or the configured master API key.

Setup and configuration

Docker Compose is the documented deployment path. Download the production Compose file and start it, or clone the repository and run its development Compose configuration. The administration interface is available at /admin; after deployment, configure Polar credentials and set the redirect URI to the server's /admin/oauth/callback endpoint.

Required configuration includes:

  • DATABASE_URL, pointing to PostgreSQL.
  • ENCRYPTION_KEY, a Fernet key used to encrypt tokens and required for production deployments.

Optional settings control deployment mode, synchronization frequency, startup synchronization, lookback duration, logging, and a master API key. SYNC_INTERVAL_HOURS defaults to one hour, SYNC_ON_STARTUP defaults to false, and SYNC_DAYS_LOOKBACK defaults to 28 days. Generate the encryption key with Python's cryptography.fernet.Fernet.generate_key().

Protect API endpoints with per-user API keys or a master key. Per-user keys are available in the administration dashboard and are subject to a default limit of 1,000 requests per hour; the master key bypasses that limit.

Tools and capabilities

The built-in MCP interface provides ten curated tools covering these areas:

  • One-shot health assessment.
  • Sleep and recovery information.
  • Daily activity and workout data.
  • Seven biosensing streams, including heart rate, HRV, SpO2, ECG, body temperature, and skin temperature.
  • Personal baseline queries.
  • Pattern and anomaly analysis.
  • Synchronization control.

MCP Apps support is included for clients that render the extension, including Claude.ai, Claude Desktop, and VS Code. In those clients, a health-assessment request can produce a card in the conversation. The REST API remains available for applications that need direct data access rather than MCP.

Limitations and notes

Data availability depends on the Polar API and the connected device. SpO2 and ECG records require compatible devices. Health data is sensitive, so the deployment should not expose unauthenticated API endpoints. OAuth connections are revocable from settings, and the self-hosted deployment keeps the database and application under the operator's control.

The project is designed for self-hosting and uses PostgreSQL, an asynchronous Litestar application, SQLAlchemy, and an HTMX/Tailwind administration interface. Dashboard assets are vendored, allowing the interface to work on a local network without external CDNs.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Polar Health Data (self Hosted)

Polar Health Data (self-hosted) is an MCP server that connects Polar API data to PostgreSQL and AI clients. Its ten tools cover health assessment, sleep, recovery, activity, workouts, biosensing streams, personal baselines, anomaly patterns, and synchronization, while the application also provides REST and dashboard access.

Install it with Docker Compose by downloading the production Compose file and starting the stack, or clone the repository and use its Compose configuration. Then open `/admin`, configure PostgreSQL and encryption, connect Polar credentials, and start an initial synchronization.

Connect Claude Desktop by adding the server's `/mcp` URL as a custom connector and completing the sign-in and consent flow. The self-hosted application provides OAuth 2.1 when `BASE_URL` is configured; API-key authentication is also available for headless connections.

Yes, VS Code is listed as a client that can use the MCP endpoint and render MCP Apps. Configure the server's streamable HTTP `/mcp` URL and authenticate through the self-hosted OAuth flow or an API key.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPolar Health Data (self Hosted) AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/polar-health-data-self-hosted?style=directory)](https://allmcps.com/mcp/polar-health-data-self-hosted)
HTML Embed
<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>