Help and Support » MCP Server

Connecting Gemini CLI to the Runalyze MCP Server

This guide explains how to connect Gemini CLI to the Runalyze MCP Server so Gemini can access your Runalyze data through the Model Context Protocol (MCP).

Prerequisites

Before you begin:

  1. Install and configure Gemini CLI.
  2. Have an active Runalyze Premium Membership.

Step 1: Create a Runalyze API Token

  1. Open https://runalyze.com/settings/personal-api
  2. Create a new Personal API Token.
  3. Copy the generated Bearer Token.

Note: The MCP server requires a valid Runalyze Premium account and a Personal API Token.

Step 2: Configure Gemini CLI

Open your Gemini CLI configuration file:

macOS / Linux

~/.gemini/settings.json

Windows

%USERPROFILE%\.gemini\settings.json

Add the following MCP server configuration:

{
  "mcpServers": {
    "runalyze": {
      "httpUrl": "https://runalyze.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_RUNALYZE_TOKEN"
      },
      "trust": true
    }
  }
}

Replace YOUR_RUNALYZE_TOKEN with the Bearer Token you generated in Runalyze.

Alternative: Use an Environment Variable

Instead of storing the token directly in the configuration file, you can use an environment variable.

macOS / Linux

export RUNALYZE_API_TOKEN="your_bearer_token_here"

Windows PowerShell

$env:RUNALYZE_API_TOKEN="your_bearer_token_here"

Then configure Gemini CLI like this:

{
  "mcpServers": {
    "runalyze": {
      "httpUrl": "https://runalyze.com/mcp",
      "headers": {
        "Authorization": "Bearer ${RUNALYZE_API_TOKEN}"
      },
      "trust": true
    }
  }
}

Step 3: Restart Gemini CLI

Restart Gemini CLI after saving the configuration:

gemini

Step 4: Verify the Connection

Inside Gemini CLI, run:

/mcp

You should see a connected MCP server named:

runalyze

Example Prompts

Once connected, you can ask Gemini questions such as:

Show my last 10 running activities.
What was my average resting heart rate this month?
Summarize my training load for the last 4 weeks.
How has my HRV changed over the last 30 days?

Troubleshooting

Server not visible in /mcp

  • Verify your Premium subscription is active.
  • Confirm the Bearer Token is valid.
  • Restart Gemini CLI after editing settings.json.

Authentication errors

Verify that the Authorization header is configured exactly as follows:

Authorization: Bearer <token>

Connection errors

Ensure that the MCP endpoint is reachable:

https://runalyze.com/mcp

and that your settings.json file contains valid JSON.

Related articles

Didn't find an answer to your question?

Please let us know if you have wishes or have encountered bugs. We give our best to make Runalyze as good as possible for you. - Therefore we would be interested in your suggestions for improvement. In general most questions, problems and ideas are more appropriate to ask in the forum.