MCP

Use Grok as a Health and Fitness Advisor — Wired to Your Real Habits

Turn Grok into a coach that reads your actual training and recovery history over MCP, instead of guessing. Setup, prompts, and the limits worth knowing.

WizardHabits Team
7 min read

Ask any AI assistant "should I train legs today?" and you will get a competent, useless answer. It has to hedge, because it has no idea whether you squatted yesterday, whether you have slept badly all week, or whether you have trained at all this month.

The fix is not a better prompt. It is giving the assistant your actual history.

This guide connects Grok to your WizardHabits account over MCP, so it can read what you have genuinely done — every session logged, every streak broken, every rest day taken — and answer from that instead of from the average of the internet.

What changes when the model can see your log

Here is the same question, before and after.

Without access:

You: Should I do a hard session today?

Grok: It depends on your recent training load, sleep, and how you feel. If you've had two or more hard sessions this week, consider active recovery instead…

With your habits connected:

You: Should I do a hard session today?

Grok: (calls list_completions for the last 14 days) You've trained four days in a row — Mon, Tue, Wed, Thu — and your "Sleep by 11" ritual has been missed five of the last seven nights. That's accumulating fatigue on short sleep. I'd take today as a walk or mobility day and go hard tomorrow, when you've had one good night behind you.

The second answer is not smarter. It is just informed. That is the whole trick.

What Grok can actually do with your account

Once connected, these are the operations available. They are the real tool names the server exposes, so you can reference them directly in prompts:

Reading

  • list_habits — everything you track, with its schedule
  • list_completions / list_skips — what you did and consciously skipped, over any date range
  • list_habit_challenges — time-boxed pushes in progress
  • list_wizard_identities — habits that have graduated into identities

Writing

  • create_habit, update_habit, archive_habit, unarchive_habit
  • toggle_habit_completion — log a session from the conversation
  • create_habit_challenge, cancel_habit_challenge
  • get_habit_identity_eligibility, promote_habit_to_identity

The distinction matters for how you use it. Reading makes Grok a better advisor. Writing makes it a logger you can talk to: "I just finished a 6k, mark it done."

Setup

1. Create a scoped key

In WizardHabits:

  1. Open Settings from your account menu.
  2. In MCP API Keys, click Create key.
  3. Name it for the client that will use it — Grok, say — and set an expiry if you want one.
  4. Copy the key. It is shown once.

Give every client its own key. Revoking or rotating one then never breaks the others, and if a key leaks you can kill exactly that one.

2. Point your MCP client at the endpoint

WizardHabits speaks MCP Streamable HTTP:

POST   /api/mcp/     JSON-RPC requests
GET    /api/mcp/     SSE stream (Accept: text/event-stream)
DELETE /api/mcp/     end the session (send Mcp-Session-Id)

Authenticate with a bearer token:

Authorization: Bearer wh_mcp_...

Most MCP clients take a remote server as a URL plus a header, something like:

{
  "mcpServers": {
    "wizardhabits": {
      "url": "https://www.wizardhabits.com/api/mcp/",
      "headers": { "Authorization": "Bearer wh_mcp_your_key_here" }
    }
  }
}

On initialize the server returns an Mcp-Session-Id header. Send it back on subsequent requests in that session. Any conformant client handles this for you.

One honest caveat. MCP client support moves quickly, and where you paste that config depends on which Grok surface you are using and what it supports at the time you read this. The WizardHabits side above is fixed and verified. For the Grok side, follow xAI's current documentation for connecting a remote MCP server — and if your client does not support remote MCP servers yet, the same endpoint works from any script or automation platform that can send an HTTP request with a header.

3. Confirm the connection

Ask for something only your account can answer:

You: List my habits and tell me which one I've been worst at this month.

If it names your real rituals, you are connected. If it describes habits in general, it is not calling the tools.

Prompts that actually earn their keep

The pattern that works: tell it to look first, then judge. Left to itself a model will answer from priors. These prompts force it through your data.

Weekly review

Pull my completions for the last 28 days. Group them by week. Tell me which habit is trending down, which is holding, and give me one change for next week — just one.

Deload / recovery call

Check my training completions for the last 10 days and my sleep ritual for the same period. Based only on that, tell me whether to push or back off today, and say which data point decided it.

Diagnosing a broken streak

My "Move 20 min" streak died twice this month. Look at the dates I missed and the days around them. Is there a pattern — a weekday, a run of bad sleep, a clash with something else I track?

This one is where an informed assistant genuinely beats a human coach who only sees you weekly. The pattern is usually boring and obvious in hindsight: every miss is a Thursday, and Thursday is the day you work late.

Building a programme that fits your real life

I want to add strength training. Before you suggest anything, check what I already track and how consistent I've actually been. Design around my real adherence, not my ideal week.

An assistant that can see you have kept 60% of a four-ritual week will propose two sessions, not five. That is the difference between a plan and a wish.

Logging by voice or chat

I just did 45 minutes of intervals. Mark today's workout complete.

Grok calls toggle_habit_completion and it is logged. No app switching.

Promotion check

Check whether any of my habits are eligible to become identities, and tell me which one is closest.

This uses get_habit_identity_eligibility. It is the most interesting question you can ask, because a habit that qualifies has stopped being effort — see identity-based habits for why that matters more than any streak.

Where to keep the boundary

Two limits worth being deliberate about.

Give it behaviour, not diagnosis. Habit data is behavioural: what you did, when, how consistently. That is exactly the right input for questions about consistency, load and scheduling. It is not clinical data, and an assistant reading it is not a clinician. For anything involving pain, injury, medication, an existing condition or a meaningful change in diet or training intensity, talk to a doctor or a qualified coach. Nothing here is medical advice.

Give it the narrowest key that works. Your habit log is a detailed record of your private routine. One key per client, an expiry where it makes sense, and a rotation when a client is retired. If you stop using a tool, revoke its key rather than leaving it live.

The point

Most people do not need more information about health and fitness. The internet solved that. What they need is advice that accounts for the fact that they trained twice last week, not five times, and that their sleep has quietly fallen apart since August.

Your habit history is that context. MCP is how you hand it over. Everything after that is just asking better questions.

Ready to connect? Create a free account, track a few rituals for a fortnight, then plug in your assistant. Two weeks of honest data makes for a far better advisor than a perfect plan and an empty log.

Written by
WizardHabits Team

Writes about rituals, identity, and the systems that make habits stick for years instead of weeks.

Keep reading

✦ Field notes · From the tower

One spell. One ritual. One short read.

The best way to use any of this is to start. Pick one ritual, keep it tomorrow, and let your wizard grow from there.