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.2.tar.gz (11.6 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.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: t4l_server-0.1.2.tar.gz
  • Upload date:
  • Size: 11.6 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.2.tar.gz
Algorithm Hash digest
SHA256 d5940d0a7514ce49314c6c0097233969035911a5356d0c65e3ae159a312f0f6f
MD5 b2dc484479ad0bafa8b1674cbbdc79a1
BLAKE2b-256 f47fb5ed06e1835cdfa69adaed3630fc4997f46b55f688a7c97b8b688caaa658

See more details on using hashes here.

Provenance

The following attestation bundles were made for t4l_server-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: t4l_server-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06f0493c239e23963004d9ecd9a1ebb7a822efed33e08b25043093cb084395ba
MD5 27596c6a55427ef609a74525f2350a42
BLAKE2b-256 cb45fe86c2fe42f2d2c8202851121b8993ca3768acd3a57bb1a882555c6f8adc

See more details on using hashes here.

Provenance

The following attestation bundles were made for t4l_server-0.1.2-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