Skip to main content

polar-mcp

PyPI CI License: MIT

An MCP server that lets Claude, or any MCP client, read your Polar watch data through the Polar AccessLink API: workouts, sleep, Nightly Recharge and HRV, cardio load, daily activity and 24/7 heart rate.

Ask "How did I sleep this week?", "Am I recovered enough for intervals today?" or "Compare my training load to last month". The first time, Polar Flow opens in your browser; click Approve and you're linked.

Read-only. Unofficial: not affiliated with or endorsed by Polar Electro Oy.

1. Create your Polar API client (once, ~2 minutes)

Polar requires every app to have its own API client, so you create one for yourself:

  1. Sign in at admin.polaraccesslink.com with your Polar Flow account and create a client.
  2. Set its redirect URL to exactly http://localhost:8765/callback.
  3. Keep the client ID and client secret at hand for the next step.

2. Install

Add this repository as a plugin marketplace and install polar. In Claude Code:

/plugin marketplace add kayaman/polar-mcp
/plugin install polar --marketplace kayaman/polar-mcp

In Claude Desktop, add the kayaman/polar-mcp marketplace under Settings → Plugins, or upload polar-plugin.zip from the latest release. Enter your client ID and secret when the plugin asks for them. If it doesn't, run uvx polar-mcp setup once in a terminal. The plugin needs uv and runs on macOS and Linux; on Windows use the extension below.

Claude Desktop: extension

Download polar-mcp.mcpb from the latest release, open it with Claude Desktop (Settings → Extensions), and enter your client ID and secret.

Claude Code, or any MCP client

uvx polar-mcp setup                      # saves your client ID/secret, then links your account
claude mcp add polar -s user -- uvx polar-mcp

Other clients: run uvx polar-mcp as a stdio server. Credentials can also come from the POLAR_CLIENT_ID and POLAR_CLIENT_SECRET environment variables.

3. Use it

Just ask. When a tool needs your account and it isn't linked yet (or the token, which lasts about a year, has expired), Polar Flow opens in your browser. Approve, the tab says "Polar linked", and Claude carries on. If you take longer than ~45 seconds, Claude asks you to try again; the link is saved in the background either way.

Polar only serves recent data, and this server keeps no copy of it:

Data Tools How far back
Workouts polar_list_exercises, polar_get_exercise, polar_export_exercise 30 days, uploaded after you linked
Sleep polar_list_sleep, polar_get_sleep 28 nights
Nightly Recharge (HRV, overnight HR, breathing) polar_list_nightly_recharge, polar_get_nightly_recharge 28 days
Cardio load (strain, tolerance) polar_list_cardio_load 28 days
SleepWise (alertness, bedtime) polar_sleepwise_alertness, polar_sleepwise_circadian_bedtime 28 days
Daily activity (steps, calories, active time) polar_list_activities up to 365 days, any range
24/7 heart rate polar_get_continuous_hr (per-day summary or raw) per date
Profile polar_get_user

polar_login_start and polar_login_finish exist for re-linking on request, and for the case where your client's redirect URL isn't on localhost. Then you paste the address the browser ends on into the chat.

Command line

polar-mcp            run the MCP server on stdio (what MCP clients launch)
polar-mcp setup      save your client ID/secret, then link your account
polar-mcp login      link or re-link in the browser (--redirected URL to finish by hand)
polar-mcp status     what's configured, whether you're linked, token expiry
polar-mcp logout     forget the token (keeps the client credentials)

Privacy

  • Data flows only between your machine and Polar. There's no server in between and no telemetry.
  • Your client secret and Polar token are stored in ~/.config/polar-mcp/.env, readable only by you. Workouts you export go to ~/Downloads/polar (override with POLAR_EXPORT_DIR).
  • What you ask about is sent to your AI client's model provider as part of the conversation, like any other tool result.

See SECURITY.md for details and how to report a vulnerability.

Configuration

Variable Default
POLAR_CLIENT_ID, POLAR_CLIENT_SECRET from plugin settings or the env file your API client
POLAR_REDIRECT_PORT 8765 must match the client's redirect URL
POLAR_REDIRECT_URI unset pin the redirect URI; unset lets Polar use the registered one
POLAR_ENV_FILE ~/.config/polar-mcp/.env where credentials and the token live
POLAR_EXPORT_DIR ~/Downloads/polar where exported workouts go

Development

See CONTRIBUTING.md. Polar and AccessLink are trademarks of Polar Electro Oy. Licensed under MIT.

Metadata

Release files for polar-mcp 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polar-mcp 0.5.0
File Size Uploaded Provenance Actions
polar_mcp-0.5.0.tar.gz 24.6 kB With provenance Details for polar_mcp-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for polar-mcp 0.5.0
File Interpreter ABI Platform Actions
polar_mcp-0.5.0-py3-none-any.whl Python 3 none any Details for polar_mcp-0.5.0-py3-none-any.whl

Total release size: 47.9 kB

Release files / polar_mcp-0.5.0.tar.gz

Download URL polar_mcp-0.5.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bbd2a9404a288dac72236c1b433a230f720f06b5241bc0a3bb29b349e3ddf7bc
BLAKE2b-256 checksum
How to use checksums
bb1e990e2914d10ef85eb6798331dd63eaac740749c5ea9fb6654d4b35af5e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / polar_mcp-0.5.0-py3-none-any.whl

Download URL polar_mcp-0.5.0-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7604cefa80ba0f8775607c1cb98cd40a203dc5f9eb9059db2dae41ea384f4842
BLAKE2b-256 checksum
How to use checksums
a0fb86b995c481fe99009df2940bf9661055bffea4547cf8c781e05d87b30d84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Security for polar-mcp 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for polar_mcp-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page