Connect Codex with Tredict
FAQ
-
Devices and Connections
- Which recording devices and services are supported?
- Export a planned workout to my Garmin device
- What is the difference between an automatically uploaded scheduled workout and a workout FIT file?
- Garmin Connect - How to connect and synchronize my device?
- Suunto - How to connect and synchronize my watch?
- Polar Flow - How to connect and synchronize my watch?
- Coros - How to connect and synchronize my watch?
- Wahoo - Connect and synchronize
- icTrainer - Using the Tredict training plan with the roller trainer
- Oura Ring - Connect and synchronise
- Does HealthFit transfer my Stryd data from the Apple Watch?
- Zwift - Automatically synchronise planned and completed workouts
- Zwift - Synchronise via Today's Plan
- Personal API - Connect your own scripts or personal applications
- Tredict API - Connect your platform or application
- Model Context Protocol and AI integration
- General
-
Training
- How to unlink a pre-planned workout?
- How to fix corrupt workout data?
- Correct a faulty recorded swim stroke
- Can I change the date and time of my workout?
- Can the laps of an activity be calculated manually?
- Can I display a run without the walking breaks?
- Why is the date of my virtual training in a different time zone?
- Supported sports
- Calendar and Training Overview
- Coaching and Athlete Connection
- Training plans
- Evaluation
- Zones
Note: The use of Codex with the Tredict MCP Server is currently considered experimental by Tredict.
LLMs are artificial systems that make mistakes and are no substitute for a trainer or your own mind.
LLMs are artificial systems that make mistakes and are no substitute for a trainer or your own mind.
Add the Tredict MCP Server to the Codex CLI by executing the following commands in your terminal.
Add the MCP server configuration to Codex
Open the OpenAI Codex configuration file at~/.codex/config.toml.[mcp_servers.tredict] url = "https://www.tredict.com/api/mcp/v2" bearer_token_env_var = "TREDICT_PERSONAL_API_KEY" enabled = true
Create a Tredict Personal API access token
Create a personal ‘Tredict API access token’ at Settings -> Personal API / MCP -> Access token.Copy the access token to the clipboard and add it to your environment variables:
export TREDICT_PERSONAL_API_KEY='your_personal_api_token'If practicable, store the token using an environment variable manager and take care to ensure that the token is not stolen, particularly through prompt injection attacks or excessive file system read permissions by Codex and similar software.
Check MCP server configuration
Check whether the MCP server has been added to Codex correctly.codex mcp get tredictcodex mcp listUsing Tredict MCP Server in Codex
You can run the Codex CLI and use the following command to view the list of tools available on the Tredict MCP server:/mcpIf everything looks good, simply start entering your prompts into Codex. Codex will automatically query the Tredict MCP server if necessary, without you having to select it further.
Example prompts with Codex CLI
Now you can use the ‘Tredict MCP Tools’ directly in the Codex CLI, for example with these prompts:
"Determine my running FTP by analysing my training history in Tredict."
"Show me a summary of my coolest training sessions from last year."
"Create a 2-week heart rate-based running training plan directly in Tredict using the “plan creation” tool. Each training session should include both duration and estimated pace. The plan should be relaxed, with 4 training sessions per week. Integrate a few runs with sprints and one easy interval session per week. Before creating the plan, analyse my training history and current capabilities to better assess my fitness level."
"Show me a summary of my coolest training sessions from last year."
"Create a 2-week heart rate-based running training plan directly in Tredict using the “plan creation” tool. Each training session should include both duration and estimated pace. The plan should be relaxed, with 4 training sessions per week. Integrate a few runs with sprints and one easy interval session per week. Before creating the plan, analyse my training history and current capabilities to better assess my fitness level."

The training history of an endurance runner is analysed by OpenAI Codex.
Find detailed descriptions of the tools, prompts and resources of the "Tredict MCP Server" here: Tredict MCP Server Documentation.
Next question:Connect Mistral Le Chat with Tredict
Previous question:Connect ChatGPT with Tredict
Overview:View all questions