Connect Codex with Tredict

FAQ
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.

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 tredict
codex mcp list
Using 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:
/mcp

If 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."
The training history from Tredict is analysed in the Codex CLI.
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.