FitnessMCP
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., "@FitnessMCPshow my latest Hevy workout"
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.
FitnessMCP
FitnessMCP is a production-ready remote Model Context Protocol server that lets AI assistants work with fitness data from multiple services through one secure endpoint.
One server. One /mcp URL. Multiple fitness integrations.
What It Connects
FitnessMCP currently includes tool groups for:
Hevy: workouts, routines, exercise templates, routine folders, and workout events
Strava: athlete profile, recent activities, and segment starring
Cronometer: diary entries, daily nutrition, food search, food details, custom foods, macro targets, fasting history, and day completion
Intervals.icu: athlete profile, activities, wellness, events, gear, reminders, and sport settings
It also includes high-level utility tools:
fitness_get_connected_servicesfitness_get_integration_plan
Why Use FitnessMCP
One MCP connection instead of separate servers for each fitness app
Cloudflare Worker deployment for a low-maintenance hosted endpoint
OAuth-ready MCP transport for remote MCP clients
Encrypted credential storage for user-supplied keys
No checked-in secrets: all real credentials are supplied through Worker secrets or local-only files
Typed TypeScript codebase with validation, tests, and CI
Important Security Note
This repository intentionally does not include real API keys, tokens, passwords, KV namespace IDs, or personal credentials.
You will see placeholders such as:
replace_with_hevy_api_key
REPLACE_WITH_YOUR_PRODUCTION_KV_NAMESPACE_IDThat is expected. Replace those only in your own local .dev.vars file or in Cloudflare Worker secrets. Never commit real credentials.
How The Pieces Fit Together
flowchart LR
A["AI assistant"] --> B["FitnessMCP /mcp endpoint"]
B --> C["Hevy client"]
B --> D["Strava client"]
B --> E["Cronometer client"]
B --> F["Intervals.icu client"]
B --> G["Cloudflare KV encrypted storage"]Beginner-Friendly Setup
This section assumes you are comfortable copying and pasting commands, but you do not need to be a professional developer.
Step 1: Install The Required Apps
Install these first:
Node.js from nodejs.org
Git from git-scm.com
A Cloudflare account from cloudflare.com
A GitHub account from github.com
To check that Node.js and Git are installed, open Terminal and run:
node --version
git --versionIf both commands print version numbers, you are ready.
Step 2: Download The Project
Clone the repository:
git clone https://github.com/senojjones/FitnessMCP.git
cd FitnessMCPInstall the project dependencies:
npm installStep 3: Log In To Cloudflare From Terminal
Run:
npx wrangler loginYour browser will open. Sign in to Cloudflare and approve Wrangler.
Step 4: Create Cloudflare KV Storage
FitnessMCP uses Cloudflare KV to store OAuth sessions and encrypted user credentials.
Run:
npx wrangler kv namespace create OAUTH_KVCloudflare will print something like:
{ binding = "OAUTH_KV", id = "abc123..." }Copy the id value.
Open wrangler.jsonc and replace:
REPLACE_WITH_YOUR_PRODUCTION_KV_NAMESPACE_IDwith the KV namespace ID Cloudflare gave you.
For local development, you can use the same ID for:
REPLACE_WITH_YOUR_DEV_KV_NAMESPACE_IDor create a second namespace:
npx wrangler kv namespace create OAUTH_KV --env devStep 5: Create A GitHub OAuth App
FitnessMCP uses GitHub sign-in to identify users.
Click New OAuth App
Use this for local development:
Application name: FitnessMCP Local
Homepage URL: http://localhost:8787
Authorization callback URL: http://localhost:8787/callbackClick Register application
Copy the Client ID
Click Generate a new client secret
Copy the Client Secret
Keep these private.
Step 6: Create Your Local Secret File
Copy the example file:
cp .dev.vars.example .dev.varsOpen .dev.vars in a text editor.
Replace:
GITHUB_CLIENT_ID=replace_with_your_github_oauth_client_id
GITHUB_CLIENT_SECRET=replace_with_your_github_oauth_client_secretwith your GitHub OAuth values.
Generate an encryption key:
openssl rand -hex 32Copy the output and put it into:
COOKIE_ENCRYPTION_KEY=replace_with_64_character_hex_stringStep 7: Add Fitness Service Credentials
You do not need every service. Configure only the apps you use.
Hevy
Get your API key from Hevy developer settings, then set:
HEVY_API_KEY=replace_with_hevy_api_keyStrava
Create a Strava app at strava.com/settings/api, then set:
STRAVA_CLIENT_ID=replace_with_strava_client_id
STRAVA_CLIENT_SECRET=replace_with_strava_client_secret
STRAVA_ACCESS_TOKEN=replace_with_strava_access_token
STRAVA_REFRESH_TOKEN=replace_with_strava_refresh_tokenCronometer
Set:
CRONOMETER_USERNAME=replace_with_cronometer_email
CRONOMETER_PASSWORD=replace_with_cronometer_passwordCronometer access can be sensitive because it may involve account credentials. Use a strong unique password and keep .dev.vars private.
Intervals.icu
Create an API key in Intervals.icu, then set:
INTERVALS_ICU_API_KEY=replace_with_intervals_icu_api_key
INTERVALS_ICU_ATHLETE_ID=replace_with_intervals_icu_athlete_idStep 8: Run FitnessMCP Locally
Start the server:
npm run devOpen:
http://localhost:8787Check health:
http://localhost:8787/healthThe MCP endpoint is:
http://localhost:8787/mcpStep 9: Deploy To Cloudflare
Before deploying, add secrets to Cloudflare. Run these one at a time:
npx wrangler secret put GITHUB_CLIENT_ID
npx wrangler secret put GITHUB_CLIENT_SECRET
npx wrangler secret put COOKIE_ENCRYPTION_KEYThen add whichever fitness services you use:
npx wrangler secret put HEVY_API_KEY
npx wrangler secret put STRAVA_CLIENT_ID
npx wrangler secret put STRAVA_CLIENT_SECRET
npx wrangler secret put STRAVA_ACCESS_TOKEN
npx wrangler secret put STRAVA_REFRESH_TOKEN
npx wrangler secret put CRONOMETER_USERNAME
npx wrangler secret put CRONOMETER_PASSWORD
npx wrangler secret put INTERVALS_ICU_API_KEY
npx wrangler secret put INTERVALS_ICU_ATHLETE_IDDeploy:
npm run deployCloudflare will print your Worker URL. It will look similar to:
https://fitnessmcp.YOUR_SUBDOMAIN.workers.devYour production MCP endpoint is:
https://fitnessmcp.YOUR_SUBDOMAIN.workers.dev/mcpStep 10: Connect An MCP Client
For an MCP client that supports remote MCP through mcp-remote, use:
{
"mcpServers": {
"fitnessmcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://fitnessmcp.YOUR_SUBDOMAIN.workers.dev/mcp"
]
}
}
}Restart your MCP client after saving the config.
Tool Naming
Tools are namespaced by service:
fitness_get_connected_services
strava_get_athlete
strava_get_recent_activities
cronometer_get_daily_nutrition
intervals_get_wellness
get_workouts
get_routinesThe Hevy tools keep their original concise names for compatibility.
Local Development Commands
npm run dev
npm run type-check
npm run test:run
npm run lint
npm run format
npm run checkProject Structure
FitnessMCP/
src/
app.ts # Hono app and route mounting
mcp-agent.ts # MCP server and tool registration
routes/ # MCP and utility routes
middleware/ # bearer auth middleware
lib/
client.ts # Hevy API client
strava-client.ts # Strava API client
cronometer-client.ts # Cronometer API client
intervals-client.ts # Intervals.icu API client
key-storage.ts # encrypted KV credential helpers
service-registry.ts # connected service status
schemas.ts # Zod schemas
transforms.ts # validation and API transforms
test/ # unit and integration tests
wrangler.jsonc # Cloudflare Worker config
.dev.vars.example # local secret templateProduction Checklist
Before sharing your Worker URL:
wrangler.jsonchas your own KV namespace IDs.dev.varsis not committedAll Cloudflare secrets are set with
wrangler secret putnpm run checkpasses/healthreturnsstatus: healthyYour MCP client can call
fitness_get_connected_services
Security
Read SECURITY.md before deploying.
Contributing
Issues and pull requests are welcome. Read CONTRIBUTING.md first.
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/senoj100-alt/FitnessMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server