Features Integrations AI & API Pricing Blog Docs
Overview WHOOP Oura Withings Apple Health Glucose Hevy Lab Tests Training Data Weekly Recap Connect any AI MCP Server Claude ChatGPT Codex Grok (xAI) Developer tools Other assistants Automations Prompt library AI access & privacy REST API

Use VitalTrends in coding agents and developer tools

Connect the hosted VitalTrends MCP server to Claude Code, Codex CLI, Cursor, VS Code, Gemini CLI, Windsurf, Zed, LM Studio, Goose, OpenClaw, Cline or Continue, then ask about your WHOOP, Oura, Withings, Apple Health, Hevy and glucose data, or your Training Log, while you code. Each setup is one command or one config block.

Server URL: https://mcp.vitaltrends.net/mcp (Streamable HTTP). A legacy SSE endpoint is also served at https://mcp.vitaltrends.net/sse for clients that need it.

Last checked: 21 November 2026. Developer tools change their MCP config formats often. Each section says what VitalTrends has tested and which vendor documentation the snippet follows.

Requirements

Two ways to sign in

  1. OAuth (preferred when the tool supports remote MCP OAuth). Add the server URL with no headers. The tool opens a "Connect VitalTrends" page in your browser, where you paste your API key. The tool never stores your key, only a token tied to it. The connection is read-only unless you tick "Allow changes to my Training Log" on that page and the key has "Allow workout write access". The server supports dynamic client registration, PKCE and loopback redirect URIs, so there is no client ID or secret to configure.
  2. API key header (for tools without OAuth, scripts and headless runs). Send Authorization: Bearer YOUR_API_KEY with every request to /mcp. The connection gets the key's own permissions: read-only, unless the key has "Allow workout write access" turned on, in which case write tools work without a consent page.
Keep your key out of your code. Store it in an environment variable (the examples use VITALTRENDS_API_KEY) or your tool's secret store. Never commit it, never paste it into a chat, and never put it in a project config file that is checked into Git. Leave "Allow workout write access" off unless you want an agent to change your Training Log. Your account has one API key: regenerating or deleting it in Settings → Developer immediately disconnects every tool that uses it, OAuth connections included.

Data a tool reads through VitalTrends is sent to that tool's AI provider and handled under the provider's privacy policy. See AI access and your data. VitalTrends does not give medical advice.

Compatibility at a glance

"Not yet tested" means the snippet follows the vendor's documentation, checked on 21 November 2026, but VitalTrends has not run it end to end.

ToolTransportAuthConfig locationStatus
Claude Code (claude.ai connector)Streamable HTTPOAuth, through claude.aiclaude.ai connector settingsVerified 21 Nov 2026
Claude Code (claude mcp add)Streamable HTTPOAuth or header~/.claude.json or .mcp.jsonNot yet tested
Codex CLIStreamable HTTPOAuth or bearer env var~/.codex/config.tomlNot yet tested
CursorStreamable HTTPOAuth or header~/.cursor/mcp.json or .cursor/mcp.jsonNot yet tested
VS Code / GitHub CopilotStreamable HTTPOAuth or header (input prompt).vscode/mcp.json, user mcp.json or ~/.copilot/mcp-config.jsonNot yet tested
Gemini CLIStreamable HTTP (httpUrl)OAuth or header~/.gemini/settings.jsonNot yet tested
Antigravity CLIThrough mcp-remoteOAuth or header~/.gemini/config/mcp_config.jsonNot yet tested
WindsurfStreamable HTTPOAuth or header~/.codeium/windsurf/mcp_config.jsonNot yet tested
ZedStreamable HTTPOAuth or headerZed settings.json (context_servers)Not yet tested
LM StudioStreamable HTTPOAuth or headermcp.json (edit in the app)Not yet tested
GooseStreamable HTTPOAuth or header~/.config/goose/config.yamlNot yet tested
OpenClawStreamable HTTPOAuth or header~/.openclaw/openclaw.jsonNot yet tested
ClineStreamable HTTPOAuth or headercline_mcp_settings.jsonNot yet tested
ContinueStreamable HTTPAPI key (apiKey)config.yamlNot yet tested
Any stdio-only clientstdio through mcp-remoteOAuth or headerThe client's MCP configNot yet tested

