Brod

Deploy from Codex

Deploy an app built with OpenAI Codex

Codex can generate a full internal tool from a description. Brod gives it somewhere to run: Codex deploys over MCP, and your team opens a private address and signs in. The data, secrets and older versions are handled for you.

1. Connect Brod to Codex

Brod is a remote MCP server using the Streamable HTTP transport at https://brod.sh/mcp.

  1. Make a token

    Make a token on your workspace's connections page (it starts with brod_ and is shown once), and put it in an environment variable rather than a config file:

    export BROD_TOKEN=brod_...
  2. Add Brod to config.toml

    Recent versions of the Codex CLI can connect to remote MCP servers from ~/.codex/config.toml:

    [mcp_servers.brod]
    url = "https://brod.sh/mcp"
    bearer_token_env_var = "BROD_TOKEN"
  3. Or go through mcp-remote

    If your version only starts local servers, connect through mcp-remote, which needs Node.js:

    [mcp_servers.brod]
    command = "npx"
    args = ["-y", "mcp-remote@0.14.3", "https://brod.sh/mcp", "--header", "Authorization:Bearer ${BROD_TOKEN}"]
    env = { BROD_TOKEN = "brod_..." }

Codex's MCP configuration has changed between releases, so check its documentation for your version.

2. Deploy

Ask Codex to deploy the app to Brod and give it a name.

  • Codex calls deploy_app

    It calls deploy_app with the files, or with a one-time upload address for a larger build, and gets back the app's address.

  • Private by default

    The app starts private to you.

  • Outside MCP

    For anything Codex scripts outside MCP, such as a CI job, the same actions are available through Brod's REST API with the same token.

3. Fit the app to Brod

Codex will often produce a Node or Python backend by default.

On Brod, server code is a single _worker.js with a fetch handler, in JavaScript or WebAssembly. Tell Codex this up front.

This app will run on Brod.
- Front end: static files (a build output folder is fine).
- Back end: one _worker.js exporting fetch(request, env). No Express, no Node APIs like fs.
- Data: env.DB (SQLite: query/run), env.KV, env.FILES. Secrets: env.NAME.
- The signed-in user arrives in x-brod-user-email and x-brod-role headers. Do not build a login.

4. Share and maintain it

  • Choose who can open the app. Named people, a group, an email domain, the workspace, or a password.
  • Confirm wider access. Widening access gives Codex a link for you to confirm.
  • Staging first. When Codex updates the live app, the change goes to staging first; publish it when it is right.
  • Roll back. Roll back if it is not.

Questions

Does this work with Codex in the cloud as well as the CLI?

Brod works with any client that can reach a remote MCP server over HTTPS, or the REST API. Whether a particular Codex surface can do that depends on its settings; the CLI is the simplest place to start.

Can Brod run the Python backend Codex wrote?

No. Server code on Brod is JavaScript or WebAssembly. Ask Codex to port the backend to a _worker.js; for small internal tools this is usually a short change.

Your AI already built the app. Put it in your team's hands.