How to use the TrainerPlan API and MCP server
Create a key and connect an AI assistant such as Claude, ChatGPT or Cursor through MCP, or your own scripts and spreadsheets, to your TrainerPlan account.
The TrainerPlan API lets your own tools read your coaching account and plan for your athletes: an AI assistant such as Claude, ChatGPT or Cursor through our MCP server, a script or a spreadsheet. It is included in the Elite plan. This article shows how to create a key, connect an assistant and make your first request.
What you can do with it
- Read your athletes, their calendars (planned and completed workouts, with their steps), events, notes, comments, training zones, fitness, fatigue and form, daily metrics such as weight, sleep and HRV, and your workout library.
- Make changes, with a key that allows it: plan workouts with structured steps, copy workouts from your library, add notes and events, and comment on a session. The athlete is notified and sees the change on their calendar, exactly as if you had made it in TrainerPlan.
Before you start
- The API and the MCP server are part of the Elite plan. On a trial or another plan, the API / MCP page shows how to upgrade.
- Only the account owner and team administrators can create keys.
1. Create a key
- Open your profile and choose API / MCP in the left menu, or go to app.trainerplan.co/trainer/api, and select Create key.
- Give the key a name that says what will use it, for example "Weekly report".
- Choose an Expiry if you want the key to stop working by itself after 30 days, 90 days or 1 year.
- Tick Allow this key to make changes only if the tool needs to plan or edit. Without it, the key can only read.
- The first time, accept the API terms. You only do this once for your account.
- Select Create key and then Copy. The key is shown only once, so keep it somewhere safe.
A key gives access to every athlete in your account, so treat it like a password. Use a separate key for each tool: you can have up to 10, and you can Revoke one at any time without affecting the others.
2. Connect an AI assistant (MCP)
Assistants that support the Model Context Protocol (MCP), such as Claude, ChatGPT, Cursor or VS Code, connect to TrainerPlan directly: everything the API can do becomes a tool the assistant can use, with no code to write and no file to upload. The server address is also on the API / MCP page:
https://api.trainerplan.co/api/v1/mcp
It signs in with your key and does only what the key allows: with a read-only key, the assistant can only read. Most assistants let you send the key as a header. In Claude Code, for example:
claude mcp add --transport http trainerplan https://api.trainerplan.co/api/v1/mcp \--header "Authorization: Bearer YOUR_API_KEY"
Where an assistant only asks for an address (a custom connector in Claude or ChatGPT, for example), add your key to the end of it: https://api.trainerplan.co/api/v1/mcp/YOUR_API_KEY. That address works like the key itself: keep it private, and revoke the key if it is ever shared.
Then ask in plain words, for example "Who missed a session this week?" or "Plan 5 x 1 km for Laura on Thursday". What the assistant changes reaches your athletes' calendars and devices as if you had done it yourself. It is told to check with you before changing anything, but give it a read-only key unless you want it to plan, and check what it plans before relying on it.
3. Use it from your own scripts
Send the key in the Authorization header. This request lists your athletes:
curl https://api.trainerplan.co/api/v1/athletes \ -H "Authorization: Bearer YOUR_API_KEY"
Every address starts with https://api.trainerplan.co/api/v1. The full list of what you can ask for, with an example for each request, is in API documentation, the link at the bottom of the API page.
Limits and usage
Each key can make 120 requests a minute, of which 30 can be changes. A request over the limit is answered with a 429 error: wait a minute and try again. Under your keys, Usage in the last 30 days shows the requests of each day and how many were refused by the limit.
Good to know
- For an athlete who has not accepted your invitation yet, the API only returns what you added yourself.
- Notes an athlete kept private are not returned.
- If you think a key has been exposed, revoke it on the API page and create a new one.
Questions? Write to us at info@trainerplan.co.
Updated October 5, 2026