Get Started
Connect to Claude.ai

API Docs

REST API and MCP tools for workout.chat

Connect to Claude.ai

workout.chat supports the Model Context Protocol (MCP), which means you can connect it directly to Claude.ai and chat with your workout data in natural language — log exercises, check your history, share workouts, and more.

Adding workout.chat as a connector in Claude.ai

Steps

1
Open Claude.ai → Customize → Connectors
In the left sidebar of Claude.ai, click Customize, then select Connectors.
2
Click "Add custom connector"
Give it a name like My Workout Chat and enter the MCP server URL below.
3
Enter the MCP server URL
Copy and paste the URL below into the Remote MCP server URL field.
https://workout.chat/mcp
4
Authorise access
Click Add and Claude will open a login page. Sign in to workout.chat and click Allow to grant access.
Start chatting with your workouts
Claude can now log exercises, review your history, track weight, and generate share links — just by asking.
Example prompts to try: "Log today's back day — 3×10 pull-ups, 3×8 barbell rows at 135 lbs" · "How much did I bench last week?" · "Share my last workout" · "Log my weight as 185 lbs"

Authentication

The REST API uses session cookies for browser access. For external/programmatic access, use a Bearer token in the Authorization header.

MCP clients (e.g. Claude Desktop) authenticate via OAuth 2.0 PKCE. See the MCP OAuth Setup section.

Creating a token

POST to /mcp-tokens while logged in to generate a Bearer token.

curl -X POST https://workout.chat/mcp-tokens \
  -H "Content-Type: application/json" \
  -b "<session-cookie>" \
  -d '{"label": "my-script"}'

# Response
{"token": "abc123...", "label": "my-script"}

Using a token

curl https://workout.chat/api/workouts \
  -H "Authorization: Bearer <token>"

Base URL

https://workout.chat

All REST endpoints are prefixed with /api. Responses are JSON.

Workouts

GET /api/workouts List recent workouts
Query paramTypeDescription
limitoptintegerMax results, default 50
[
  {
    "id": 5,
    "user_id": 1,
    "performed_at": "2026-03-08T00:00:00",
    "title": "Back Day",
    "notes": null,
    "share_token": null,
    "created_at": "2026-03-08T20:57:33"
  }
]
POST /api/workouts Create a workout
Body fieldTypeDescription
performed_atstringISO datetime, e.g. 2026-03-08T09:00:00
titleoptstringWorkout name
notesoptstringFree-form notes
raw_textoptstringOriginal unparsed log text
{"id": 14}
GET /api/workouts/{id} Get workout + exercises
PATCH /api/workouts/{id} Update title / notes / date

Updatable fields: performed_at, title, notes, raw_text

DELETE /api/workouts/{id} Delete a workout

Exercises

POST /api/workouts/{id}/exercises Add an exercise to a workout
Body fieldTypeDescription
namestringExercise name
setsoptinteger
repsoptinteger
entered_weightoptnumberWeight as entered by user
entered_weight_unitoptstring"lbs" or "kg"
weight_kgoptnumberNormalised weight in kg
duration_secondsoptinteger
distance_kmoptnumber
notesoptstring
positionoptintegerOrder within workout, default 0
{"id": 42}
DELETE /api/exercises/{id} Remove an exercise

Weigh-ins

GET /api/weighins List recent weigh-ins
Query paramTypeDescription
limitoptintegerMax results, default 30
POST /api/weighins Log a weigh-in (upserts on date)
Body fieldTypeDescription
datestringISO date, e.g. 2026-03-08
weight_kgnumberWeight in kilograms
{"id": 7}
DELETE /api/weighins/{id} Delete a weigh-in

Profile

GET /api/profile Get current user's profile
{
  "id": 1,
  "name": "Sean",
  "email": "sean@example.com",
  "birth_year": 1990,
  "gender": "male",
  "height_cm": 178,
  "system": "imperial",
  "created_at": "2026-03-01T12:00:00"
}
PATCH /api/profile Update profile fields

Updatable fields: name, birth_year, gender, height_cm, system (metric or imperial)

{"ok": true}

MCP — Overview