Claude Code

Verified Recommended, verified on 21 November 2026: add VitalTrends as a custom connector on claude.ai (see the Claude guide). When Claude Code is signed in with the same claude.ai account, the connector is available in Claude Code with no local config. A VitalTrends tool call from Claude Code succeeded in our test.

Direct setup (not yet tested by VitalTrends, based on Anthropic's Claude Code documentation checked 21 November 2026). With OAuth:

claude mcp add --transport http --scope user vitaltrends https://mcp.vitaltrends.net/mcp

Then start Claude Code, run /mcp, choose vitaltrends and sign in on the Connect VitalTrends page. claude mcp login vitaltrends runs the same sign-in from the shell.

With the API key header, put this in .mcp.json at the project root. Claude Code expands ${VITALTRENDS_API_KEY} from your environment, so the file contains no secret:

{
  "mcpServers": {
    "vitaltrends": {
      "type": "http",
      "url": "https://mcp.vitaltrends.net/mcp",
      "headers": {
        "Authorization": "Bearer ${VITALTRENDS_API_KEY}"
      }
    }
  }
}

"type": "http" is required. claude mcp add ... --header "Authorization: Bearer $VITALTRENDS_API_KEY" also works, but your shell expands the variable first, so the key itself is saved in ~/.claude.json. Source: code.claude.com/docs/en/mcp

Try: "Use VitalTrends to compare my WHOOP HRV this week with my 30-day average."

Codex CLI

Not yet tested Not yet tested by VitalTrends, based on OpenAI's Codex CLI documentation checked 21 November 2026. The Codex desktop app is verified; see the Codex guide.

With OAuth:

codex mcp add vitaltrends --url https://mcp.vitaltrends.net/mcp
codex mcp login vitaltrends

Add --no-browser to codex mcp login on a machine without a browser, then paste the redirect URL back into the terminal.

With the API key header, Codex reads the token from an environment variable you name. In ~/.codex/config.toml:

[mcp_servers.vitaltrends]
url = "https://mcp.vitaltrends.net/mcp"
bearer_token_env_var = "VITALTRENDS_API_KEY"

Or in one command: codex mcp add vitaltrends --url https://mcp.vitaltrends.net/mcp --bearer-token-env-var VITALTRENDS_API_KEY. Check the connection with /mcp in a Codex session. Source: learn.chatgpt.com/docs/extend/mcp?surface=cli

Try: "Use VitalTrends to pull my last 90 days of WHOOP recovery and write it to recovery.csv in this folder."

Cursor

Not yet tested Not yet tested by VitalTrends, based on Cursor's documentation checked 21 November 2026.

Add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project). For OAuth, leave out headers; Cursor discovers the sign-in and registers itself.

{
  "mcpServers": {
    "vitaltrends": {
      "url": "https://mcp.vitaltrends.net/mcp",
      "headers": {
        "Authorization": "Bearer ${env:VITALTRENDS_API_KEY}"
      }
    }
  }
}

Cursor resolves ${env:NAME} in url and headers. If you launch Cursor from the Dock or Start menu, it may not see variables set only in your shell profile; launch it from a terminal or use OAuth. Open Cursor Settings → MCP to check that VitalTrends is enabled. Source: cursor.com/docs/context/mcp

Try: "Using VitalTrends, list my strength workouts from the last 30 days."

VS Code and GitHub Copilot

Not yet tested Not yet tested by VitalTrends, based on Microsoft's VS Code documentation checked 21 November 2026.

For OAuth, run MCP: Add Server from the Command Palette, choose HTTP, enter https://mcp.vitaltrends.net/mcp and name it vitaltrends. VS Code opens the sign-in page on first connect.

For the API key header, create .vscode/mcp.json. The inputs entry makes VS Code prompt for the key once and store it securely, so the file contains no secret:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "vitaltrends-key",
      "description": "VitalTrends API key",
      "password": true
    }
  ],
  "servers": {
    "vitaltrends": {
      "type": "http",
      "url": "https://mcp.vitaltrends.net/mcp",
      "headers": {
        "Authorization": "Bearer ${input:vitaltrends-key}"
      }
    }
  }
}

