Codex CLI runs local processes and can also connect to a remote server directly, so it supports every Moodle and Ed Discussion Model Context Protocol (MCP) surface described in MCP servers. Official reference: MCP in Codex, fetched 2026-09-21.

Prerequisites

  • moodle-cli and edstem-cli installed and signed in. See Install and Install.
  • Codex CLI installed.
Codex reads MCP servers from ~/.codex/config.toml (or .codex/config.toml for a project-scoped config).

Preferred: moodle mcp connect

This writes a bridge block to ~/.codex/config.toml, wrapped in # >>> moodle-cli mcp:... markers so it can find and update its own entry later:

Manual: remote, header auth

Get <your-token> with moodle mcp connect codex --mode remote --show-token.

Verify the connection

Or, inside a Codex session, run /mcp to see active servers and their tools.