Skip to main content
Glama
FitDays MCP Server

FitDays MCP Server

FitDays MCP Server (Go)

Go MCP License: MIT Tools

Read-only MCP server for the unofficial FitDays cloud APIs: legacy FitDays, FitDays+, and FitDays 2.0. It covers every sync collection, weight/body-composition history, trend and goal analytics, the FitDays 2.0 food and water diary, and a redacted raw escape hatch.

This is an unofficial client. ICOMON can change the private API at any time. The server never writes to FitDays: no measurements, goals, users or devices are created, changed or deleted.

Backends

FitDays migrated accounts from the legacy service to FitDays+, then to the current FitDays 2.0 app. backend:auto tries legacy, then Plus, then 2.0, falling back only when the previous backend reports a migration, freeze or missing-account code. New accounts normally resolve to 2.0. region:global is Plus-only.

Credentials are stored as protocol password-equivalent digests, never as plaintext. The config file is ~/.fitdays-mcp/config.json (directory 0700, file 0600).

Related MCP server: Garmin Connect MCP Server

Install

go install github.com/kondratjev/fitdays-mcp-go/cmd/fitdays-mcp@latest

Or build from source:

go build -o fitdays-mcp ./cmd/fitdays-mcp

Requires Go 1.27+.

MCP configuration (stdio)

{
  "mcpServers": {
    "fitdays": {
      "command": "/absolute/path/to/fitdays-mcp",
      "env": {
        "FITDAYS_EMAIL": "you@example.com",
        "FITDAYS_PASSWORD": "your-password",
        "FITDAYS_REGION": "eu",
        "FITDAYS_BACKEND": "auto"
      }
    }
  }
}

On first use call check_auth_status, then setup_credentials if needed, then any read tool. Environment credentials are hashed in memory at startup; the config file is written after setup_credentials or the first successful sync.

Docker

# stdio
docker run -i --rm \
  -v fitdays-config:/home/app/.fitdays-mcp \
  -e FITDAYS_EMAIL=you@example.com \
  -e FITDAYS_PASSWORD=your-password \
  ghcr.io/kondratjev/fitdays-mcp-go:0.2.1

# stateless HTTP
docker run --rm -p 8000:8000 \
  -v fitdays-config:/home/app/.fitdays-mcp \
  -e PORT=8000 \
  ghcr.io/kondratjev/fitdays-mcp-go:0.2.1

The named volume keeps the non-root container's ~/.fitdays-mcp/config.json.

HTTP

Set PORT to serve stateless Streamable HTTP at /mcp with /healthz. X-MCP-User selects a named profile; stdio always uses default.

PORT=8000 FITDAYS_EMAIL=... FITDAYS_PASSWORD=... ./fitdays-mcp
curl -s localhost:8000/healthz   # {"status":"ok"}

Use a reverse proxy with TLS. HTTP is enough only on a trusted network.

Self-hosted server (Docker)

