tonal-mcp-cloudflare-workers
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., "@tonal-mcp-cloudflare-workersShow my last workout with per-set weights."
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.
tonal-mcp-cloudflare-workers
A remote Model Context Protocol server for one Tonal account, hosted on Cloudflare Workers. It reads workout history (including per-set weights), muscle readiness, strength scores, and lifetime stats through Tonal’s unofficial Auth0 + REST APIs.
One Worker serves a bearer-protected, stateless /mcp endpoint. A Durable Object owns Auth0 tokens (password grant + refresh), the user id, and a cached movement catalog.
Setup
npm install
npx wrangler login
cp wrangler.jsonc wrangler.local.jsoncIn wrangler.local.jsonc, replace tonal.example.com with a hostname on a Cloudflare zone you manage. Deploy using that local config:
WRANGLER_CONFIG=wrangler.local.jsonc npm run deploy
npx wrangler secret put TONAL_USERNAME --config wrangler.local.jsonc
npx wrangler secret put TONAL_PASSWORD --config wrangler.local.jsonc
openssl rand -hex 32 | tee /dev/stderr | npx wrangler secret put MCP_BEARER --config wrangler.local.jsoncThe custom-domain route creates its DNS record on first deploy.
Related MCP server: garmin-mcp
Tools
Tool | Description |
| Recent completed workouts (name, volume, reps, duration, target area) |
| Paginated workout activities (API oldest-first; page re-sorted newest-first) |
| One workout with every set: movement name, reps, avg weight (lbs), 1RM, volume |
| Tonal formatted summary (coach, target area, per-movement volume) |
| Lifetime statistics + current streak |
| Current muscle-group readiness percentages |
| Current strength scores by body region |
| Search the movement catalog by name / muscle / region |
Read-only. Volumes are pounds.
Raw HTTP
The endpoint uses stateless Streamable HTTP and returns SSE-framed MCP responses.
curl -s https://tonal.example.com/mcp -X POST \
-H 'Authorization: Bearer <MCP_BEARER>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'GET / identifies the MCP endpoint. GET /health is public and reports whether the Durable Object has tokens without making a network request.
Local development
cp .dev.vars.example .dev.vars
npm run check
npx wrangler devNotes
Authentication uses Tonal’s public Auth0 client and password grant. The API expects the Auth0 id_token as
Authorization: Bearer. This is unofficial and may break if Tonal changes that flow.No browser authorization is needed.
Credentials are Worker secrets and are sent only to Tonal’s Auth0 token endpoint and
api.tonal.com./mcprequiresMCP_BEARER;/and/healthare public.The Node
@dlwiest/ts-tonal-clientpackage is intentionally not used (it depends onfs/os/path/Buffer); the Worker ports the Auth0 + REST calls directly.
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
Read your workouts, history, and stats; create and schedule new workouts. Writes are additive only.
Private health and fitness analytics through a secure remote MCP connection.
- MyoAmigoOAuthcom.myoamigo
Agent-first strength-training platform across iOS, Web & MCP: read & write workouts, PRs & plans.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceConnects MCP clients to Garmin Connect data, enabling queries about activities, sleep, heart rate, body battery, and training status.MIT
- FlicenseAqualityCmaintenanceProvides read-only access to your Garmin Connect health data, including sleep, HRV, body battery, stress, training readiness, and activities, through an MCP server.14-
- AlicenseBqualityCmaintenanceEnables access to Hevy strength-training data—workouts, routines, exercise history, and progression—via an MCP server with per-user credential encryption and optional write support.16Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables reading Fitbod training history, generating workouts via Fitbod's engine, configuring workout programs, and tracking body composition over time.2MIT