MCP server

Routebook ships an MCP server, so popular AI assistants (Claude on the web, desktop and mobile, Claude Cowork and ChatGPT) can use its tools directly, as can developer tools such as Claude Code, Goose and custom agents. In Claude, riders can also upload rides through a form in the chat.

Connecting

  • Endpoint: /api/mcp
  • Claude (web, desktop, mobile) and Claude Cowork: Settings → Connectors → Add custom connector, paste the endpoint, then sign in to Routebook and approve the requested scopes. Step by step, with example prompts: User guide → MCP Server.
  • ChatGPT: add the endpoint as a custom connector under Settings → Apps & Connectors (this needs developer mode; which plans can add one, and whether they can use write tools, depends on your ChatGPT plan).
  • Claude Code, Goose and other clients: create a Personal Access Token in Settings → Integrations and send it as Authorization: Bearer <token>.

Transport

WebStandard Streamable HTTP transport, preferring SSE responses for clients (e.g. Goose) that expect streamed tool results. Single endpoint at /api/mcp.

Auth

  • OAuth flow for human users (browser-driven consent).
  • Personal Access Tokens (PATs) for headless / CLI / agent use.
  • Each token carries scopes — only tools matching held scopes are exposed in tools/list.
  • Subscription-gated: tokens are only issued to entitled accounts.

Tools (scope-gated)

  • search_rides, get_ride, get_ride_segment, find_ride_efforts, get_ride_time_in_zones, get_time_in_zones, list_pois — rides:read
  • update_ride, manage_poi, trigger_strava_sync — rides:write
  • upload_ride — rides:write: shows the ride upload form (an MCP App, below). Its widget-only companion upload_ride_file is never listed to the model.
  • get_fitness_state — insights:read
  • get_weekly_summary — rides:read + insights:read (saved plan with profile:read): one Monday–Sunday week with the same numbers as the weekly dashboard — totals vs the week before (rides and structured workouts counted separately; climbing from rides only), daily load vs the plan target, zone shares, form at week end, next-week focus and rides.
  • get_block_summary — rides:read + insights:read + profile:read: the saved plan's whole block with the same numbers as the Block view — plan week and phase, each week's TSS vs plan and CTL, noted plan weeks, goal-ride / FTP / CTL targets, a rule-by-week compliance grid, and heuristic strengths, limiters and focus (the saved plan's own rules come first).
  • get_plan_report — rides:read + insights:read + profile:read: everything a whole-plan report needs in one call, in your timezone — the block summary, the saved plan and its status, each started week's weekly summary and time in zones, plan-to-date zones, the week before the plan, and 28 days of CTL/ATL/TSB/TSS. Large: meant for artifacts and plan reviews; in chat the block and weekly summaries are cheaper.
  • read_profile, update_profile — profile:read / profile:write
  • generate_workout — workouts:generate
  • generate_ride_narrative — insights:generate
  • ask_coach — chat:send

MCP App: upload a ride

upload_ride is an MCP App: in clients that show apps (Claude on the web and desktop) it renders an upload form in the conversation. How it looks and how to use it.

  • The model calls upload_ride with whatever the rider said (route_title, route_description, rpe, rpe_breathing, rpe_legs, ride_note, all optional) and the form opens pre-filled and editable.
  • The rider picks or drops a .fit file (up to 1 MB). The form sends the whole file as one base64 argument to upload_ride_file, which has visibility: ["app"], so the model never sees the tool or the bytes. The call goes through the client to this endpoint under the connector's own token: no extra credentials, no CORS, and the form declares no external origins.
  • The server parses and scores the file (metrics, power curve, CP model, zone histogram, ride card) and saves the ride. A ride from any source starting within 60 seconds is returned as a duplicate for the form to offer “Save anyway”, not saved twice.
  • The saved ride's id and headline metrics go back into the model's context, with a suggested RPE when none was given. The form can set that RPE through update_ride.
  • Clients without MCP Apps get a text result pointing the rider to the website upload.

Resources and prompts

  • Resources: profile, current fitness, weekly summary (rolling last 7 days), recent rides, per-ride summary and insights.
  • Prompts: analyze_ride, weekly_review, block_review, form_check, plan_week, suggest_workout, diet_for_load, training_plan. weekly_review takes an optional week and reviews it from get_weekly_summary; with no week it reviews this week, or last week when this week has no rides yet. block_review reviews the saved plan so far from get_block_summary and the plan in read_profile.

Telemetry

Requests, denials, token issue and revocation go to an append-only audit log. LLM-backed tools (ask_coach, workouts, narratives) are traced in Langfuse — model, tokens, latency.

Read the full write-up on Orbital →