Skip to main content
Glama
Láidir MCP Server

Láidir MCP Server

laidir-api

REST API and MCP server for Láidir, a local-first gym tracker. TypeScript on AWS Lambda (arm64, nodejs24.x), deployed by GitHub Actions via OIDC.

Infrastructure lives in laidir-infra. This repo owns the Lambda code and the API contract.

Contract

Path

What

openapi/openapi.yaml

Source of truth. OpenAPI 3.1

openapi/openapi.bundled.json

Single-file bundle (generated). laidir-mobile generates its client from this

schemas/v1/

Versioned entity schemas (JSON Schema 2020-12), shared by REST and MCP

src/generated/openapi.ts

TypeScript types (generated)

catalogue/v1/exercises.json

Built-in exercise catalogue (static, versioned). See catalogue/

Entities: Profile, Exercise (custom), RoutineFolder, Routine, Workout (sets embedded). All carry id (client UUID), type, schema_version, created_at, updated_at and deleted_at (soft delete). Weights are kilograms. Built-in exercises are referenced as builtin:<slug>; slugs are permanent (deprecate, never delete).

Routines can sit in a RoutineFolder (folder_id); folders and routines are ordered by sort_order. Deleting a folder tombstones it and removes folder_id from its routines. Readers treat a folder_id that points to a missing or deleted folder as unfiled.

Changing the contract: edit openapi/ or schemas/, run pnpm gen, commit the generated files. CI fails if they're stale. Breaking entity changes need a new schema_version and schemas/v2/.

Related MCP server: Health Coach MCP

Layout

src/api/      REST Lambda (laidir-<env>-api): GET /health, /v1/* (phase 3)
src/mcp/      MCP Lambda (laidir-<env>-mcp): /mcp, /.well-known/oauth-protected-resource (phase 4)
src/shared/   HTTP helpers (RFC 9457 problems), build info
scripts/      esbuild bundling
test/         Vitest: handlers + schema fixtures

Development

Node 24 and pnpm 12.

pnpm install
pnpm check     # format, lint, spec lint, typecheck, test, build
pnpm gen       # re-bundle the spec and regenerate types
pnpm build     # dist/api/index.mjs, dist/mcp/index.mjs

CI/CD

PR ─► checks: format · lint · spec lint · generated files fresh · typecheck · test · build
merge to main ─► deploy (GitHub Environment "prod", OIDC role laidir-gha-api-deploy-prod)
                 build → update-function-code (api, mcp) → wait → smoke test /health + /mcp
  • The deploy role can only update code on the two functions. Terraform owns their configuration.

  • The smoke test checks the x-laidir-version header equals the merged commit, so it proves the new code is live.

  • Actions are pinned to full commit SHAs; Dependabot keeps them and npm packages current, with a cooldown.

  • Rollback: revert the PR; the deploy runs again.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      A personal health and fitness MCP server that provides tools for managing profile data, goals, body measurements, nutrition, workouts, sleep, check-ins, life events, analytics, and coach memories via Supabase Postgres.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Hevy that fetches live workout data and computes analytics like e1RM, PRs, volume, and consistency, while enabling writes for routines, folders, and body measurements without modifying workout history.
      46 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A remote MCP server that lets LLM clients read and change training data in a self-hosted openGym instance over HTTPS using the user's own openGym token. It covers routines, weekly scheduling, workout logging and editing, body weight and goals, plus custom exercises and plan imports, with conflict-safe conditional writes.
      AGPL 3.0