@trainheroic-unofficial/athlete-mcp 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -11
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
# @trainheroic-unofficial/athlete-mcp
|
|
2
2
|
|
|
3
|
-
Local single-user MCP server for a TrainHeroic **athlete
|
|
3
|
+
Local single-user [MCP](https://modelcontextprotocol.io) server for a TrainHeroic **athlete** — it exposes one [TrainHeroic](https://www.trainheroic.com) athlete's own training to an AI assistant (Claude Code, Claude Desktop, or any MCP client) as callable tools. It runs on your machine and speaks the MCP stdio transport, so the assistant launches it as a subprocess.
|
|
4
4
|
|
|
5
|
-
It
|
|
5
|
+
It reads two required environment variables, `TRAINHEROIC_EMAIL` and `TRAINHEROIC_PASSWORD` — your existing TrainHeroic login. These are your real credentials in plaintext; the config below puts them in a file or shell history, so treat them as secrets.
|
|
6
|
+
|
|
7
|
+
It exposes the logged-in athlete's own training — scheduled and completed workouts, per-exercise history, PRs (personal records), working maxes, and lifetime totals — plus one confirmation-gated write that logs a completed set. For coaching (rosters, teams, programs, messaging), use [`@trainheroic-unofficial/coach-mcp`](../coach-mcp). For a hosted version that holds credentials server-side behind OAuth and gives a coach login both the athlete and coaching tools, see the [root README](../../README.md).
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Install
|
|
10
12
|
|
|
13
|
+
Needs Node (>= 18); the commands below fetch the package with `npx` on first run.
|
|
14
|
+
|
|
11
15
|
### Claude Code
|
|
12
16
|
|
|
13
17
|
```bash
|
|
@@ -19,7 +23,11 @@ claude mcp add trainheroic-athlete \
|
|
|
19
23
|
|
|
20
24
|
### Claude Desktop / `.mcp.json` / other stdio clients
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
Put this in your client's MCP config — for Claude Desktop that's `claude_desktop_config.json`
|
|
27
|
+
(macOS: `~/Library/Application Support/Claude/`; Windows: `%APPDATA%\Claude\`); for a
|
|
28
|
+
project-scoped Claude Code setup it's `.mcp.json` at the repo root.
|
|
29
|
+
|
|
30
|
+
```json
|
|
23
31
|
{
|
|
24
32
|
"mcpServers": {
|
|
25
33
|
"trainheroic-athlete": {
|
|
@@ -27,37 +35,49 @@ claude mcp add trainheroic-athlete \
|
|
|
27
35
|
"args": ["-y", "@trainheroic-unofficial/athlete-mcp"],
|
|
28
36
|
"env": {
|
|
29
37
|
"TRAINHEROIC_EMAIL": "athlete@example.com",
|
|
30
|
-
"TRAINHEROIC_PASSWORD": "yourpassword"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
38
|
+
"TRAINHEROIC_PASSWORD": "yourpassword"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
34
42
|
}
|
|
35
43
|
```
|
|
36
44
|
|
|
37
|
-
A coach account works here too: a coach
|
|
45
|
+
A coach account works here too: a TrainHeroic coach account also has its own athlete-side data, so it can read its own training through these tools. After it connects, ask the assistant something like "show my recent workouts" to confirm the tools are available.
|
|
38
46
|
|
|
39
47
|
---
|
|
40
48
|
|
|
41
49
|
## Tools
|
|
42
50
|
|
|
51
|
+
All read-only except `athlete_log_set`. The assistant fills in each tool's parameters (dates
|
|
52
|
+
are `YYYY-MM-DD`); your MCP client shows the full schema for each.
|
|
53
|
+
|
|
43
54
|
- `athlete_whoami` — identity (id, name, roles)
|
|
44
55
|
- `athlete_profile` — lifetime totals + profile
|
|
45
56
|
- `athlete_prefs` — notification/display preferences
|
|
46
|
-
- `athlete_workouts` — scheduled + completed workouts in a date range
|
|
57
|
+
- `athlete_workouts` — scheduled + completed workouts in a date range, flattened into one list
|
|
47
58
|
- `athlete_exercises` — search the exercises you've logged
|
|
48
59
|
- `athlete_exercise_history` — per-exercise PRs + dated session history
|
|
49
60
|
- `athlete_personal_records` — exercise personal records
|
|
50
61
|
- `athlete_exercise_stats` — last performance + PR as of a date
|
|
51
62
|
- `athlete_working_maxes` — working max per exercise
|
|
52
63
|
- `athlete_leaderboard` — benchmark/test workout leaderboard
|
|
53
|
-
|
|
64
|
+
|
|
65
|
+
**Write (confirmation-gated):**
|
|
66
|
+
|
|
67
|
+
- `athlete_log_set` — logs completed set results to your training log. This is a real write
|
|
68
|
+
that your coach can see. It confirms before running: the server asks the client to confirm,
|
|
69
|
+
falling back to an explicit `confirm: true` argument when the client can't prompt.
|
|
54
70
|
|
|
55
71
|
---
|
|
56
72
|
|
|
57
73
|
## Develop
|
|
58
74
|
|
|
75
|
+
Run `pnpm install` once at the repo root (Node >= 22, pnpm 10), then from this package. The
|
|
76
|
+
`pnpm start`/`pnpm inspect` commands need `TRAINHEROIC_EMAIL` and `TRAINHEROIC_PASSWORD`
|
|
77
|
+
exported in your shell. "MCP Inspector" is the [official MCP debugging UI](https://github.com/modelcontextprotocol/inspector).
|
|
78
|
+
|
|
59
79
|
```bash
|
|
60
|
-
pnpm start # run from source
|
|
80
|
+
pnpm start # run from source
|
|
61
81
|
pnpm inspect # MCP Inspector UI against the source server
|
|
62
82
|
pnpm build # tsdown → dist/server.mjs
|
|
63
83
|
pnpm typecheck
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/athlete-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
23
23
|
"zod": "^4.4.3",
|
|
24
|
-
"@trainheroic-unofficial/core": "0.
|
|
25
|
-
"@trainheroic-unofficial/js": "0.
|
|
24
|
+
"@trainheroic-unofficial/core": "0.5.0",
|
|
25
|
+
"@trainheroic-unofficial/js": "0.5.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^26.0.0",
|