MCP server
gymgym speaks the Model Context Protocol at https://app.gymgym.club/mcp (Streamable HTTP). Assistants sign in with OAuth 2.1 in the browser: the user picks one of their accounts and allows the app, and can remove it at any time in Settings → Connected apps. To use another account, connect again and pick it. Setup for Claude, ChatGPT, Codex and other clients is in CLI and AI agents.
Sign-in
Section titled “Sign-in”The server is an OAuth-protected resource. A request without a valid token gets 401 with a WWW-Authenticate header pointing at its metadata; clients follow it, sign the user in and come back with a token bound to the server. These values are read from the running configuration:
| Protected resource metadata | /.well-known/oauth-protected-resource/mcp |
| Resource (token audience) | https://app.gymgym.club/mcp |
| Authorization server | https://app.gymgym.club/api/auth |
| Authorization endpoint | https://app.gymgym.club/api/auth/oauth2/authorize |
| Token endpoint | https://app.gymgym.club/api/auth/oauth2/token |
| Client ID Metadata Documents | supported (preferred) |
| Dynamic client registration | https://app.gymgym.club/api/auth/oauth2/register |
| PKCE | S256 (required) |
| Grants | authorization_code, refresh_token |
| Scopes | openid, profile, email, offline_access |
| Token types | Bearer, or DPoP-bound (EdDSA, ES256, ES512, PS256, RS256) |
Access ends as soon as the user removes the app in Settings; tokens it still holds stop working on the next request. The OAuth endpoints are part of the Auth REST API.
Weights are in the account’s unit (kg or lb).
whoami
Section titled “whoami”The account in use: weight unit (kg or lb), language, time zone and today’s date (read-only)
settings
Section titled “settings”Show the settings, or change them: weight unit, default rest, effort rating per set, language, week start, rest timer, where planned sessions start, and About you (sex, year of birth, height, and for a woman a pregnancy, a baby in the last year or menopause)
| Parameter | Type | Description |
|---|---|---|
unit? |
kg | lb |
Weight unit for everything read and written |
rest? |
string | Default rest between sets: “90”, “90s” or “1:30” |
effort? |
off | rir | rpe |
Rate each set as reps in reserve or RPE |
language? |
en | de | es | fr | it | pt | pt-BR | pl | tr | ru | uk | hu | zh | ko | hi | th | ar |
App language |
weekStart? |
monday | sunday |
First day of the week |
restTimer? |
boolean | Automatic rest after each set |
sessionStart? |
plan | last |
Planned sessions without progression start from the plan, or from that routine’s last session |
sex? |
male | female | unsaid |
Their sex as they gave it; unsaid when they would rather not say |
birthYear? |
integer | Year of birth |
height? |
number | Height in cm |
lifeStage? |
none | pregnant | postpartum | menopause | unsaid |
For a woman: pregnant, postpartum (a baby in the last year), menopause or after it, none, or unsaid |
list_folders
Section titled “list_folders”Routine folders as on the Workout screen: each with its routines and the one it suggests next (the routine after the one done last), then My routines (routines in no folder), then archived folders, marked archived: hidden from the Workout screen until restored (read-only)
save_folder
Section titled “save_folder”Create a folder, or rename one (pass folder)
| Parameter | Type | Description |
|---|---|---|
name |
string | The new name |
folder? |
string | Existing folder name, unique start of a name, or id, to rename it |
delete_folder
Section titled “delete_folder”Delete a folder. Its routines move to My routines unless withRoutines is true (destructive)
| Parameter | Type | Description |
|---|---|---|
folder |
string | Folder name, unique start of a name, or id |
withRoutines? |
boolean | Delete its routines too |
archive_folder
Section titled “archive_folder”Archive a folder the person no longer uses but may want back: it leaves the Workout screen with its routines, which stay as they are, until restored (archived: false). delete_folder removes one for good
| Parameter | Type | Description |
|---|---|---|
folder |
string | Folder name, unique start of a name, or id |
archived? |
boolean | false restores an archived folder; true when left out |
move_routine
Section titled “move_routine”Put a routine in a folder, or in “My routines”
| Parameter | Type | Description |
|---|---|---|
routine |
string | Routine name, unique start of a name, or id |
folder |
string | Folder name, unique start of a name, or id; “My routines” for none |
list_programs
Section titled “list_programs”The ready-made programs (Explore): level, goal, place, days a week, equipment and each routine’s exercises (read-only)
save_program
Section titled “save_program”Save a ready-made program as a new folder of its routines; the weekly schedule stays as it is
| Parameter | Type | Description |
|---|---|---|
program |
string | ppl, full-body, upper-lower, bodyweight, dumbbells, strength |
folder? |
string | The folder’s name (default: the program’s), e.g. in the user’s language |
get_plan
Section titled “get_plan”The weekly plan (routine per weekday, null = rest) and all routines (read-only)
set_plan_day
Section titled “set_plan_day”Put a routine on a weekday, or make it a rest day
| Parameter | Type | Description |
|---|---|---|
weekday |
string | mon … sun |
routine |
string | Routine name, unique start of a name, or id; “rest” for a rest day |
A day’s planned routine with the next target for every exercise (progression applied), its weekday, how many workouts are already logged that day and, for today, where they are in their training cycle (see training_cycle) (read-only)
| Parameter | Type | Description |
|---|---|---|
date? |
string | YYYY-MM-DD; default today in the account time zone |
get_routine
Section titled “get_routine”One routine as a routine document (edit it and pass it to apply_routine) (read-only)
| Parameter | Type | Description |
|---|---|---|
routine |
string | Routine name, unique start of a name, or id |
apply_routine
Section titled “apply_routine”Create a routine from a routine document, or replace the routine its “id” names. Returns the saved document.
Takes a whole routine document as its arguments; see Routine and workout documents.
delete_routine
Section titled “delete_routine”Delete a routine; its weekdays become rest days and logged workouts stay (destructive)
| Parameter | Type | Description |
|---|---|---|
routine |
string | Routine name, unique start of a name, or id |
apply_program
Section titled “apply_program”Create a program: a new folder with several routines (up to seven), each a routine document (see apply_routine). For more than seven routines make a second program: each program has its own folder, named for what is in it (not the same name with a number added). Returns the folder and the saved routines.
| Parameter | Type | Description |
|---|---|---|
folder |
string | The program’s name, for its folder |
routines |
object[] | Its routines, in the order they are done; new ones (no “id”) |
create_exercise
Section titled “create_exercise”Add an exercise of the user’s own when the library has nothing close (search first). Returns its id, usable in routine documents
| Parameter | Type | Description |
|---|---|---|
name |
string | Its name, in the user’s language |
bodyPart |
chest | back | shoulders | upper arms | lower arms | upper legs | lower legs | waist | neck | cardio | full body |
Where it works |
equipment? |
body weight | dumbbell | cable | barbell | leverage machine | band | kettlebell | resistance band | weighted | suspension trainer | roller | smith machine | stability ball | ez barbell | medicine ball | sled machine | weight plate | rope | assisted | landmine | bosu ball | sandbag | trap bar | olympic barbell | elliptical machine | stationary bike | wheel roller | macebell | tire | hammer | skierg machine | stepmill machine | upper body ergometer |
|
description? |
string | How it is done, in the user’s language: the setup, then two or three cues on form, in a few short sentences. No sets, reps or weights: they belong in the routine |
merge_exercise
Section titled “merge_exercise”Link one of the user’s custom exercises to the closest library exercise (search first, confirm with the person). Moves its workouts, routines and stars to the library exercise and removes the custom one. Use it when a custom exercise duplicates the library, e.g. a past import guessed the wrong muscles.
| Parameter | Type | Description |
|---|---|---|
custom |
string | Custom exercise id or name |
library |
string | Library exercise id or name (see search_exercises) |
rename_exercise
Section titled “rename_exercise”Rename one of the person’s own exercises, e.g. into their language (it keeps its workouts, routines and stars). Only with their yes: ask first when it is not what they asked for. A library exercise cannot be renamed: it already comes in their language.
| Parameter | Type | Description |
|---|---|---|
exercise |
string | Id or name of their own exercise |
name |
string | The new name, in their language |
history_overview
Section titled “history_overview”The kinds of workout in their logged history, grouped by name (“Push”, “Day A”, “Warm up”), the most often done first: for each its number of sessions, first and last day, usual length, the id of its newest workout, and the exercises it usually holds with the usual work sets, the warm-up sets they usually do before them (warmups; missing when they go straight to the work sets), the reps and the weight of the last time (in the account unit). Also quickLog when they logged loose sets without a workout (days and sets: no kind, nothing to build a routine from), and own: the exercises of their own those workouts use, each with the library exercises it may duplicate (same marks the same exercise under another app’s name). Call it first to make routines from their history: one routine for each kind with build: true (done more than once), not only the newest workout, and none left out because it was not done lately. For one session in full use get_workout. (read-only)
| Parameter | Type | Description |
|---|---|---|
offset? |
integer | Which kind to start from (the answer says “next” when there are more than it lists) |
list_workouts
Section titled “list_workouts”Logged workouts, newest first, a page at a time: with “next” (a number) in the answer, call again with that offset for the older ones. To see what kinds of workout there are, use history_overview instead of paging through all of them. (read-only)
| Parameter | Type | Description |
|---|---|---|
from? |
string | YYYY-MM-DD |
to? |
string | YYYY-MM-DD |
limit? |
integer | Page size, default 20 |
offset? |
integer | How many of the newest to skip, default 0 |
get_workout
Section titled “get_workout”One logged workout as a workout document (edit it and pass it to apply_workout to correct it) (read-only)
| Parameter | Type | Description |
|---|---|---|
workout |
string | Workout id (or its start or end), a date YYYY-MM-DD, or “last” |
apply_workout
Section titled “apply_workout”Log a finished workout from a workout document, or correct the workout its “id” names. Returns the saved document and any new personal records.
Takes a whole workout document as its arguments; see Routine and workout documents.
log_sets
Section titled “log_sets”Record sets of one exercise without a routine; they join that day’s “Quick log” workout
| Parameter | Type | Description |
|---|---|---|
exercise |
string | Exercise id or name (see search_exercises) |
sets |
string[] | Like “80x5”, “x12”, “45s”, optionally “@8” |
date? |
string | YYYY-MM-DD; default today |
delete_workout
Section titled “delete_workout”Delete a logged workout (destructive)
| Parameter | Type | Description |
|---|---|---|
workout |
string | Workout id (or its start or end), a date YYYY-MM-DD, or “last” |
delete_workouts
Section titled “delete_workouts”Delete several logged workouts at once: a list of them, every one in a range of dates (from and/or to, both days included), or the whole history (all). A running workout is never deleted. Their sets go with them, and so do the personal records and progress they set, and there is no undo: say how many and which dates before you call it, and use “all” only when the person asked to clear everything. For a single workout use delete_workout. (destructive)
| Parameter | Type | Description |
|---|---|---|
workouts? |
string[] | The workouts to delete. Not together with from, to or all |
from? |
string | First day to delete, YYYY-MM-DD; without “to”, that day and every later one |
to? |
string | Last day to delete, YYYY-MM-DD; without “from”, that day and every earlier one |
all? |
boolean | Delete the whole history. Not together with the others |
log_bodyweight
Section titled “log_bodyweight”Save a body-weight reading in the account unit (one per day; a second one replaces it)
| Parameter | Type | Description |
|---|---|---|
weight |
number | |
date? |
string | YYYY-MM-DD; default today |
bodyweight_history
Section titled “bodyweight_history”Body-weight readings of the last days, in the account unit, and the goal weight (read-only)
| Parameter | Type | Description |
|---|---|---|
days? |
integer | Default 90 |
search_exercises
Section titled “search_exercises”Search exercises by name (all terms must match): your own first, then the library. A name in any language finds an exercise; results come in the account’s language, with the English name beside a translated one, matches in that language or English first (read-only)
| Parameter | Type | Description |
|---|---|---|
query? |
string | Words in the name, e.g. “incline dumbbell” |
queries? |
string[] | Several searches at once, e.g. every exercise of a program (up to 42); results by query |
limit? |
integer | Results per search (default 25; with queries 8, or 4 when there are more than 20) |
exercise_guide
Section titled “exercise_guide”How long to rest between the sets of each exercise and how to warm up for it, worked out for this person from the method in the guide “Warm-up and rest”. It reads the kind of exercise (a heavy many-joint lift, machine or cable work, body weight, work on one joint, core, a hold, mobility, cardio), the reps and how hard the sets are, and who they are: sex, age, a pregnancy, their experience (level) and the places they limit (limits). Give the exercises of one routine in the order they are done, or a routine they have. For each exercise it returns the rest in seconds with the range that is still right, the number of warm-up sets (the app plans their weights), the limited places the exercise loads, and notes on the order. Give superset letters and it also returns, under supersets, the type of each pair (opposing muscles, different muscles, the same muscles) and what is wrong with it; with suggestSupersets it lists the pairs that a routine could make for a person short of time. Use it before you set rest and warm-ups in a routine or a program (one call for each routine), and for the rest after a set when you recommend a weight and reps. (read-only)
| Parameter | Type | Description |
|---|---|---|
exercises? |
any | The exercises of one routine, in the order they are done |
routine? |
string,null | Or a routine they have (name, unique start of a name, or id): its exercises and what it has now |
level? |
any | Their experience: beginner (under about a year of regular lifting), intermediate, or advanced (several years). Leave it out when you do not know |
limits? |
any | |
explain? |
boolean,null | Give the reasons for every number (default: only with 3 exercises or fewer) |
suggestSupersets? |
boolean,null | For a person short of time: also list the pairs the exercises that are in no superset could make (pairIdeas), with the exercise that goes first, what to move and the rest of each |
exercise_alternatives
Section titled “exercise_alternatives”Exercises that can stand in for one: the same main muscle and movement, with the equipment they have, and what leaves a place they limit alone first. Returns up to 12, each with what is the same and what differs and the places it loads. Pick two or three that fit, say what is the same and what differs, and use the id in a routine document. (read-only)
| Parameter | Type | Description |
|---|---|---|
exercise |
string | The exercise to replace: its id, or its name as search_exercises gives it |
limits? |
any | Where they have a pain or an old injury: what leaves those places alone comes first, and every exercise says which of them it loads |
equipment? |
any | Equipment to use (body weight always counts); default: their active equipment profile, or anything |
limit? |
any | How many (default 8) |
method_sources
Section titled “method_sources”The studies and guidelines behind the method: reps and weight, weekly sets, rest between sets, exercise order, supersets, warm-ups, easy weeks, fat loss, women and men, older adults, pregnancy and menopause, injuries. Call it when they ask what a number or a rule rests on, or for the research, the studies or the sources. Each source has its authors, year, title, journal and PubMed link, from the one list that the website and the docs show. Give the topics that fit the question, or words to look for; the answer also lists the topics. Cite only what it returns. (read-only)
| Parameter | Type | Description |
|---|---|---|
topics? |
any | What the question is about: loads (Reps, weight and effort), volume (Weekly sets and frequency), rest (Rest between sets), order (Exercise order), supersets (Supersets), warmup (Warm-up and stretching), easy (Easy weeks and breaks), fatloss (Fat loss), sex (Women and men), older (Older adults), life (Pregnancy and menopause), injuries (Injuries and pain) |
query? |
any | Or words from the title or the authors of a study, such as “pregnancy”, “Schoenfeld” or “warm-up” |
exercise_progress
Section titled “exercise_progress”One exercise’s history: best weight, best estimated 1RM, and per session the top set, estimated 1RM, effort (reps in reserve) and volume, in the account unit, oldest first (read-only)
| Parameter | Type | Description |
|---|---|---|
exercise |
string | Exercise id or name, in any language |
sessions? |
integer | How many recent sessions (default 20) |
muscle_balance
Section titled “muscle_balance”Hard sets per muscle over the last days (primary muscle = 1 set, supporting = 0.5), and muscles not trained at all (read-only)
| Parameter | Type | Description |
|---|---|---|
days? |
integer | Default 28 |
hardOnly? |
boolean | Count only sets close to failure |
muscle_recovery
Section titled “muscle_recovery”Per muscle: fatigue now (0–1), how long since it was trained and its strength trend (read-only)
lift_balance
Section titled “lift_balance”Estimated 1RM of the main lifts (squat, bench press, deadlift, overhead press, row), how they compare and the weakest one (read-only)
effort_stats
Section titled “effort_stats”How hard the sets were over the last days: average reps in reserve, share of sets near failure, per week (read-only)
| Parameter | Type | Description |
|---|---|---|
days? |
integer | Default 56 |
training_cycle
Section titled “training_cycle”Where they are in their training cycle: the days since their last workout, the workouts and load of each of the last twelve weeks (newest first; a week is full, easy when its load was at most 70 % of the weeks before it, or off), how many full weeks in a row they trained with no easy week, and how many weeks ago the last easy week was. Use it with today, and before you plan or change a program. (read-only)
training_activity
Section titled “training_activity”Training days over the last days with minutes and volume (in the account unit), and the weekly streak; more than a hundred training days come by week (read-only)
| Parameter | Type | Description |
|---|---|---|
days? |
integer | Default 90 |
Resources
Section titled “Resources”| URI | Description |
|---|---|
gymgym://schema/routine |
JSON Schema of routine documents |
gymgym://schema/workout |
JSON Schema of workout documents |
gymgym://example/routine |
An example routine document |
gymgym://example/workout |
An example workout document |