VS Code now calls this servers format "editor-managed" and plans to remove it in February 2027. The newer Copilot format lives in ~/.copilot/mcp-config.json and reads environment variables instead of inputs:

{
  "mcpServers": {
    "vitaltrends": {
      "type": "http",
      "url": "https://mcp.vitaltrends.net/mcp",
      "headers": {
        "Authorization": "Bearer ${VITALTRENDS_API_KEY}"
      }
    }
  }
}

Open Copilot Chat in Agent mode and enable the VitalTrends tools from the tools picker. On Copilot Business or Enterprise, an administrator must enable the "MCP servers in Copilot" policy, which is off by default. Sources: code.visualstudio.com/docs/agents/reference/mcp-configuration, docs.github.com/en/copilot/how-tos/provide-context/use-mcp/extend-copilot-chat-with-mcp

Try: "Use the VitalTrends tools to find my average Apple Health step count per weekday last month."

Gemini CLI

Not yet tested Not yet tested by VitalTrends, based on Google's Gemini CLI documentation checked 21 November 2026.

Google's docs say that for unpaid-tier and Google One users, Gemini CLI was replaced by Antigravity CLI on 18 June 2026. If you still use Gemini CLI (for example with a paid or API-key setup), add this to ~/.gemini/settings.json. httpUrl is Streamable HTTP; url would mean SSE.

{
  "mcpServers": {
    "vitaltrends": {
      "httpUrl": "https://mcp.vitaltrends.net/mcp",
      "headers": {
        "Authorization": "Bearer ${VITALTRENDS_API_KEY}"
      }
    }
  }
}

Gemini CLI documents $VAR and ${VAR} expansion in settings values, but its MCP examples only show literal headers. If the variable is not expanded, use OAuth instead: remove headers, start gemini, then run /mcp auth vitaltrends. The equivalent command is gemini mcp add --transport http --scope user vitaltrends https://mcp.vitaltrends.net/mcp. Source: geminicli.com/docs/tools/mcp-server/

Antigravity CLI

Antigravity CLI (agy) reads MCP servers from ~/.gemini/config/mcp_config.json and uses serverUrl for remote servers. Its migration guide does not yet document headers or OAuth for remote servers, so use the mcp-remote bridge below as a local command server until it does. Source: antigravity.google/docs/cli/gcli-migration

Try: "Use VitalTrends to summarize my Oura readiness for the last two weeks."

Windsurf

Not yet tested Not yet tested by VitalTrends, based on Windsurf's Cascade documentation checked 21 November 2026.

Add this to ~/.codeium/windsurf/mcp_config.json, or open it from the Cascade MCP settings. For OAuth, leave out headers.

{
  "mcpServers": {
    "vitaltrends": {
      "serverUrl": "https://mcp.vitaltrends.net/mcp",
      "headers": {
        "Authorization": "Bearer ${env:VITALTRENDS_API_KEY}"
      }
    }
  }
}

Windsurf expands ${env:NAME} in serverUrl and headers. Refresh the MCP server list in Cascade after saving. Source: docs.devin.ai/windsurf/plugins/cascade/mcp.md

Try: "Using VitalTrends, show my Withings weight trend for this year."

Zed

Not yet tested Not yet tested by VitalTrends, based on Zed's documentation checked 21 November 2026.

Open Settings → AI → MCP Servers → Add Server → Add Remote Server, or add this to your Zed settings.json:

{
  "context_servers": {
    "vitaltrends": {
      "url": "https://mcp.vitaltrends.net/mcp"
    }
  }
}

With no Authorization header, Zed prompts you to sign in with the standard MCP OAuth flow. This is the recommended option for Zed: its docs do not describe environment variable expansion, so a header would mean storing your key in plain text in settings.json. If you need the header anyway, add "headers": { "Authorization": "Bearer YOUR_API_KEY" } and keep that file private. Source: zed.dev/docs/ai/mcp

Try: "Use VitalTrends to list last week's WHOOP sleep sessions with their stages."

LM Studio

Not yet tested Not yet tested by VitalTrends, based on LM Studio's documentation checked 21 November 2026. Requires LM Studio 0.3.17 or later.