HTTPS is handled by the shared mcp-edge repository. This repo has no Caddy config: the container joins the mcp-edge network and advertises /<MCP_SECRET>/fitdays/* through Docker labels.

One-time edge setup from this machine (point DNS at the VPS first):

git clone https://github.com/kondratjev/mcp-edge.git
cd mcp-edge
cp .env.example .env   # set DOMAIN and MCP_SECRET
SYNC_ENV=1 VPS_SSH=user@host VPS_DIR=/opt/mcp-edge ./scripts/deploy.sh

Then set this server's credentials and deploy it:

cp .env.example .env   # FITDAYS_EMAIL and FITDAYS_PASSWORD
SYNC_ENV=1 VPS_SSH=user@host VPS_DIR=/opt/fitdays-mcp-go ./scripts/deploy.sh

Connect the client to https://<DOMAIN>/<MCP_SECRET>/fitdays/mcp; everything else returns 404. Remote MCP connectors cannot send auth headers, so the secret path is the access control: guard the URL like a password. Config and tokens live in the fitdays-config named volume, so they survive rebuilds (docker compose down -v deletes login state).

Deploy to a VPS

The server is a clean git mirror: code is never edited there, and .env plus Docker volumes survive a git reset --hard.

First deploy (the script clones the repo on the VPS if it is missing and copies the local .env):

SYNC_ENV=1 VPS_SSH=user@host VPS_DIR=/opt/fitdays-mcp-go ./scripts/deploy.sh

Then deploy from the local branch:

VPS_SSH=user@host VPS_DIR=/opt/fitdays-mcp-go ./scripts/deploy.sh

The script pushes the current branch, creates the server clone when needed, pulls it, and rebuilds with docker compose (or legacy docker-compose). SYNC_ENV=1 copies .env over scp (encrypted, mode 0600). If the repository is private, the VPS needs GitHub credentials for the initial clone. .env is git-ignored, so it never lands in the repository. Export VPS_SSH and VPS_DIR in your shell rc to run bare ./scripts/deploy.sh.

Tools

All tools are read-only except setup_credentials.

Tool

Purpose

check_auth_status

Network-free profile, backend, token-presence and cache status

setup_credentials

Validate email/password, log in, persist digests and session

list_users

Family profiles with height, sex, birthday, target weight

list_devices

Bound scales with model, firmware and binding name

get_account

Units, active profile id and account metadata

get_latest_weight

Latest measurement, including body-composition fields

get_weight_history

Paginated weight/body-composition history

get_body_composition_summary

Latest values, min/max/average and deltas

get_trend

Bucketed trend with count, min/max/average and weekly slope

get_goal_progress

Target, remaining, percent, weekly rate and ETA

compare_measurements

Compare two dates and their metric deltas

get_nutrition_history

FitDays 2.0 food diary with calories, macros, window totals and day/week/month buckets

get_water_history

FitDays 2.0 water intake with daily totals and progress to the account goal

get_body_composition_detail

Segmental masses, body score, WHR, SMI, raw composition and latest server AI analysis

get_family_overview

One row per family profile: count, first/latest weight, change, target progress

export_data

Measurements, nutrition or water as CSV/JSON text

get_auxiliary_history

Height, girth, balance, gravity, heart rate, impedance, jump rope with normalized values

get_raw_collection

Redacted raw sync key, for fields not yet normalized

refresh_sync

Force a fresh sync and return per-collection counts

Tool arguments accept RFC3339 timestamps or YYYY-MM-DD dates. Times are UTC.

Configuration

{
  "region": "eu",
  "backend": "auto",
  "syncDays": 2200,
  "profiles": {
    "default": {
      "email": "you@example.com",
      "legacyPasswordDigest": "…",
      "plusAccessCode": "…",
      "plusAccessSign": "…",
      "plusClientId": "…",
      "resolvedBackend": "legacy",
      "token": "…",
      "uid": 123,
      "activeSuid": 456,
      "apiBase": "https://online-eu.fitdays.cn/api"
    }
  }
}

Regions: eu (default), us, cn, global (Plus only). Backends: auto, legacy, plus, v2. The sync window defaults to 2200 days; older history can be requested with refresh_sync days, and a requested since older than the current window sets truncated:true.

Environment variables:

Variable

Meaning

FITDAYS_EMAIL, FITDAYS_PASSWORD

Initial credentials, hashed and saved

FITDAYS_REGION

eu, us, cn, global

FITDAYS_BACKEND

auto, legacy, plus, v2

FITDAYS_SYNC_DAYS

History window in days

FITDAYS_CACHE_TTL

Snapshot cache TTL (default 5m)

FITDAYS_API_BASE

Override host (tests, proxies)

FITDAYS_CONFIG

Alternate config path

PORT

Serve HTTP instead of stdio

Units and profiles

Weight is kilograms, heights centimetres, circumferences centimetres, body composition percentages, BMR kcal/day, heart rate bpm, impedance ohms. The legacy weight_lb and height_inch fields are preserved in raw data.

A FitDays account can contain several family profiles (suid). Tools default to the account's active profile; pass suid to read another. Deleted rows are excluded by default; history tools accept include_deleted.

Security

  • The config contains password-equivalent values and tokens. Protect it like a password. Use a dedicated FitDays account where possible.

  • Every tool response is recursively redacted: token, refresh_token, access_code, access_sign and password are removed, including inside raw collections.

  • Request URLs are never logged because the legacy protocol puts the token in the query string.

  • The server needs no inbound access beyond the optional /mcp endpoint.

Development

go test ./...
go vet ./...
go build ./...

cmd/fitdays-probe logs in with FITDAYS_EMAIL/FITDAYS_PASSWORD, syncs and writes the raw JSON for protocol inspection:

go run ./cmd/fitdays-probe -days 30 -out raw.json

The probe is not part of the MCP surface and is not shipped in the Docker image or release archives.

Limitations

  • Unofficial and read-only; writes, Apple Health and Google Fit sync are out of scope. Food and water history are read-only and available on the 2.0 backend.

  • Unknown sync fields may be absent from normalized output until mapped; use get_raw_collection in the meantime.

  • Live FitDays behavior can change without notice. The test suite uses local fake servers; a live account is needed to validate a new protocol version.

MIT licensed.

Available Tools

19 tools
check_auth_statusA
Read-onlyIdempotent

Read-only. Call check_auth_status first. Reports local credentials, profile, token presence and cache age without network access.

compare_measurementsB
Read-onlyIdempotent

Read-only. Call check_auth_status first. Last measurement at or before each time and per-metric delta.

Inputs: to (required), from (required), suid.

export_dataA
Read-onlyIdempotent

Read-only. Call check_auth_status first. Export measurements, FitDays 2.0 nutrition or water rows as CSV or JSON text, filtered by profile and time.

Inputs: dataset (required), suid, limit, since, +2 more.

get_accountA
Read-onlyIdempotent

Read-only. Call check_auth_status first. Get account units and the active profile id.

get_auxiliary_historyA
Read-onlyIdempotent

Read-only. Call check_auth_status first. History rows from height, girth, balance, gravity, heart_rate, impedance or jump_rope, filtered by profile and time. Each row keeps raw fields and adds a normalized map.

Inputs: collection (required), suid, limit, since, +2 more.

get_body_composition_detailA
Read-onlyIdempotent

Read-only. Call check_auth_status first. FitDays 2.0 measurement with segmental arm/leg/trunk fat and muscle masses, body score, WHR, SMI, obesity degree and the server AI analysis for the latest record.

Inputs: suid, data_id.

get_body_composition_summaryA
Read-onlyIdempotent

Read-only. Call check_auth_status first. Latest body composition, window statistics and deltas; legacy ext reference ranges when available.

Inputs: suid, since, until, include_deleted.

get_family_overviewA
Read-onlyIdempotent

Read-only. Call check_auth_status first. One row per family profile with measurement count, first/latest weight, change and progress toward the target. Default window: last 90 days.

Inputs: since, until.

get_goal_progressA
Read-onlyIdempotent

Read-only. Call check_auth_status first. Progress from the first measurement in the window toward the profile or override target weight.

Inputs: suid, since, until, target_weight_kg.

get_latest_weightA
Read-onlyIdempotent

Read-only. Call check_auth_status first. Return the newest measurement for the active profile, full metrics and extension data.

Inputs: suid, include_deleted, include_ext_data.

get_nutrition_historyA
Read-onlyIdempotent

Read-only. Call check_auth_status first. FitDays 2.0 food diary rows with calories and macros plus day/week/month totals; nutrients are scaled by the logged grams from per-100g food values.

Inputs: suid, limit, since, until, +2 more.

get_raw_collectionA
Read-onlyIdempotent

Read-only. Call check_auth_status first. Redacted raw top-level sync payload key, escape hatch for unknown fields.

Inputs: collection (required), limit, offset.

get_trendA
Read-onlyIdempotent

Read-only. Call check_auth_status first. Metric trend with day/week/month buckets, first/last/change/min/max/avg and slope per week. Metric: weight_kg, weight_lb, bmi, body_fat_pct, body_fat_kg, subcutaneous_fat_pct, visceral_fat, muscle_pct, muscle_mass_kg, skeletal_muscle_pct, skeletal_muscle_kg, bone_mass_kg, body_water_pct, body_water_kg, protein_pct, protein_kg, lean_body_mass_kg, bmr, body_age, body_score, whr, smi, obesity_degree, heart_rate, impedance.

Inputs: metric (required), suid, since, until, +2 more.

get_water_historyA
Read-onlyIdempotent

Read-only. Call check_auth_status first. FitDays 2.0 water intake rows, daily totals and progress against the account daily water target.

Inputs: suid, limit, since, until, +1 more.

get_weight_historyB
Read-onlyIdempotent

Read-only. Call check_auth_status first. Return measurements newest first, filtered by profile and time window.

Inputs: suid, limit, since, until, +3 more.

list_devicesA
Read-onlyIdempotent

Read-only. Call check_auth_status first. List bound FitDays scales and devices.

list_usersA
Read-onlyIdempotent

Read-only. Call check_auth_status first. List family profiles (users) for the account.

refresh_syncA
Read-onlyIdempotent

Read-only upstream refresh; bypasses the five-minute cache. Returns per-collection counts and the cache timestamp.

Inputs: days.

setup_credentialsB

Validate FitDays email/password, store password digests and save the session. Never stores plaintext. Optional region/backend/profile.

Inputs: email (required), password (required), region, backend, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 19 tools

    Disambiguation4/5

    Most tools target distinct resources or query shapes, such as account, users, devices, nutrition, water, trends, and raw sync data. There is some overlap among measurement/body-composition tools like get_latest_weight, get_weight_history, get_body_composition_summary, and compare_measurements, but the descriptions provide enough distinction to avoid most misselection.

    Naming Consistency5/5

    All tool names use consistent snake_case with a verb_noun pattern such as get_account, list_users, get_weight_history, compare_measurements, and refresh_sync. The convention is predictable throughout the set.

    Tool Count4/5

    At 19 tools, the server is slightly above the typical well-scoped range, but the breadth is justified by the domain: authentication, profiles, devices, measurements, body composition, nutrition, water, trends, goals, export, and raw data. Each tool appears to cover a distinct query need rather than duplicating functionality.

    Completeness4/5

    The surface covers a broad read-only FitDays analytics domain, including auth, account/profile management, devices, measurement history, body composition, nutrition, water, auxiliary metrics, goals, trends, export, and raw fallback access. Minor gaps exist around write/update operations for profiles, goals, or measurements, but those may be outside the server's read-only scope.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients like Claude to securely read your own Cronometer nutrition and biometric data using your account credentials, with read-only access and optional human-readable output.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to query and explore self-hosted Apple Health data, including daily metrics, time series, workouts, ECG records, heart notifications, sleep sessions, trends, freshness, and schema resources through authenticated streamable HTTP.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP-compatible clients to securely read personal blood glucose, blood ketones, device heart rate, weight, image-based body-fat percentage, and BMI data through catalog, device, query, record, and statistics tools.
      Apache 2.0