
Trainzilla Coach MCP
io.github.TrainzillaPublished by GitHub account Trainzillav1.0.0Updated Nov 2, 2026
Manage clients, plans, sessions, habits, and billing on Trainzilla via one-click OAuth.
Overview
Trainzilla Coach MCP lets an assistant act as a Trainzilla fitness coach: read client data, run coaching calculators, and make confirm-gated changes.
- What you can do
- Read live coach data: whoami, clients, profiles, habits and compliance, workout and diet plans, check-ins, sessions, subscriptions, billing summaries
- Run offline calculators for BMR/TDEE and calories, macro splits, and 1-rep-max with percentage suggestions
- Create habits, master habits, check-ins, sessions, workout plans and diet plans, each returning a preview unless confirmed
- Manage business side: plans and pricing, memberships, payments, invoices, share links, referrals and gym seat billing
- Handle AI coaching review queues, check-in inbox, community posts, gym kiosks, workflows, catalogs and client groups with group fan-out assignments
- Upload files to storage, manage API keys, connect…
- When to use it
- Useful for Trainzilla coaches who want an assistant to look up client progress, compute training and nutrition numbers, and draft or apply coaching changes from a chat client instead of the web app.
- Requirements
- A Trainzilla coach account. The README describes a local Node.js build run over stdio with TZ_ACCESS_TOKEN and TZ_REFRESH_TOKEN, or a localhost HTTP mode where each request passes the coach's API key as a Bearer token or x-api-key header. The manifest instead lists a remote endpoint at api.tzilla.live with OAuth required. Network access to the Trainzilla GraphQL API.
Installation
In SourceWeft
- Open Trainzilla Coach MCP in the dashboard and add it to a workspace.
- Connect the required credentials. They are stored privately and never shown on public pages.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.Trainzilla%2Ftrainzilla-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.
{
"mcpServers": {
"trainzilla-coach": {
"type": "http",
"url": "https://api.tzilla.live/mcp"
}
}
}README
tzilla-mcp (MVP, local only)
A local MCP server that lets an MCP client
(Claude Desktop, Claude Code, Cursor, …) act as a Trainzilla coach. It wraps
the existing GraphQL API at api.tzilla.live — no direct DB access — so all
auth and business rules stay enforced by the backend.
Status: Local MVP — read tools, offline calculators, and confirm-gated write tools, plus a resource + a prompt. Not deployed anywhere. Runs entirely on your machine against your own coach login.
What it can do today (360 tools, 1 resource, 1 prompt)
Read (live data):
whoami,list_clients,get_client_profilelist_client_habits,get_habit_compliance,recent_habit_activity,master_habitslist_workout_plans,list_diet_planslist_checkins,list_sessions,list_subscriptions,billing_summary
Calculators (offline, no network):
calc_tdee— BMR / TDEE / recommended caloriescalc_macros— macro split by strategy (Standard 40/30/30, Pro g/kg, Keto)calc_1rm— 1-rep-max (Epley) + %1RM weight suggestions
Write (confirm-gated): every write tool returns a preview unless called
with confirm: true, so nothing changes by accident:
create_habit,create_master_habit,assign_master_habitcreate_checkin(with questions),schedule_sessioncreate_workout_plan,create_diet_plan
Coverage added Oct 2026 (src/tools/*, each tool backed by one GraphQL operation and checked
against the backend schema with scripts/validate-docs.mjs):
- Client tracking — diet/workout logs, daily metrics, personal bests, exercise history, progress, health reports, intake forms, no-app (managed) clients + private portal links, contact details; coach-side logging.
- AI coaching — review queue (approve/reject/requeue), trigger/offer, engagement, per-client preferences, AI-plans and self-cancel switches.
- Check-ins & inbox — respond, logs, recurring schedules, clear overdue; notifications; chat room list.
- Business — plans (create/prices/listing/active/session rules/delete), pause/cancel membership, desk payments, direct-pay claim confirm/reject, payments, invoices + settings, share links, Coach Pro pricing/checkout link, referral program, gym seat billing.
- Community, gym, workflows, catalog, profile — community posts/comments, gym kiosks/face/check-ins/standing bookings/imports/staff/domain, workflow edit/delete + gym-wide workflows, PDF plan import, food/recipe/exercise catalog, branding/custom domain/global payout/localization, Google Calendar status, video calls.
- Client groups (Coach Pro / gym), Nov 2026 —
list_client_groups,get_client_group,list_groups_for_client, create/update/delete group,add_group_members/remove_group_members,get_group_overview,list_group_assignments, and the fan-outsassign_workout_to_groups,assign_diet_to_groups,assign_habit_to_groups,message_groups,schedule_checkin_for_groups,book_session_for_groups,undo_group_assignment. The fan-outs preview server-side withoutconfirm(who would get it, who is skipped and why) and are idempotent for 10 minutes.scripts/mcp-groups-e2e.mjsdrives them against a local backend (TZ_API_URL=http://127.0.0.1:4100/graphql).
Validate documents against the backend schema after changing a tool:
Also included: upload_file (local path on stdio, or base64) → S3 key for the tools that take one (health reports,
PDF plan import, member photo, receipts, community media, branding images); API-key create/list/revoke
(secret shown once); Stripe/Razorpay connect (secrets masked in previews); start_google_calendar_connect
(returns the sign-in URL for the coach to open).
Chat: get_client_chat_messages reads a client's DM history (needs the clientChatMessages backend query, tzilla-be#493).
Not available: taking or refunding a payment — the backend has no coach-facing refund operation, and client checkout is completed by the client's own payment.
Resource: tzilla://client/{clientId}/profile — a client's profile as JSON.
Prompt: weekly_client_review — pulls profile/habits/compliance/sessions and
writes a read-only weekly review.
Setup
Create .env (see .env.example) with a coach's tokens. Easiest source — log in
to the coach web app, then in the browser console:
The server auto-refreshes the access token via refreshAccessToken when it expires.
Run
Local (stdio) — for Claude Desktop etc.:
- Dev:
npm run dev - Built:
npm start - Smoke:
node scripts/smoke.mjs
Remote (Streamable HTTP) — localhost only, multi-coach:
- Dev:
npm run http· Built:npm run start:http - Listens on
http://127.0.0.1:8787/mcp(setMCP_HTTP_PORT/MCP_HTTP_HOST). - Smoke:
node scripts/smoke-http.mjs
Auth modes
- stdio: uses
TZ_ACCESS_TOKEN(+TZ_REFRESH_TOKEN) from env; auto-refreshes. - Endpoint selection:
TZ_API_URLwins when set.- Otherwise
TZ_ENVIRONMENT=staginguseshttps://qa-be2.tzilla.live/graphql. - All other cases default to
https://api.tzilla.live/graphql.
- HTTP: pass-through — each request must send the coach's API key
(
Authorization: Bearer tz_...orx-api-key). The server never stores tokens; it forwards the caller's key to the GraphQL API, so the backend enforces scope (multi-coach safe). API keys are minted by the backend feature below.
Backend: trainer API keys (built in tzilla-be, local — not deployed yet)
createApiKey(name)→ returns the plaintexttz_…key once + infoapiKeys(list, no secret) ·revokeApiKey(id)- Auth middleware accepts
tz_keys (headerx-api-keyorBearer), resolves the owning coach, and stampslastUsedAt. Only a SHA-256 hash is stored.
Use from Claude Desktop
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
Restart Claude Desktop, then try: "Use tzilla-coach: who am I, and list my clients."
Roadmap
- Write tools (habits, check-ins, sessions, plans) — confirm-gated
- Resource (client profile) + prompt (weekly review)
- Wider read coverage (plans, check-ins, sessions, billing)
- Backend trainer API keys / PAT (built in
tzilla-be, local — needs PR + deploy) - Remote Streamable-HTTP transport (localhost, API-key pass-through auth)
- Deploy the backend API-key feature; host the HTTP server (TLS) for real remote use
- Full MCP OAuth 2.1 (replace pass-through) for a public connector
- More resources (plans / check-in history) + prompts (e.g. "draft a plan")
Layout
Source: README.md at commit 4f1d2a1
Tools
0Version history
1- v1.0.0LatestSep 16, 2026
Score
75% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.