Skip to content

MCP Connector

Use your training data inside Cursor

Chat with your full training history, stats, and exercise catalog inside Cursor's Agent.

Generate or rewrite multi-day programs in seconds — Cursor proposes, you approve, GymLogic writes.

Skip the UI when you already know what you want; let Cursor read your data when you don't.

Setup guide ↓

Prerequisites

Setup

Cursor authenticates with a Personal Access Token. You paste it once into Cursor’s MCP config; the token is long-lived, so there’s no OAuth dance to redo every time you reopen the editor.

Step 1 — Create a Personal Access Token

  1. Sign in at gymlogic.me
  2. Go to Account → Security & access → Manage API tokens (or straight to gymlogic.me/account/api-tokens)
  3. Click Create token
  4. Name it something you’ll recognize later (Cursor laptop) and pick a lifetime — 30 / 90 / 365 days, or never
  5. Copy it now. It starts with glp_, it’s shown once, and it’s a password.

The token gives full read access plus program writes on your account. If you lose it, revoke it on the same page and mint a new one — the next request from the old token returns 401.

Step 2 — Add the MCP server

Edit ~/.cursor/mcp.json (create the file if it isn’t there):

{
  "mcpServers": {
    "gymlogic": {
      "url": "https://mcp.gymlogic.me/functions/v1/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_PAT>"
      }
    }
  }
}

Swap <YOUR_PAT> for the full glp_… string from step 1.

Step 3 — Activate in Cursor

  1. Open Cursor Settings → MCP
  2. gymlogic should be listed — hit the refresh icon if it isn’t
  3. Start a new Agent chat. Chats that were already open won’t pick up the new tools.

Available tools

ToolWhat it does
search_exercisesSearch the exercise catalog by name (FR/EN), muscle group, equipment, or difficulty
resolve_exercisesResolve a batch of exercise names (up to 30) to catalog UUIDs in one call — bundles weight_convention, measurement_type, and default_duration_seconds, everything create_program / update_program need
get_exercise_detailsFull exercise info: instructions, muscles, equipment, media
get_workout_historyYour past sessions with sets, weights, and PRs
get_training_statsVolume by muscle group, personal records, session frequency
get_upcoming_workoutsYour programmed training days and exercises
list_programsList all your training programs (active, drafts, optionally archived) with id, name, day count, creation date, active-cycle flag
get_program_detailsFull structure of one program by UUID — days, exercises, sets/reps/weights/rest. Works on any program (active/draft/archived). Chain after list_programs to drill in
create_programCreate / replace your active program from structured days + exercise UUIDs. Default dry_run: true returns the insert plan only; dry_run: false writes to Supabase and deactivates your other active programs
create_workout_dayLog a single ad-hoc session (“quick workout for today”) without touching the active program. dry_run defaults to true
update_programEdit an existing program in place by program_id — preserves all logged history. dry_run defaults to true; removing days also needs confirm: true

There’s also one MCP Resource (exercise_catalog_schema) exposing the exercise taxonomy: muscle groups, equipment types, difficulty levels.

Eleven tools — eight reads, three writes (plus resolve_exercises for name→UUID resolution).

Example prompts

Rotating or revoking a token

Troubleshooting

ProblemFix
Only search_exercises shows upQuit Cursor entirely, reopen the project, start a new Agent chat
401 Authentication requiredToken was revoked, expired, or mistyped. Mint a fresh one at /account/api-tokens
Tools not listed at allCheck the ~/.cursor/mcp.json syntax, then restart MCP in Cursor Settings
Token works in curl but not CursorMake sure the value in mcp.json is the full glp_… string — no quotes inside the bearer, no trailing whitespace

Legacy: pasting a 1-hour session JWT

Older guides told you to copy access_token out of the browser’s localStorage. That still works, but it expires in an hour, which means a fresh OAuth dance every time you reopen Cursor. PATs replace that workaround.

Other AI clients