Access your Runalyze health metrics through AI assistants using the Model Context Protocol (MCP)
A secure MCP server that lets you retrieve health data (HRV, Sleep, Resting Heart Rate, Activities) from your Runalyze account directly within AI chat applications like Claude Desktop and ChatGPT Desktop.
This server can be used in two ways. Choose the option that works best for you:
|
Run on your own computer Pros:
Cons:
Setup time: ~5 minutes π Setup Locally |
Use our hosted server Pros:
Cons:
Setup time: ~2 minutes Server URL: π Use Hosted Version |
Security Note: Both options are secure. The hosted version does NOT store your API token - you provide it with each request, just like the local version stores it in your config file.
Run the MCP server on your own computer.
Before you start, make sure you have:
- Node.js v18 or higher (Download here)
- Yarn package manager (Installation guide)
- A Runalyze account with premium access (Get premium)
- An AI assistant that supports MCP (Claude Desktop, ChatGPT Desktop, VS Code extensions, etc.)
# Clone the repository
git clone https://github.com/floriankimmel/runalyze-mcp-server.git
cd runalyze-mcp-server
# Install dependencies
yarn install
# Build the server
yarn buildThe compiled server will be in the dist/ directory.
- Log in to your Runalyze account
- Go to Settings β Personal API: https://runalyze.com/settings/personal-api
- Click Generate new token
- Copy the token (you'll need it in the next step)
Choose your AI assistant and follow the configuration steps:
-
Locate your configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the server configuration:
{
"mcpServers": {
"runalyze": {
"command": "node",
"args": [
"/absolute/path/to/runalyze-mcp-server/dist/main.js"
],
"env": {
"RUNALYZE_API_TOKEN": "your-api-token-here"
}
}
}
}-
Replace the values:
- Change
/absolute/path/to/runalyze-mcp-serverto where you installed the server - Replace
your-api-token-herewith your Runalyze API token
- Change
-
Restart Claude Desktop
-
Open ChatGPT Desktop settings
-
Navigate to Developer Settings β MCP Servers
-
Click Add Server and configure:
- Name:
runalyze - Command:
node - Arguments:
/absolute/path/to/runalyze-mcp-server/dist/main.js - Environment Variables:
- Key:
RUNALYZE_API_TOKEN - Value:
your-api-token-here
- Key:
- Name:
-
Save and restart ChatGPT Desktop
- Open VS Code settings (JSON)
- Add this configuration:
{
"mcp.servers": {
"runalyze": {
"command": "node",
"args": [
"/absolute/path/to/runalyze-mcp-server/dist/main.js"
],
"env": {
"RUNALYZE_API_TOKEN": "your-api-token-here"
}
}
}
}- Replace the path and token with your values
- Reload VS Code
- Open Continue configuration file (
~/.continue/config.json) - Add to the
mcpServersarray:
{
"mcpServers": [
{
"name": "runalyze",
"command": "node",
"args": [
"/absolute/path/to/runalyze-mcp-server/dist/main.js"
],
"env": {
"RUNALYZE_API_TOKEN": "your-api-token-here"
}
}
]
}- Replace the path and token with your values
- Restart Continue
- Open Zed settings (
~/.config/zed/settings.json) - Add this configuration:
{
"mcp": {
"servers": {
"runalyze": {
"command": "node",
"args": [
"/absolute/path/to/runalyze-mcp-server/dist/main.js"
],
"env": {
"RUNALYZE_API_TOKEN": "your-api-token-here"
}
}
}
}
}- Replace the path and token with your values
- Restart Zed
Use our hosted MCP server - no installation required!
Server URL: https://runalyze-mcp-server.fly.dev
- Log in to your Runalyze account
- Go to Settings β Personal API: https://runalyze.com/settings/personal-api
- Click Generate new token
- Copy the token (you'll need it in the next step)
Choose your AI assistant and follow the configuration steps:
Note: Claude Desktop currently only supports STDIO transport. To use the hosted version, you would need an HTTP-to-STDIO bridge. For now, we recommend using the Local Setup with Claude Desktop.
Note: Check if ChatGPT Desktop supports HTTP transport for MCP servers. If not, use the Local Setup instead.
If your AI tool supports MCP over HTTP, configure it with:
- Endpoint URL:
https://runalyze-mcp-server.fly.dev/mcp - Authentication: Bearer token
- Token: Your Runalyze API token
Example configuration format:
{
"mcpServers": {
"runalyze": {
"url": "https://runalyze-mcp-server.fly.dev/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer YOUR_RUNALYZE_TOKEN"
}
}
}
}You can also use the hosted server directly via HTTP:
Health Check (no authentication required):
curl https://runalyze-mcp-server.fly.dev/healthGet HRV Data:
curl -X POST https://runalyze-mcp-server.fly.dev/mcp \
-H "Authorization: Bearer YOUR_RUNALYZE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"method": "tools/call",
"params": {
"name": "get-runalyze-hrv-data",
"arguments": {"page": 1}
}
}'Get Activities:
curl -X POST https://runalyze-mcp-server.fly.dev/mcp \
-H "Authorization: Bearer YOUR_RUNALYZE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"method": "tools/call",
"params": {
"name": "get-runalyze-activities",
"arguments": {"page": 1}
}
}'Get Activity Details:
curl -X POST https://runalyze-mcp-server.fly.dev/mcp \
-H "Authorization: Bearer YOUR_RUNALYZE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"method": "tools/call",
"params": {
"name": "get-runalyze-activity-detail",
"arguments": {"id": 12345}
}
}'Once configured, you can ask your AI assistant questions like:
- "Show me my recent activities from Runalyze"
- "What workouts did I log this week?"
- "Get details for activity 12345"
- "Analyze my running data from last month"
- "What's my latest HRV data?"
- "Show me my HRV trends over the past month"
- "How is my recovery looking based on HRV?"
- "Show me my sleep data from last week"
- "How many hours did I sleep last night?"
- "What's my sleep pattern this month?"
- "What was my resting heart rate this morning?"
- "Show me my resting heart rate trend"
- "Is my resting heart rate improving?"
The AI will automatically fetch your data and provide insights!
The server provides these tools to your AI assistant:
get-runalyze-activities- Get your activity list (runs, rides, workouts)get-runalyze-activity-detail- Get detailed info for a specific activityget-runalyze-hrv-data- Retrieve Heart Rate Variability measurementsget-runalyze-sleep-data- Get sleep tracking dataget-runalyze-heart-rate-rest-data- Get resting heart rate measurements
All tools support pagination for browsing through historical data.
- Your API token is stored in your MCP client's configuration file on your computer
- All communication happens locally on your machine
- No data is sent to third parties
- Token is validated at startup
- No tokens are stored on the server
- Each request requires your Runalyze API token in the Authorization header
- You only access your own data
- All communication is over HTTPS
- The server is stateless - it doesn't remember anything between requests
Both options are secure. Choose based on your preference:
- Local = Maximum privacy, everything on your machine
- Hosted = Convenience, no installation needed
Server won't start
- β Check your API token is valid: https://runalyze.com/settings/personal-api
- β
Verify the path to
dist/main.jsis absolute and correct - β
Ensure Node.js v18+ is installed:
node --version - β
Check you ran
yarn buildsuccessfully - β
Try running
node /absolute/path/to/dist/main.jsmanually to see error messages
"Configuration validation failed"
- β
The
RUNALYZE_API_TOKENenvironment variable is missing in your config - β Double-check your MCP client configuration syntax (valid JSON)
- β Ensure the token has no extra spaces or quotes
No data returned
- β Verify you have data in your Runalyze account
- β Check your account has premium/supporter access (required for API)
- β Ensure your API token has the necessary permissions
- β Try accessing https://runalyze.com/api/v1/metrics/hrv directly in your browser while logged in
AI assistant doesn't see the tools
- β Restart your AI assistant after configuration changes
- β Check the MCP server appears in the AI assistant's MCP server list
- β Look for error messages in the AI assistant's logs/developer console
- β Verify the JSON configuration is valid (use a JSON validator)
Connection fails
- β
Check the server is running:
curl https://runalyze-mcp-server.fly.dev/health - β Verify you have internet connectivity
- β
Ensure the URL is correct:
https://runalyze-mcp-server.fly.dev/mcp
Authentication errors (401 Unauthorized)
- β
Ensure you're including the
Authorization: Bearer YOUR_TOKENheader - β Verify your Runalyze API token is valid and not expired
- β Check there are no extra spaces in the token
- β Make sure you copied the complete token from Runalyze
404 or other errors
- β
Verify the endpoint path is
/mcpnot just/ - β Check you're using POST method, not GET
- β
Ensure Content-Type header is
application/json
AI tool doesn't support HTTP transport
- β Many MCP clients currently only support STDIO transport
- β Use the Local Setup instead
- β Or use the HTTP API directly with curl/scripts
Still having problems?
- Check your Runalyze API token at https://runalyze.com/settings/personal-api
- Verify you have premium access: https://runalyze.com/premium
- Review Runalyze API Documentation
- Check MCP Documentation
- Open an issue on GitHub
- π Runalyze - Training analysis platform
- π Model Context Protocol - MCP specification
- π€ Claude Desktop - AI assistant
- π¬ ChatGPT - AI assistant
Want to contribute or deploy your own instance? Check out:
- GitHub Repository
- CONTRIBUTING.md - Development setup and guidelines
- Fly.io Deployment Guide - Host your own instance
MIT
Made with β€οΈ for the Runalyze community