Connecting an MCP Server to a Fitness App
Accurate_Shift8006 · reddit · 2026-07-16
作者是一名独立开发者,把自己的 iOS 健身记录 App Wolog 接上了一个 remote MCP server,让 Claude 可以直接在应用里创建训练计划、写入动作和历史记录。
他复盘了几个关键设计坑:
- 名称解析:模型会说“incline dumbbell press”,但库里可能叫“Incline Bench Press (Dumbbell)”;后来改成由 server 负责解析并返回匹配报告
- 批处理:从逐个创建 routine 改成一次 createprogram,先整体校验,避免写到一半出错留下半成品
- 更新策略:updateroutine 用 id-keyed merge,并保留 baseUpdatedAt 做并发冲突检测,避免“改一点就删了重建”
- 约束下沉到服务端:原来把免费层上限写在 tool description 里,模型会遵守但不可靠,最后改成服务端强制
作者还强调,getworkouthistory 会返回每次训练的实际组数和 e1RM,所以计划是基于真实训练数据生成,而不是凭空编造。
More from coding & agent
- HeyGen adds a media-sourcing skill for coding agents with 75k images and 10k tracks — HeyGen · 2026-07-22
- Agent search bottlenecks are now about variance, not raw latency — rohanpaul_ai · 2026-07-22
- LangSmith adds tracing for Pipecat, LiveKit, OpenAI Realtime, and Gemini Live — LangChain · 2026-07-22
- An MCP server signs every AI agent tool call into a verifiable Merkle chain — Funky_Chicken_22 · 2026-07-22
- Annotated transcript of a Claude Code team interview is now available — trq212 · 2026-07-22
- Claude Code skill uses 10 Markdown rules to make outputs ADHD-friendly — alex_verem · 2026-07-22