# polarmcp

MCP server connecting AI agents to Polar AccessLink v4 sleep and workout records. Tokens stay on your machine.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: davidmosiah
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davidmosiah/polar-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/polarmcp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `POLAR_CLIENT_ID`, `POLAR_CLIENT_SECRET`, `POLAR_REDIRECT_URI`, `POLAR_TOKEN_PATH`, `POLAR_PRIVACY_MODE`, `POLAR_CACHE`, `POLAR_CACHE_PATH`, `POLAR_NO_CACHE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-unofficial
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
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-unofficial
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-unofficial
```
Replace <…> with your own values. 3 more environment variables are in the server README

## When to use it
- 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
- Check connection with `polar_connection_status` and summarize today's activity using `polar_daily_summary`.
- Run `polar_weekly_summary` with `response_format=json` to pinpoint recovery gaps for the past week.
- Execute prompt `polar_training_load_investigation` with parameter `after=2026-04-01` to review recent exercise sessions.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
