Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I gave Alexa a memory for my workouts — a stdlib-only MCP server with OAuth 2.1

Description and use

FitLog is a zero‑dependency MCP server that lets users log workouts and track nutrition via Alexa voice commands, meeting Alexa+ OAuth 2.1 requirements.

Problem

Logging gym sets required fumbling with a phone between exercises; desired voice‑only logging and nutrition tracking.

Outcome

FitLog enables voice‑only workout logging and nutrition tracking with a zero‑dependency Python server that satisfies Alexa+ OAuth 2.1 requirements.

Workflow

  • Clone the FitLog repository from GitHub
  • Navigate to the project directory
  • Run the server with python3 server.py
  • Configure Alexa+ skill to point to the server’s MCP endpoint
  • Use voice commands to log workouts, retrieve history, plan workouts, log protein, and query nutrition targets

Evidence

I track every gym session, but logging sets means fumbling with my phone between exercises. I wanted to just talk: "log bench press, 185 for 5, three sets" — and have it remembered, with PRs tracked and protein targets answered.

Source

So I built FitLog: a self-hosted MCP server that turns Alexa into a fitness coach. Six tools — log_workout, get_history, get_personal_records, plan_workout, log_protein, get_nutrition_targets — over Streamable HTTP, implementing MCP spec 2025-11-25.

Source

The interesting part isn't the tools. It's the auth checklist, because Alexa+ is picky: OAuth 2.1 + PKCE account linking, real authorization-code flow, 401s with no WWW-Authenticate header, RFC 9728 Protected Resource Metadata at /.well-known/oauth-protected-resource, Scoped tokens (fitlog.read / fitlog.write), SQLite-persisted codes and tokens, Rate-limited owner login, fail-closed when no password is configured.

Source

And the whole thing is zero dependencies — Python standard library only. No framework, no ORM. The OAuth flow, the JSON-RPC dispatcher, the persistence layer: all hand-rolled, ~testable, and every security decision covered by tests (49/49 passing), including the fail-closed behavior I verified with an actual attack script.

Source

  • Record date: 2026-10-01T18:41:11.004Z