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 educational content directly from your terminal.

What you’ll need

Steps

1. Open the Codex configuration file

Codex reads its MCP server list from ~/.codex/config.toml. Open or create this file in a text editor.

2. Add Modula as an MCP server

Add the following block to your configuration:

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

3. Save and start a Codex session

Save the file and start Codex in any directory:

codex

Codex will authenticate with Modula the first time you ask it to use a Modula tool. Follow the login prompt in your browser.

4. Ask Codex to build with Modula

Once connected, try asking:

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 find the right components and assemble the content.

Tips

  • You can also pass MCP server flags inline via the --mcp CLI option — check codex --help for the current syntax.
  • To remove Modula, delete or comment out the [mcp_servers.modula] block in your config file.
  • Modula requires an active account with at least the free plan to access the component library.
Modula is an experimental SaaS platform for distributing Web Components.
If what you found on this site sounds interesting, please reach out to us at info@chialab.it while we are setting up the platform.