
Trainzilla Coach MCP
io.github.Trainzilla由 GitHub 账号 Trainzilla 发布v1.0.0更新于 Nov 2, 2026
Manage clients, plans, sessions, habits, and billing on Trainzilla via one-click OAuth.
概览
Trainzilla Coach MCP 让助手以 Trainzilla 教练身份工作:读取客户数据、运行教练计算器,并在确认后修改数据。
- 可以做什么
- 读取实时教练数据:身份、客户列表与档案、习惯与完成度、训练与饮食计划、打卡、课程、订阅和账单摘要
- 离线计算基础代谢、每日消耗与推荐热量、按策略分配宏量营养素,以及 1RM 与百分比重量建议
- 创建习惯、主习惯、打卡、课程、训练计划和饮食计划,未确认时仅返回预览
- 管理业务:计划与定价、会员暂停或取消、前台收款、付款、发票、分享链接、推荐计划和健身房席位计费
- 处理 AI 教练审核队列、打卡收件箱、社区帖子、健身房前台、工作流、目录,以及客户分组与批量分配
- 上传文件到存储、管理 API 密钥、连接 Stripe/Razorpay、发起 Google 日历连接
- 适用场景
- 适合使用 Trainzilla 的教练,希望让助手在聊天客户端中查询客户进展、计算训练与营养数值,并起草或执行教练相关变更,而不必打开网页应用。
- 运行要求
- 需要 Trainzilla 教练账号。README 描述的是本地 Node.js 构建,通过 stdio 运行并设置 TZ_ACCESS_TOKEN 与 TZ_REFRESH_TOKEN;或使用仅限本机的 HTTP 模式,每个请求以 Bearer 或 x-api-key 头传入教练 API 密钥。清单则列出 api.tzilla.live 远程端点并要求 OAuth。需要访问 Trainzilla GraphQL API 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Trainzilla Coach MCP,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.Trainzilla%2Ftrainzilla-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"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
来源:README.md,提交 4f1d2a1
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 75%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。