Open the Program tab in the right sidebar, select Install → Edit mcp.json, and add:

{
  "mcpServers": {
    "vitaltrends": {
      "url": "https://mcp.vitaltrends.net/mcp"
    }
  }
}

LM Studio supports MCP OAuth: when you save, it opens the sign-in page in your browser and receives the result on http://127.0.0.1:33389. To use the API key header instead, add "headers": { "Authorization": "Bearer YOUR_API_KEY" }; LM Studio's docs do not describe environment variable expansion, so the key is stored in the file. Tool results are processed by the local model you load, so pick one that handles tool calls well. Sources: lmstudio.ai/docs/app/mcp, lmstudio.ai/docs/integrations/mcp-remote

Try: "Use VitalTrends to get my WHOOP daily data for the last 14 days and summarize the trend."

Goose

Not yet tested Not yet tested by VitalTrends, based on Goose's documentation checked 21 November 2026.

Run goose configure, choose Add Extension → Remote Extension (Streamable HTTP), name it vitaltrends and enter https://mcp.vitaltrends.net/mcp as the endpoint. Answer No to custom headers to sign in with OAuth, or Yes and add the header Authorization with the value Bearer YOUR_API_KEY. In Goose Desktop, use Extensions → Add custom extension with the Streamable HTTP type. The result in ~/.config/goose/config.yaml looks like this:

extensions:
  vitaltrends:
    name: vitaltrends
    type: streamable_http
    uri: https://mcp.vitaltrends.net/mcp
    enabled: true
    timeout: 300

Goose uses uri, not url, and does not use the SSE endpoint. Source: goose-docs.ai/docs/getting-started/using-extensions

Try: "Use VitalTrends to tell me how many workouts I logged per week this month."

OpenClaw

Not yet tested Not yet tested by VitalTrends, based on OpenClaw's documentation checked 21 November 2026.

With OAuth:

openclaw mcp add vitaltrends --url https://mcp.vitaltrends.net/mcp --transport streamable-http --auth oauth
openclaw mcp login vitaltrends
openclaw mcp doctor vitaltrends --probe

With the API key header (OpenClaw expands ${VAR} references; with --auth oauth set, static headers are ignored):

openclaw mcp set vitaltrends '{"url":"https://mcp.vitaltrends.net/mcp","transport":"streamable-http","headers":{"Authorization":"Bearer ${VITALTRENDS_API_KEY}"}}'

Always set streamable-http: without it OpenClaw uses SSE. OpenClaw also has a built-in scheduler (openclaw automations, alias openclaw cron) that runs agent turns on a schedule. Its docs don't yet say whether MCP tools are available in scheduled runs, so test a morning brief by hand before relying on it. Sources: docs.openclaw.ai/cli/mcp/registry, docs.openclaw.ai/automation/cron-jobs

Try: "Use VitalTrends to give me a three-line morning brief: last night's sleep, today's recovery, yesterday's training."

Cline

Not yet tested Not yet tested by VitalTrends, based on Cline's documentation checked 21 November 2026.

In Cline, open MCP Servers → Remote Servers, enter vitaltrends as the name and https://mcp.vitaltrends.net/mcp as the URL, choose Streamable HTTP, then Add Server. To use the API key header, select Configure MCP Servers and edit cline_mcp_settings.json:

