polarmcp

v0.3.6
io.github.davidmosiah/polarmcp Checked 51 minutes ago Published 4 months ago

Privacy-first unofficial Polar AccessLink v4 MCP server for AI health, sleep and training agents.

Values you need

VariableWhat it is
POLAR_CLIENT_IDoptional Polar OAuth client ID. Optional when configured with polar-mcp-server setup.
POLAR_CLIENT_SECREToptional secret Polar OAuth client secret. Prefer polar-mcp-server setup so this secret is stored in ~/.polar-mcp/config.json instead of MCP client config.
POLAR_REDIRECT_URIoptional Redirect URI configured in the Polar AccessLink admin. Optional when configured with polar-mcp-server setup.
POLAR_TOKEN_PATHoptional Optional local path for OAuth tokens. Defaults to ~/.polar-mcp/tokens.json.
POLAR_PRIVACY_MODEoptional Optional payload mode: summary, structured, or raw. Defaults to structured. raw means full Polar AccessLink payloads for supported endpoints.
POLAR_CACHEoptional Optional SQLite cache toggle. Set to true or sqlite to enable.
POLAR_CACHE_PATHoptional Optional local SQLite cache path. Defaults to ~/.polar-mcp/cache.sqlite.
POLAR_NO_CACHEoptional Set to true to bypass the in-memory HTTP response cache (60s TTL for GET only). POST/PUT/DELETE and 4xx/5xx responses are never cached regardless.

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add polarmcp -- npx -y polar-mcp-unofficial@0.3.6
Add to claude_desktop_config.json
{
  "mcpServers": {
    "polarmcp": {
      "args": [
        "-y",
        "polar-mcp-unofficial@0.3.6"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "polarmcp": {
      "args": [
        "-y",
        "polar-mcp-unofficial@0.3.6"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "polarmcp": {
      "args": [
        "-y",
        "polar-mcp-unofficial@0.3.6"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.polarmcp]
command = "npx"
args = ["-y", "polar-mcp-unofficial@0.3.6"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: polar_data_inventory, polar_agent_manifest, polar_capabilities, polar_quickstart, polar_demo, polar_get_auth_url, polar_exchange_code, polar_get_account_data, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json