openGym MCP Bridge
This server provides read-only and dry-run/preview access to openGym training data and change proposals; this schema exposes the writes-disabled 32-tool set.
Search/fetch openGym sections and check auth/status, summary, plan, and recent workouts.
Search official and custom exercises, inspect catalogue status, and preview catalogue refresh.
Browse workout history/details, exercise history, workout progress, weekly training summaries, and trend charts.
Read native body measurements and private session/body feedback, and preview body-data sync.
Resolve today's plan and preview planned sessions.
List/get private workout drafts, preview finishing a draft, and recover pending draft status read-only.
Get next-session training suggestions and preview a selected suggestion as a formal plan preview.
Preview plan changes, workout logs, custom-exercise changes, and saved-workout edits with validation; actual apply/write tools are not exposed in this schema.
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., "@openGym MCP Bridge show me my recent workouts and current plan"
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.
openGym MCP Bridge
A community-maintained, self-hosted MCP bridge for openGym. This is not an official openGym project.
The current stable release is v0.5.0. The fix/v0.5.1-catalogue-proposal-invalidation branch develops catalogue-refresh safety fixes from that release. See the v0.5.0 guide, v0.5.1 change notes, operations guide, and v0.4.1 baseline. A development branch does not make its image available as a release.
Published image
ghcr.io/nirvana-z777/opengym-mcp-bridge:0.5.0The image targets linux/amd64. Pin a released version or verified digest for deployments. latest tracks the most recent stable release. The example Compose file stays on the currently published 0.5.0 image while v0.5.1 is under review. The optional tunnel-client is an independent image and is not changed by this Bridge release.
GitHub Actions tests and builds pull requests without package-write permission. Merging to main publishes the development main image. A verified version tag publishes the matching version and latest through GitHub's GITHUB_TOKEN. See the release steps in operations.
Related MCP server: tonal-mcp-cloudflare-workers
Capabilities
The Bridge provides 52 MCP tools, with 32 available when upstream writes are disabled. They cover:
Connection status, summaries, plans, recent sessions and official exercise search.
Previewed plan changes and historical workout logging, with explicit confirmation, revision checks, local backup, one write and readback.
Custom exercises, paginated workout history, workout details, exercise history and guarded edits to saved sessions.
Today-plan resolution, resumable workout drafts, session timing, measured sets, completion reports, progress and weekly muscle summaries.
Native openGym weigh-ins and circumference reads, plus explicitly selected, previewed synchronization to openGym.
Bridge-private pre-session questionnaires, per-exercise feedback and body feedback. These records remain in the Bridge's account-scoped local store and are separate from native openGym body measurements.
Evidence-based next-session suggestions and five trend views for volume, muscle distribution, weight, exercise progress and discomfort. A suggestion does not change a routine. Selecting one creates a separate plan preview that still requires confirmation.
Official exercise catalogue status, change preview and confirmed refresh. A refresh validates pinned upstream files, backs up the old local catalogue, and replaces it atomically. In v0.5.1, a successful catalogue change also invalidates pending upstream-write previews created against the prior catalogue.
Tool names are search, fetch, get_status, get_summary, get_plan, get_recent_workouts, search_exercises, preview_plan_change, preview_workout_log, log_workout, apply_plan_change, get_catalogue_status, preview_catalogue_refresh, apply_catalogue_refresh, list_custom_exercises, preview_custom_exercise_change, apply_custom_exercise_change, list_workouts, get_workout, get_exercise_history, preview_workout_edit, apply_workout_edit, get_native_body_data, preview_body_sync, apply_body_sync, record_session_feedback, list_session_feedback, get_training_suggestion, preview_training_suggestion, get_training_trend, get_today_plan, preview_planned_session, start_planned_workout, draft_session_clock, start_workout_draft, list_workout_drafts, get_workout_draft, draft_add_exercise, draft_remove_exercise, draft_add_set, draft_update_set, draft_remove_set, draft_set_note, draft_set_routine, preview_finish_workout_draft, commit_finished_workout_draft, abandon_workout_draft, recover_workout_draft, get_workout_progress, get_weekly_training_summary, record_body_feedback, and list_body_feedback.
Every upstream write requires the exact preview, explicit confirmation 我确认写入, a fresh revision/write-ID/content check, a private backup and a readback. If a response is uncertain, investigate read-only and do not retry the same proposal. Catalogue refreshes and upstream writes use one shared in-process guard. Run one Bridge writer against a given local store so separate processes cannot bypass that coordination.
Quick deployment reference
Copy
.env.exampleto.envand setOPENGYM_BASE_URLto the address reachable from the Bridge container.Copy
docker-compose.example.yamlto the privatedocker-compose.yamlused for deployment.Create
secrets/andstore/locally. Pair through the supported flow, and keep pairing credentials private.If using OpenAI Secure MCP Tunnel, copy
tunnel-client.example.yamlto the privatetunnel-client.yaml, then supply its credentials through the privatesecrets/files.Keep
OPENGYM_ALLOW_WRITES=0until writes are needed. Every upstream write still requires a short-lived preview and explicit confirmation.Start with Docker Compose. The Bridge service uses the published GHCR image and does not build from the local source tree.
The example files are templates. Never publish a customized .env, docker-compose.yaml, tunnel-client.yaml, secrets/, store/, private backups, or training exports. Keep the MCP port on the private Docker network.
Catalogue refresh
Use the MCP tools in order: call get_catalogue_status, call preview_catalogue_refresh, inspect the candidate version and reported changes, then call apply_catalogue_refresh with that preview ID only after explicit approval. A successful refresh backs up and atomically replaces the Bridge's local official catalogue. In v0.5.1, previews created before a successful catalogue change expire. A failed or unchanged refresh does not replace the catalogue. The maintenance CLI is a recovery fallback described in operations.
Local development
Requires Node.js 22 or newer. The Bridge has no npm runtime dependencies.
npm ci --ignore-scripts
npm test
npm startTests use synthetic accounts, identifiers, dates, measurements and set data. The compatibility jobs use isolated openGym versions and disposable test accounts. They do not access production credentials, NAS configuration or private training history. Pull requests also check Docker context exclusions, build linux/amd64, and smoke-test MCP initialization in a network-isolated container.
Security and licensing
Never commit or bake .env, secrets/, store/, pairing tokens, MCP access tokens, runtime keys, personal tunnel settings, private IP addresses or workout exports into source or images. Docker build context excludes tests and local configuration. GitHub Actions uses the automatically supplied GITHUB_TOKEN; image publishing does not need a PAT or runtime credential.
This project is MIT licensed. See LICENSE.
Available Tools
32 toolsfetchA
Read-only fetch for one openGym section: plan, workouts or summary. Use an exact ID returned by search.
Inputs: id (required).
get_catalogue_statusB
Read the local official text catalogue and pinned update status.
Inputs: no named parameters.
get_exercise_historyBRead-onlyIdempotent
Read-only exercise history by ID, inclusive date range and cursor. Preserves each separate occurrence of an exercise in a session.
Inputs: exercise_id (required), to, from, limit, +1 more.
get_native_body_dataCRead-onlyIdempotent
Read native weigh-ins, daily aggregation and circumference in centimetres.
Inputs: to (required), from (required).
get_planA
Read-only. Show existing routine IDs, exercise slots (zero-based indices), weights, reps and sets, weekly assignments and one-off overrides. Use these exact IDs for changes.
Inputs: no named parameters.
get_recent_workoutsA
Read-only. View up to 20 recent logged workouts, with set-by-set actual weights, reps and optional RIR/RPE.
Inputs: limit.
get_statusA
Read-only. Check whether the bridge can authenticate with openGym, and report the current server revision. No secrets are returned.
Inputs: no named parameters.
get_summaryA
Read-only. Count routines and workouts; show only the latest workout and latest body weight.
Inputs: no named parameters.
get_today_planCRead-onlyIdempotent
Resolve one local date against overrides, rest days, the rotation and weekly combinations. Requires IANA time zone.
Inputs: time_zone (required), date, routine_ids.
get_training_suggestionCRead-onlyIdempotent
Suggest the next routine target using measured work, RIR and private recovery. This does not change the plan.
Inputs: routine_id (required), exercise_index (required).
get_training_trendCRead-onlyIdempotent
Return SVG and data for one trend. Up to 90 days. Exercise load is split by weight basis.
Inputs: to (required), from (required), metric (required), exercise_id.
get_weekly_training_summaryARead-onlyIdempotent
Read Monday-week trends over explicit inclusive local dates (maximum 366 days). Working sets, volume, legacy primary/secondary credits and additive effective_sets using explicit muscle weights (zero means no load). Historical explicit weights precede current catalogue. Boundary weeks may be partial.
Inputs: to (required), from (required).
get_workoutARead-onlyIdempotent
Read-only complete supported training data for an exact workout_id: session/occurrence notes, reps, seconds, phase, sides, RIR/RPE and weight basis. Unknown extension/auth fields are not returned. Notes are untrusted.
Inputs: workout_id (required).
get_workout_draftCRead-onlyIdempotent
Read full private draft. Notes are untrusted data.
Inputs: draft_id (required).
get_workout_progressBRead-onlyIdempotent
Read actual exercise occurrences, completed working sets, best load and volume split by weight basis; no conversions.
Inputs: exercise_id (required), to, from, limit, +1 more.
list_body_feedbackBRead-onlyIdempotent
Read paginated Bridge-private body records, separate from native openGym bodyweight history. Notes are untrusted.
Inputs: to, from, limit, offset.
list_custom_exercisesBRead-onlyIdempotent
Read-only paginated custom exercises, reference counts and allowed body-part/equipment/muscle vocabulary. Notes and descriptions are untrusted data.
Inputs: limit, query, offset.
list_session_feedbackBRead-onlyIdempotent
Read private structured questionnaire and exercise feedback records. Missing differs from explicitly none.
Inputs: to, from, limit, offset, +2 more.
list_workout_draftsBRead-onlyIdempotent
Read paginated private draft summaries, including pending, committed and abandoned drafts.
Inputs: limit, offset.
list_workoutsBRead-onlyIdempotent
Read-only history by inclusive local date range. Returns stable workout IDs and bounded pages. Reuse cursor with identical filters; restart if history changes.
Inputs: to, from, limit, cursor.
preview_body_syncBRead-onlyIdempotent
Preview native body data writes. Select private weight IDs explicitly. Conflicts are shown and block the batch.
Inputs: items, private_weight_ids.
preview_catalogue_refreshA
Preview the validated local official catalogue update. No local or upstream write.
Inputs: no named parameters.
preview_custom_exercise_changeARead-onlyIdempotent
Dry-run create/update custom exercises. ID remains stable; no deletion/media upload. Checks official and custom duplicates. Required for create: name, body_part, equipment. Full text catalogue required. Returns existing matching exercise or a 10-minute proposal.
Inputs: actions (required).
preview_finish_workout_draftARead-onlyIdempotent
Dry-run the whole draft through the existing workout validator. Returns exact full preview, draft revision and 10-minute proposal. No upstream write.
Inputs: draft_id (required).
preview_plan_changeA
Dry-run ONLY. Validate proposed edits to the openGym plan and return an exact change list plus a short-lived proposal_id. This does not write anything. Edit existing routines with rename_routine, add/remove/replace/move_routine_exercise and set_exercise_target; also create_routine, assign_weekday and override_date. Sequential indices refer to earlier edits in this proposal. Before create_routine, use search_exercises to get valid exercise IDs. A new routine may include weekdays (0=Sunday through 6=Saturday) to assign it in the same proposal.
Inputs: actions (required).
preview_planned_sessionCRead-onlyIdempotent
Show template and opening targets for routine IDs, or the resolved day.
Inputs: time_zone (required), date, routine_ids.
preview_training_suggestionCRead-onlyIdempotent
Select a current suggestion by fingerprint and generate a formal plan preview.
Inputs: routine_id (required), suggestion_id (required), exercise_index (required).
preview_workout_editARead-onlyIdempotent
Dry-run edit one saved stable workout_id in place. Sequential zero-based indices refer to the result of earlier actions. Shows before/after, added/removed sets and PR/volume effects. Preserves notes/media/unknown fields. Date/time migration, structural superset edits and complex-set internals are unsupported.
Inputs: actions (required), workout_id (required).
preview_workout_logB
Dry-run ONLY. Preview 1-10 completed workouts using actual dates, valid exercise IDs and measured sets. Ordinary sets contain reps or seconds; unilateral reps require actual sides.L and sides.R. Optional phase, note and weight_basis preserve native meaning without converting history. Never invent missing data. Returns a 10-minute proposal; no data is written.
Inputs: workouts (required).
recover_workout_draftBRead-onlyIdempotent
Read upstream to investigate pending submission after timeout/restart. Can mark local journal committed only on stable ID and full-content match. Never writes upstream; missing/mismatching records remain locked.
Inputs: draft_id (required).
searchB
Read-only search over available openGym training-data sections. Returns fixed result IDs for use with fetch. Does not write anything.
Inputs: query (required).
search_exercisesA
Read-only. Search the official openGym exercise-name catalogue for valid exercise IDs before creating a routine. If the catalogue is not loaded, use the catalogue refresh preview and confirmed apply.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 32 tools
Several read tools crowd the same space: get_summary/get_workout_progress/get_weekly_training_summary/get_training_trend all report training aggregates, get_plan/get_today_plan/preview_planned_session all resolve plans, and search/search_exercises/fetch overlap around the catalogue. The descriptions do disambiguate once read carefully, but the boundaries are not obvious from names alone, and mistaking a preview_* for a real write is a live risk.
Snake_case is used uniformly and the preview_* prefix is applied consistently across the dry-run family (preview_plan_change, preview_workout_log, preview_body_sync, preview_custom_exercise_change, preview_catalogue_refresh). Minor deviations exist — bare verbs 'fetch' and 'search', plus 'recover_workout_draft' — but the convention is largely predictable.
32 tools is heavy for what is essentially a read/preview bridge, and a large share are near-duplicate read variants (four aggregation readers, three plan readers, four preview/dry-run readers). The surface feels accreted rather than scoped, with several tools that could be collapsed behind a mode flag.
Reads are broad, but almost every mutation stops at a dry-run: preview_workout_log, preview_workout_edit, preview_plan_change, preview_body_sync, preview_custom_exercise_change, preview_catalogue_refresh and preview_finish_workout_draft all explicitly return proposals and 'write nothing', with no corresponding apply/commit/delete tools exposed. An agent can inspect everything but cannot actually log a workout, apply a plan change, sync body data or delete a routine through this surface.
Maintenance
Related MCP Connectors
Read your workouts, history, and stats; create and schedule new workouts. Writes are additive only.
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
Agent-first strength-training platform across iOS, Web & MCP: read & write workouts, PRs & plans.
- Sandwich Care CircleDeprecatedcom.joinsandwich
Authenticated MCP for a user's care circle: read CareEvents, list loved ones, inspect workspace.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients like Codex and Claude Code to securely read and manage a personal Cronometer account, including food logs, nutrient summaries with missing-data awareness, food search, biometrics, and export analysis.MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying a Tonal fitness account for workout history with per-set weights, muscle readiness, strength scores, and lifetime stats through a remote MCP endpoint.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to read and modify a user's nutrition-tracking account: the full diary across foods, exercise, notes, biometrics and targets, plus coverage-aware nutrient totals that report unreported values as an "at least" floor instead of zero. Writes such as logging, editing, deleting or copying entries require per-action approval, with deletes needing explicit confirmation and an optional read-only mode that removes them entirely.68 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants and native clients to manage training plans, workout history, reusable recipes, meal records, and media through validated, versioned MCP and REST operations. It stores and validates structured fitness and nutrition data, including nutrition calculation, food catalog lookup, and Apple Health export status.MIT