workout.chat exposes a Model Context Protocol server at https://workout.chat/mcp. It accepts JSON-RPC 2.0 POST requests and is compatible with Claude Desktop, Cursor, and any other MCP client.

The MCP endpoint requires a valid Bearer token obtained via OAuth. See below.

Discovery

https://workout.chat/.well-known/oauth-authorization-server
https://workout.chat/.well-known/oauth-protected-resource

MCP — OAuth Setup

The server implements OAuth 2.0 Authorization Code flow with PKCE and Dynamic Client Registration (RFC 7591). MCP clients like Claude Desktop handle this automatically.

Endpoints

POST /oauth/register Dynamic Client Registration
curl -X POST https://workout.chat/oauth/register \
  -H "Content-Type: application/json" \
  -d '{"client_name": "My App", "redirect_uris": ["https://myapp.com/callback"]}'

# Response
{
  "client_id": "a1b2c3d4...",
  "client_name": "My App",
  "redirect_uris": ["https://myapp.com/callback"],
  "grant_types": ["authorization_code"],
  "token_endpoint_auth_method": "none"
}
GET /oauth/authorize Authorization endpoint (shows consent UI)
Query paramDescription
client_idFrom registration
redirect_uriMust match registered URI
code_challengePKCE S256 challenge
code_challenge_methodS256
stateoptCSRF token
POST /oauth/token Exchange auth code for access token
Body fieldDescription
codeAuth code from redirect
code_verifierPKCE verifier
grant_typeauthorization_code
{"access_token": "abc123...", "token_type": "Bearer"}

MCP — Tools

These tools are available to any connected AI assistant. All tools operate on the authenticated user's data only.

Workouts

log_workout write

Log exercises for a workout session. By default appends to the most recent workout from the same day (within 4 hours) to keep exercises grouped. Set new_workout=true to force a new session.

ParameterTypeDescription
exercisesarrayList of exercise objects (see below)
performed_atoptstringISO date, defaults to today
titleoptstringWorkout name, e.g. "Push Day"
notesoptstringFree-form notes
new_workoutoptbooleanForce a new workout record

Each exercise object:

FieldTypeDescription
namestringExercise name
setsoptinteger
repsoptinteger
weightoptnumber
weight_unitoptstring"lbs" or "kg", default "lbs"
duration_secondsoptinteger
distance_kmoptnumber
notesoptstring
list_workouts read

List the user's most recent workouts.

ParameterTypeDescription
limitoptintegerMax results, default 10
get_workout read

Get a specific workout with all its exercises. Exercise IDs are included so they can be referenced for updates.

ParameterTypeDescription
workout_idinteger
update_exercise write

Correct a previously logged exercise. Only pass the fields that need to change — all others are left as-is.

ParameterTypeDescription
exercise_idintegerFrom log_workout or get_workout
nameoptstring
setsoptinteger
repsoptinteger
weightoptnumber
weight_unitoptstring
duration_secondsoptinteger
distance_kmoptnumber
notesoptstring
remove_exercise write

Delete a mistakenly logged exercise entry.

ParameterTypeDescription
exercise_idinteger
share_workout write

Generate a public share link for a workout. Calling this multiple times for the same workout returns the same URL.

ParameterTypeDescription
workout_idinteger
{"url": "https://workout.chat/w/abc123xyz", "workout_id": 5}

Weigh-ins

log_weighin write

Record the user's body weight. Upserts on date — logging twice on the same day updates the existing entry.

ParameterTypeDescription
weightnumberNumeric value
unitoptstring"lbs" or "kg", default "lbs"
dateoptstringISO date, defaults to today
list_weighins read

List recent body weight entries.

ParameterTypeDescription
limitoptintegerMax results, default 30

Profile

get_profile read

Get the current user's profile including name, height, birth year, and preferred unit system.

update_profile write

Update profile fields. Only pass fields that should change.

ParameterTypeDescription
nameoptstring
birth_yearoptinteger
genderoptstringe.g. "male", "female"
height_cmoptinteger
systemoptstring"metric" or "imperial"

Utility

get_current_date read

Returns today's date and current time. Used to ensure workout dates are logged correctly.

{"date": "Monday, March 09, 2026", "time": "14:32"}