{
  "mcpServers": {
    "vitaltrends": {
      "type": "streamableHttp",
      "url": "https://mcp.vitaltrends.net/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Set "type": "streamableHttp" explicitly: without it Cline uses legacy SSE. Cline's docs describe browser authorization for OAuth servers in the Cline CLI; they don't describe environment variable expansion, so the key above is stored in the settings file. Source: docs.cline.bot/mcp/connecting-to-a-remote-server.md

Continue

Not yet tested Not yet tested by VitalTrends, based on Continue's documentation checked 21 November 2026. MCP tools work in Continue's agent mode only.

Add this to config.yaml (or a file in .continue/mcpServers/), and store the key as a Continue secret named VITALTRENDS_API_KEY:

mcpServers:
  - name: VitalTrends
    type: streamable-http
    url: https://mcp.vitaltrends.net/mcp
    apiKey: ${{ secrets.VITALTRENDS_API_KEY }}

Continue sends apiKey as a bearer token. Its docs do not describe MCP OAuth. Source: docs.continue.dev/customize/deep-dives/mcp

Stdio-only clients (mcp-remote)

Some clients can only start local (stdio) MCP servers. The open-source mcp-remote package bridges them to the hosted server. It needs Node.js and is not yet tested by VitalTrends (based on the mcp-remote README checked 21 November 2026).

To sign in with OAuth, use the URL alone. mcp-remote opens the sign-in page in your browser and stores the token under ~/.mcp-auth:

{
  "mcpServers": {
    "vitaltrends": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.vitaltrends.net/mcp"]
    }
  }
}

To send the API key header instead, pass it through an environment variable. Write the header with no space after the colon, because some clients split arguments on spaces:

{
  "mcpServers": {
    "vitaltrends": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote", "https://mcp.vitaltrends.net/mcp",
        "--header", "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer YOUR_API_KEY"
      }
    }
  }
}

From a terminal, the same bridge is:

npx -y mcp-remote https://mcp.vitaltrends.net/mcp --header "Authorization: Bearer ${VITALTRENDS_API_KEY}"

mcp-remote tries Streamable HTTP first and falls back to SSE. Source: github.com/geelen/mcp-remote

Developer recipes

These recipes use the REST API directly instead of MCP. Use the API when you want repeatable code, a notebook or a dashboard that does not depend on a chat. The same API key works for both.

The examples only read data. Set VITALTRENDS_API_KEY in your environment first; never paste the key into the code.

Recipe 1: 90 days of WHOOP daily data in pandas

Install the two libraries once with pip install pandas requests, then set VITALTRENDS_API_KEY in your shell or notebook environment.

import os
from datetime import date, timedelta

import pandas as pd
import requests

API = "https://vitaltrends.net/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['VITALTRENDS_API_KEY']}"}


def fetch_all(path, params):
    """Follow pagination until the API reports no next page."""
    rows, page = [], 1
    while True:
        response = requests.get(
            f"{API}{path}",
            headers=HEADERS,
            params={**params, "per_page": 200, "page": page},
            timeout=30,
        )
        response.raise_for_status()
        body = response.json()
        rows.extend(body["data"])
        if not (body.get("links") or {}).get("next"):
            return rows
        page += 1


start = (date.today() - timedelta(days=90)).isoformat()
whoop = pd.DataFrame(fetch_all("/whoop/daily", {"start": start}))

# Keep closed, scored cycles and index them by the local cycle start date.
whoop = whoop[~whoop["is_partial"]].copy()
whoop["cycle_start_date"] = pd.to_datetime(whoop["cycle_start_date"])
whoop = whoop.set_index("cycle_start_date").sort_index()

columns = [
    "recovery_score",
    "hrv_rmssd_milli",
    "resting_heart_rate",
    "sleep_performance_pct",
    "sleep_duration_minutes",
    "strain",
]
print(whoop[columns].describe().round(1))

# 7-day rolling averages, one chart per metric (needs matplotlib).
whoop[["recovery_score", "hrv_rmssd_milli", "resting_heart_rate"]].rolling(7).mean().plot(
    subplots=True, figsize=(10, 7)
)

Fields come from GET /whoop/daily: cycle_start_date, cycle_end_date, is_partial, recovery_score, hrv_rmssd_milli, resting_heart_rate, sleep_performance_pct, sleep_duration_minutes and strain. The open cycle for today can appear with is_partial: true; the example drops it so averages only use complete days. The API allows 120 requests per minute per key, so a 90-day pull (one page of up to 200 rows) is well within the limit.

Recipe 2: ask your coding agent to build a personal dashboard

Paste this into Claude Code, Codex, Cursor or any agent that can edit files and run commands in an empty project folder:

Build a small local dashboard for my VitalTrends health data.

- Read data from the VitalTrends REST API at https://vitaltrends.net/api/v1
  with the header "Authorization: Bearer $VITALTRENDS_API_KEY".
  The API reference is https://vitaltrends.net/docs/api.md. Read it first and
  use only endpoints and fields documented there.
