fitness-mcp
Provides read-only access to Hevy workout data, including recent workouts, detailed workout logs, and body measurements.
Click on "Install 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., "@fitness-mcpWhat's my weight trend this month?"
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.
fitness-mcp
A personal remote MCP (Model Context Protocol) server that lets Claude read your Hevy workout data and MacroFactor nutrition data directly in conversation. Deployed on Vercel's free Hobby tier.
Status
Hevy: implemented (read-only: recent workouts, workout detail, body measurements). Uses the official Hevy REST API directly.
MacroFactor: implemented, but indirectly. MacroFactor's backend enabled Firebase App Check enforcement in May 2026, which blocks all third-party API access — there is no legitimate way to pull MacroFactor data live. Instead, this server reads the Google Sheets files produced by MacroFactor's manual "Granular Export" feature, which the user saves into a "Health data" Drive folder. Every MacroFactor tool call lazily syncs any newly exported files first, so a fresh manual export becomes visible to Claude on the very next question — no separate trigger/webhook needed.
Related MCP server: hevy-mcp
Tools exposed
Tool | Description |
| List recent Hevy workouts (title, time, exercises) |
| Full sets/reps/weight detail for one workout |
| Recent Hevy body measurement entries (weight, body fat %) |
| Daily calories/protein/carbs/fat/steps from MacroFactor exports |
| Daily weight, MacroFactor's smoothed weight trend, and body fat % |
| Precomputed monthly/yearly averages and weight change (cheap — reads a precomputed rollup, not raw daily data) |
All tools are read-only.
How the MacroFactor sync works
MacroFactor has no usable API, so data instead flows: MacroFactor app → manual "Granular Export" → Google Drive folder "Health data" → this server reads it on demand.
Each export creates a new
MacroFactor-<timestamp>Google Sheet in that folder (never overwritten). Export date ranges can overlap or have gaps — the sync does not assume the latest file has full history.On every MacroFactor tool call, the server checks the Drive folder for export files it hasn't processed yet, merges any new ones into a small JSON store (
Health data/_store/daily-summary.json), and recomputes precomputed monthly/yearly rollups for just the affected periods.If nothing new was exported since the last call, this is a fast no-write no-op — repeated questions ("how's my year going?") don't re-scan or re-download anything.
When two exports cover the same date, the more recently exported one wins (compared by the timestamp encoded in the file name), regardless of Drive's file ordering.
Setting up Google Drive access (one-time)
Create or select a Google Cloud project.
Enable the Google Drive API and Google Sheets API for it.
Create a Service Account (IAM & Admin → Service Accounts). No IAM roles needed.
Create and download a JSON key for the service account.
Base64-encode it:
base64 -w0 key.jsonSet the result as the
GOOGLE_SERVICE_ACCOUNT_KEY_BASE64env var (see below).In Google Drive, share the "Health data" folder with the service account's email (the
client_emailfield in the JSON key) as Editor — the app creates and writes to a_storesubfolder inside it.No domain-wide delegation needed — this is a personal Gmail account, a plain folder share is enough.
Local development
npm install
cp .env.example .env.local # fill in real values
vercel devSmoke test (replace $MCP_BEARER_TOKEN):
curl -X POST http://localhost:3000/api/mcp \
-H "Authorization: Bearer $MCP_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Should return the 6 tools above. A request with a missing/wrong token should get 401.
Testing
Three layers, all run in CI (.github/workflows/ci.yml) on every push/PR — none require real Hevy/Google secrets, so they work the same in a public repo:
npm run test # unit + integration (vitest) — pure logic, plus lib/googleDrive.ts
# mocked with an in-memory fake Drive, plus the real Next.js
# route handler exercised with fetch/Drive mocked
npm run build
npm run test:e2e # starts a real `next start` server and hits it over real HTTP
# (node's built-in test runner, no extra dependency)Unit (
lib/*.test.ts): date parsing, MacroFactor tab parsing, monthly/yearly rollup math, bearer-token verification.Integration (
test/integration/*.test.ts): the MacroFactor sync algorithm (multi-export merge, overlap resolution, incremental rollups) againsttest/fixtures/fakeGoogleDrive.ts; and the actualapp/api/mcp/route.tshandler wired to reallib/auth.ts/lib/hevy.ts/lib/macrofactorStore.ts, with onlyfetchand Drive mocked.E2E (
test/e2e/*.e2e.test.mjs): boots the production build and asserts over real HTTP — health check, 401 on bad/missing auth,tools/listreturns all 6 tools. Doesn't exercise real Hevy/MacroFactor data (CI has no real credentials by design).
Environment variables
Variable | Purpose |
| Hevy Pro API key from https://hevy.com/settings?developer |
| Shared secret this server requires on every request. Generate with |
| Base64-encoded service-account JSON key with Drive/Sheets access to the "Health data" folder — see setup steps above |
Set these in the Vercel project's Environment Variables (Production + Preview). Never commit real values — .env.example only documents the names.
Deploy
vercel linkvercel env add HEVY_API_KEY/vercel env add MCP_BEARER_TOKEN/vercel env add GOOGLE_SERVICE_ACCOUNT_KEY_BASE64(repeat for each environment you use)Connect this GitHub repo in the Vercel dashboard for auto-deploy on push to
main, or runvercel --prodmanually.Note the deployed URL, e.g.
https://fitness-mcp.vercel.app/api/mcp.
Connect to Claude
Custom connectors can only be added from claude.ai (web) or the desktop app — not from the mobile app. Once added there, they're usable from mobile automatically.
On claude.ai: Settings → Connectors → Add custom connector.
Name:
Fitness Data. URL:https://fitness-mcp.vercel.app/api/mcp.Under "Request headers", add
Authorization: Bearer <MCP_BEARER_TOKEN>(the same value set in Vercel).Save. Claude should list the 6 tools above.
Try asking: "直近のワークアウトを教えて" (tell me about my recent workouts) or "今月の平均カロリーは?" (what's my average calorie intake this month?).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenancePython MCP server for the Hevy fitness app. Gives Claude full access to your Hevy data. Log workouts, manage routines, track body measurements, browse exercises, and more. Covers all 25 endpoints of the official Hevy API.Last updatedMIT
- AlicenseAqualityCmaintenanceA Model Context Protocol server that connects Claude to Hevy workout logs, enabling workout reading, routine creation, and training analysis.Last updated78222MIT
- Flicense-qualityDmaintenanceProvides MCP servers for Claude to access fitness data from Strava and intervals.icu, enabling natural language queries for activity analysis, advanced training metrics, and wellness tracking.Last updated1
- AlicenseAqualityBmaintenanceA read-only MCP server that gives Claude Desktop access to your Garmin Connect data — daily health metrics, sleep, activities, training status, and body composition.Last updated6MIT
Related MCP Connectors
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Create Hevy routines and analyze your training from chat. Unofficial; BYO Hevy PRO API key.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ikeike443/fitness-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server