Connect Modula to Codex

Codex is OpenAI’s terminal-based AI coding agent. It supports MCP (Model Context Protocol) servers, so you can connect Modula and let Codex generate interactive content directly from your terminal.

What you’ll need

Open a terminal and run:

codex mcp add modula --url https://modula.dev/mcp

Then sign in to Modula:

codex mcp login modula

Your browser opens on the Modula login. Sign in and grant permission.

Option B — Add via configuration file

Codex reads its MCP servers from ~/.codex/config.toml. Add this block, then run codex mcp login modula:

[mcp_servers.modula]
url = "https://modula.dev/mcp"

Ask Codex to build with Modula

Start codex in any directory and try:

Using Modula, create a lesson on the solar system with an intro text, an image placeholder, and a 5-question quiz.

Codex will call the Modula tools to write the blocks and assemble the content.

Tips

  • Run codex mcp list to verify Modula is in the list of servers.
  • To remove Modula, run codex mcp remove modula, or delete the [mcp_servers.modula] block from your config file.
  • Modula requires an active account with at least the free plan to use the Modula tools.