Skip to main content

Self-hosted REST and MCP server for T4L Trainer agent workflows.

Project description

T4L Server

Self-hosted REST and MCP server for exchanging T4L Trainer JSON artifacts between the iPhone app and a coaching agent.

The phone remains the source of truth for accepted training state. The server stores synced context and pending agent results in SQLite so local agents, home-server agents, and private VPS agents can work through the same protocol.

Install

pipx install t4l-server
t4l-server serve --data-dir ~/T4LServerData

The command prints the server URL, MCP URL, and API key. Enter the server URL and API key in the T4L Trainer Settings screen.

Agent setup

Agents should read the public instruction repo first:

https://github.com/BigSlikTobi/t4l-agent-instructions

Those instructions explain how to start or verify this server, connect through MCP, wait for fresh phone context, and write app-consumed results safely.

Compatibility

The old command remains available for one transition cycle:

t4l-bridge serve --dir ~/CodexFitnessExchange

New setups should use t4l-server serve --data-dir ~/T4LServerData.

Safety model

  • REST, MCP, and compatibility file endpoints require the API key.
  • JSON artifacts are stored in t4l.sqlite.
  • Image blobs are stored under blobs/.
  • Only known exchange files and meal_images/ are accessible through compatibility endpoints.
  • Path traversal and arbitrary file access are rejected.

Development

python -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"
ruff format --check .
ruff check .
mypy
pytest
python -m build
twine check dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

t4l_server-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

t4l_server-0.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file t4l_server-0.1.0.tar.gz.

File metadata

  • Download URL: t4l_server-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for t4l_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ef0dee4532d2c5fd688cb8a2f068857b908e39e4fda0772ed848106690422c9
MD5 00cf2d260421aff45f798facb50be252
BLAKE2b-256 db312bdcb3a1138536c1e43e306dedf9849605efa137b131b61ed74a661fe4af

See more details on using hashes here.

Provenance

The following attestation bundles were made for t4l_server-0.1.0.tar.gz:

Publisher: publish.yml on BigSlikTobi/t4l-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file t4l_server-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: t4l_server-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for t4l_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f965aadbca914b85a5964206fdfc18af3b9c29d69d308a06496d5687092913d
MD5 1d5cd9eff36a7ff83ab233b9cc9ea5c5
BLAKE2b-256 c63df6def2b94ec03d9873b849837958f04d29e5c3835d54d2414f09bbaac12e

See more details on using hashes here.

Provenance

The following attestation bundles were made for t4l_server-0.1.0-py3-none-any.whl:

Publisher: publish.yml on BigSlikTobi/t4l-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page