- Read the key from an environment variable or a .env file. Add .env to
  .gitignore. Never print, log or commit the key.
- Only send GET requests. Do not call any endpoint that writes data.
- Show the last 90 days of WHOOP recovery, HRV and resting heart rate from
  /whoop/daily (follow pagination using links.next), and the last 30 days of
  training volume by muscle group from /training/muscle-groups/usage
  (start_date and end_date).
- Cache responses locally for an hour so reloading the page does not hit
  the rate limit (120 requests per minute).
- Run it on localhost only. Use synthetic sample data in any tests.

Swap the endpoints for your sources: /oura/daily-readiness, /apple-health/daily, /withings/measurements or /glucose. If the agent also has the VitalTrends MCP server connected, it can use the MCP tools to look at your data while it designs the charts, but the finished dashboard should call the REST API.

Recipe 3: analyze your Training Log in a notebook

This pulls the last 180 days of Training Log sessions with their exercises and sets, then summarizes weekly volume by muscle group and the best estimated one-rep max per exercise. It reuses API, HEADERS and fetch_all from recipe 1.

from datetime import date, timedelta

import pandas as pd

start = (date.today() - timedelta(days=180)).isoformat()
logs = fetch_all("/workout-logs", {"start": start, "include": "exercises"})

rows = []
for log in logs:
    for exercise in log.get("exercises") or []:
        for s in exercise["sets"]:
            rows.append({
                "started_at": log["started_at"],
                "session": log["title"],
                "exercise": exercise["name"],
                "exercise_key": exercise["exercise_key"],
                "muscle_group": exercise["muscle_group"] or "Other",
                "set_type": s["set_type"],
                "reps": s["reps"],
                "weight_kg": s["weight_kg"],
            })

sets = pd.DataFrame(rows)
sets["started_at"] = pd.to_datetime(sets["started_at"], utc=True)
working = sets[~sets["set_type"].isin(["warmup", "warm_up"])].dropna(
    subset=["started_at", "reps", "weight_kg"]
)
working = working.assign(volume_kg=working["reps"] * working["weight_kg"])

# Weekly lifted volume (kg x reps) by muscle group.
weekly = (
    working.set_index("started_at")
    .groupby("muscle_group")["volume_kg"]
    .resample("W")
    .sum()
    .unstack(0)
    .fillna(0)
)
print(weekly.tail(8).round(0))

# Best estimated 1RM per exercise (Epley formula), sets of 10 reps or fewer.
e1rm = working[working["reps"] <= 10].assign(
    e1rm_kg=lambda d: d["weight_kg"] * (1 + d["reps"] / 30)
)
print(e1rm.groupby("exercise")["e1rm_kg"].max().sort_values(ascending=False).head(10).round(1))

Fields come from GET /workout-logs?include=exercises: each session has started_at, title and exercises; each exercise has name, exercise_key, muscle_group and sets; each set has reps, weight_kg and set_type. Volume here matches the Training Log definition (weight_kg x reps). For a single exercise's history, call GET /training/exercises/{exerciseKey} with a key from GET /training/exercises.

These recipes print and chart your own numbers. They don't interpret them medically. Talk to a clinician about anything that concerns you.

Troubleshooting

For tool names, parameters and general connector problems, see the MCP server reference.

FAQ

Should I use OAuth or the API key header?

Use OAuth when the tool supports it: the key stays on the VitalTrends sign-in page, and the connection is read-only unless you allow changes. Use the header for tools without OAuth, CI jobs and other headless runs.

Can I use the same key in several tools?

Yes. Your account has one API key, and every tool uses it. Regenerating it disconnects all of them at once, so plan to update each tool afterwards.

Can a coding agent change my data?

Only if you allow it. Workout and exercise writes need a key with "Allow workout write access", and OAuth connections also need "Allow changes to my Training Log". Ask the agent to preview changes before it writes. Some agents run tools without asking each time, so keep writes off for unattended runs.

Does VitalTrends see my code or prompts?

No. The server only receives the tool calls the agent makes, such as a date range for WHOOP data. It does not store your health data or the tool results.

Are lab results available?

No. Lab reports, weekly recaps and account settings are only in the VitalTrends website. See the MCP server reference for what is available.