finalsurge-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@finalsurge-mcp Build this week's workouts from Final Surge and show me the preview."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
finalsurge-mcp
A local MCP server that turns the coach's free-text workouts in Final Surge into structured workouts in the Final Surge builder. Final Surge then syncs them to the watch.
This project is not affiliated with Final Surge. It calls the undocumented endpoints of the Final Surge web app with your own account, and a change on their side can break it at any time.
Use it
Requirements: macOS, uv, Claude Desktop, and a Final Surge account linked to your watch.
git clone https://github.com/pavelzaitsau/finalsurge-mcp.git
cd finalsurge-mcp
uv sync
FS_EMAIL=you@example.com uv run finalsurge-mcp --set-passwordThe last command stores the Final Surge password in the macOS Keychain under the service finalsurge-mcp.
Add the server to ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop. Use the full path from which uv and the absolute path of the clone:
"finalsurge": {
"command": "/opt/homebrew/bin/uv",
"args": ["--directory", "/absolute/path/to/finalsurge-mcp", "run", "finalsurge-mcp"],
"env": { "FS_EMAIL": "you@example.com" }
}src/finalsurge_mcp/rules.md holds the author's own conventions: paces, heart rate and the coach's phrasing. Copy it, adjust it to your training, and point FS_RULES_FILE at your copy.
Then ask Claude: "Build this week's workouts from Final Surge and show me the preview."
Claude reads the rules, builds the steps and shows a preview with a preview_token. After approval, Claude saves the steps with that token. The watch receives the workout after the Final Surge app syncs.
Related MCP server: Garmin Workout Pipeline
What it does not do
It does not talk to the watch. Final Surge owns the sync to Apple Watch, Garmin and Coros.
It does not parse the coach's text. Claude converts the text, and the server rejects steps that break a hard rule. See ADR-0002.
It does not use a public API. Final Surge has none, and the server calls the endpoints of the web app. See the API notes.
It does not overwrite a workout that already has steps, unless the request says so. An overwrite keeps a backup that
restore_backupputs back.
Configuration
Setting | Default | Effect |
| none, required | Final Surge login, and the Keychain account name |
| Keychain | Password; overrides the Keychain entry. Avoid it in |
| none | Session token; skips the login |
| from the login or | Final Surge user key |
|
| Rules file returned to Claude |
|
| Token cache (mode 0600, tied to |
|
| API root |
A change to rules.md applies on the next call. A change to the Python code applies after a restart of Claude Desktop.
Tools
Tool | What it does |
| Lists calendar workouts with the coach's text |
| Returns |
| Returns past coach texts with the steps built by hand, and flags the ones that break the current rules |
| Returns the heart-rate zones of the Final Surge profile, for reference |
| Checks the steps, renders them and returns a |
| Writes the previewed steps to the builder and reads them back |
| Puts back the steps that an overwrite replaced |
| Returns the steps in the builder |
Troubleshooting
Symptom | Cause | Fix |
| Wrong password, or Final Surge asks for a captcha | Run |
A workout of the first day is missing | Final Surge excludes the start date of a range | Already handled; update the server if it reappears |
A rule change has no effect | The change is in Python code | Restart Claude Desktop |
| The server saves only today and later | Pick a current workout |
| The steps changed after the preview | Preview again and approve the new text |
| The save succeeded, the read-back failed | Call |
Development
scripts/check.shThe script runs the tests, the Markdown gate (markdownlint-cli2, through npx) and the docs style gate (vale). GitHub Actions runs the same script on every push and pull request.
Enable the commit-message hook once per clone:
git config core.hooksPath .githooksMore
Conversion rules: read before changing how Claude builds a workout.
Final Surge API notes: read when an endpoint stops working.
Decisions: read before changing the architecture.
Changelog: what changed in each version.
License
Available Tools
8 toolsget_examplesB
Recent workouts that already have a structured workout: coach text + the steps the athlete built. Examples flagged OLD STYLE break the current rules and must not be copied.
Inputs: limit, days_back. Returns: result
get_parsing_rulesA
The athlete's conventions for turning coach text into steps. ALWAYS read before building steps.
Inputs: no named parameters. Returns: result
get_structured_workoutC
Steps currently saved in the builder for a workout (compact form), or null.
Inputs: workout_key (required). Returns: result
get_zonesA
Heart-rate zones of the Final Surge profile, for reference only. Steps take heart rate in bpm ('hr').
Inputs: no named parameters. Returns: result
list_workoutsB
List planned workouts in the Final Surge calendar (dates YYYY-MM-DD, inclusive).
Returns coach's text in description and whether the builder already has steps.
Inputs: end_date (required), start_date (required), only_unstructured. Returns: result
preview_structured_workoutA
Check compact steps against the hard rules and render a preview. Writes nothing. Step: {kind: warmup|active|rest|cooldown, ONE of distance_km|distance_m|minutes|seconds|time, ONE target: pace "4:30-4:40" (min/km) | hr "120-135" (bpm), optional short English note}. Repeat: {repeat: N, steps: [...]}. Read get_parsing_rules first. Show the text to the athlete; pass preview_token to save_structured_workout after the athlete approves.
Inputs: name (required), steps (required).
restore_backupB
Restore the builder steps saved before an overwrite. The current steps are backed up first.
Inputs: backup_file (required).
save_structured_workoutA
Write the previewed steps into the Final Surge Workout Builder; Final Surge syncs them to the watch. preview_token must come from preview_structured_workout for exactly these name and steps, after the athlete approved the preview (or inside the approved nightly task). Refuses past dates, and refuses a workout that already has steps unless overwrite=true; an overwrite saves the old steps to a backup file first.
Inputs: date (required), name (required), steps (required), workout_key (required), +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have clearly distinct roles: list_workouts reads the calendar, get_structured_workout reads the builder, preview/save/restore form an unambiguous write pipeline. The only mild overlap is between get_parsing_rules and get_examples, which are both 'reference material to read before building,' though their descriptions clarify the difference (rules vs. concrete examples).
All eight tools follow a strict snake_case verb_noun pattern: list_workouts, get_zones, get_parsing_rules, get_examples, get_structured_workout, preview_structured_workout, save_structured_workout, restore_backup. The shared 'structured_workout' stem across preview/save/get reinforces the pipeline.
Eight tools is well-scoped for a focused workout-builder server, with no filler. Each tool earns its place: calendar read, three reference reads, builder read, validation, write, and undo.
The build → preview → save → restore lifecycle is fully covered, including safety nets like backups and overwrite protection. Minor gaps exist: there is no way to create a new planned workout or clear steps without overwriting with new ones, but these are workable around within the stated workflow.
Maintenance
Related MCP Connectors
Create structured workouts and push them to Apple Watch or Garmin.
AI coach for Garmin: builds training plans and structured workouts, synced straight to your watch.
Your AI writes training plans that arrive as structured workouts on iPhone and Apple Watch.
Running coach: your AI reads your runs and recovery, and writes sessions to your watch or phone.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables creation of Garmin Connect workouts using natural language descriptions. Supports multi-sport workouts with heart rate zones and automatic sync to Garmin devices.32ISC
- AlicenseAqualityCmaintenanceEnables building and uploading structured workouts to Garmin Connect using YAML or natural language, supporting running, cycling, and strength with zones and circuits.244MIT
- AlicenseAqualityCmaintenanceEnables users to describe workouts in plain English and have them created as structured Garmin Connect workouts with pace, HR, power, cadence targets, and repeat blocks. Also provides full workout lifecycle management including listing, updating, deleting, and scheduling to the calendar.849 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables Claude and other AI assistants to query workouts, build structured intervals, manage calendars, track fitness trends, and control training through natural conversation without official API approval.-