Model Context Protocol

Agent Integrations

Let external AI assistants — Claude, ChatGPT, Codex, Cursor, Zapier — connect to The Pretty Problem as a signed-in athlete and act on challenge data through a typed, OAuth-secured MCP server.

MCP Endpoint

https://jettchallenge.com/mcp

OAuth 2.1

Supabase-issued tokens. Each caller acts as themselves.

RLS Enforced

User-scoped data. No assistant sees another athlete's journal.

5 Tools

Curriculum, progress, completion, and journal read/write.

Quick start

1. Connect your client

Point any MCP Streamable HTTP client at the endpoint below. The first request triggers OAuth dynamic client registration and redirects the athlete through the branded consent screen.

Endpoint

https://jettchallenge.com/mcp

2. Call a tool

Authenticated requests include a bearer token. Public tools like list_challenge_days work without a token.

curl -X POST https://jettchallenge.com/mcp \
  -H "Authorization: Bearer <oauth-access-token>" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Tool reference

All tool calls use JSON-RPC 2.0 over HTTP POST. Names are stable; use them to build prompts, automations, and integrations.

List challenge days

list_challenge_days

No auth

List the 21 days of The Pretty Problem Athlete Challenge with week, title and public teaser. Free preview days are flagged with isFree.

Parameters

NameTypeRequiredDescription
weekintegerNoOptional week filter: 1, 2 or 3.
Example request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_challenge_days",
    "arguments": {
      "week": 1
    }
  }
}
Example response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"days\":[{\"day\":1,\"week\":1,\"weekTitle\":\"Build the Base\",\"title\":\"Baseline + Court Walk\",\"teaser\":\"Set your baseline and learn the court.\",\"isFree\":true}]}"
      }
    ]
  }
}

Get my progress

get_my_progress

OAuth required

Get the signed-in athlete's challenge progress: Problem Points, current streak, unlock status and completed days.

Example request
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_my_progress",
    "arguments": {}
  }
}
Example response
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"firstName\":\"Jett\",\"points\":300,\"streak\":3,\"unlocked\":true,\"onboarded\":true,\"startDate\":\"2026-07-01\",\"lastCompletedDate\":\"2026-07-03\",\"completedDays\":[{\"day\":1,\"title\":\"Baseline + Court Walk\",\"pointsEarned\":100,\"completedAt\":\"2026-07-01T08:30:00Z\"}]}"
      }
    ]
  }
}

Complete a challenge day

complete_challenge_day

OAuth required

Mark one day of the 21-day challenge as complete for the signed-in athlete and award 100 Problem Points. Idempotent — calling again for an already-completed day returns alreadyCompleted: true.

Parameters

NameTypeRequiredDescription
dayintegerYesChallenge day number, 1 through 21.
notesstringNoOptional notes about how the session went.
Example request
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "complete_challenge_day",
    "arguments": {
      "day": 7,
      "notes": "Finished every set. Legs are toast."
    }
  }
}
Example response
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"day\":7,\"title\":\"Pressure Defense + Close-Outs\",\"completed\":true,\"pointsEarned\":100}"
      }
    ]
  }
}

Add a confidence journal entry

add_journal_entry

OAuth required

Write or update a Confidence Journal entry for the signed-in athlete, optionally tied to a challenge day. Reuse entryKey to update the same entry.

Parameters

NameTypeRequiredDescription
contentstringYesThe journal entry text.
dayintegerNoOptional challenge day this entry belongs to (1-21).
entryKeystringNoStable key for the entry; reuse it to update the same entry. Defaults to the day or today's date.
Example request
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "tools/call",
  "params": {
    "name": "add_journal_entry",
    "arguments": {
      "content": "I stayed in the stance even when I was tired. That is the win.",
      "day": 7,
      "entryKey": "day-7"
    }
  }
}
Example response
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"entryKey\":\"day-7\",\"day\":7,\"saved\":true}"
      }
    ]
  }
}

List confidence journal entries

list_journal_entries

OAuth required

Read the signed-in athlete's Confidence Journal entries, newest first.

Parameters

NameTypeRequiredDescription
limitintegerNoHow many entries to return. Defaults to 20. Max 100.
Example request
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "tools/call",
  "params": {
    "name": "list_journal_entries",
    "arguments": {
      "limit": 5
    }
  }
}
Example response
{
  "jsonrpc": "2.0",
  "id": 5,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"entries\":[{\"entryKey\":\"day-7\",\"day\":7,\"content\":\"I stayed in the stance even when I was tired. That is the win.\",\"updatedAt\":\"2026-07-03T08:45:00Z\"}]}"
      }
    ]
  }
}

Authentication flow

  1. The MCP client performs OAuth 2.1 dynamic client registration against the Supabase authorization server.
  2. The athlete is redirected to the branded consent screen at /.lovable/oauth/consent.
  3. After approval, Supabase returns an access token scoped to the authenticated user.
  4. Every authenticated tool call forwards that token; Supabase RLS runs as the athlete, not as an admin.
Security note: Tools never accept a user ID as input. Identity comes from the verified OAuth token. Do not paste app-session JWTs — only OAuth-client tokens from the configured authorization server are accepted.

Common use cases

Voice coach

"Mark Day 7 complete." The assistant calls complete_challenge_day, awards 100 Problem Points, and updates the streak.

Weekly recap

"How is my week looking?" The assistant pulls get_my_progress and recent journal entries to summarize wins.

Journal by chat

"Log that I felt strong today." The assistant writes a Confidence Journal entry with add_journal_entry.

Automation

Zapier or Make can remind athletes, log completions, or celebrate milestones using the same tools.