Skip to content
Agent-ready apps

Let your users connect Codex to your app

Agent-ready apps: make the app you build with the SDK ready for Codex. Your users add your app's MCP server to Codex, sign in on your hosted page and approve it, and Codex acts as them, never as more.

How your users add your app to Codex

Give your users your app's MCP address. npx buildbase agent install --url <your MCP address> prints the setup for each AI tool, Codex included, with your address filled in.

  1. In Codex, your user adds a remote MCP server: codex mcp add, or ~/.codex/config.toml. They use your app's MCP address, https://app.example.com/api/mcp in these examples, or the command or config below.
  2. Sign in: run codex mcp login acme. codex mcp login <name> opens a browser to sign in; add --no-browser in a terminal without one. The ChatGPT desktop app starts the sign-in itself.
  3. Your hosted sign-in page opens. Your user signs in and approves the consent screen, which names Codex and what it asks for.
  4. Codex can now use your tools, as that user and with that user's permissions.
terminalBash
codex mcp add acme --url https://app.example.com/api/mcp
codex mcp login acme
~/.codex/config.tomlTOML
[mcp_servers.acme]
url = "https://app.example.com/api/mcp"

The plan it needs

OpenAI's Codex MCP page does not name a plan for MCP servers.

How sign-in looks in Codex

codex mcp login <name> opens a browser to sign in; add --no-browser in a terminal without one. The ChatGPT desktop app starts the sign-in itself.

What is different in Codex

  • Codex runs on your user's own computer, so it reaches any address that computer can, including a development server while you test.
  • Your server's built-in tools are read-only until you allow changes. In config.toml, enabled_tools and disabled_tools choose the tools, and default_tools_approval_mode (auto, prompt, writes or approve) decides when Codex asks; tools.<tool>.approval_mode sets one tool.
  • The Codex CLI, the IDE extension and the ChatGPT desktop app share one configuration.

If it does not work in Codex

Codex cannot register or sign in
Turn on Let agents register themselves, with a base client, in the console under Authentication, then Agent readiness. Codex registers its own client the first time it connects.
Codex does not connect
/mcp lists the active servers. startup_timeout_sec and tool_timeout_sec raise the timeouts, and /debug-config shows which config file set what.
Codex needs to sign in again
Run codex mcp login <name> again.
Check your server the way Codex will
Run npx buildbase agent doctor --url <your MCP address>. It walks the first contact a client makes (the sign-in challenge, the metadata, redirects, a stable tool list) and exits 1 when a check fails.

Frequently Asked Questions

Which Codex plan do your users need?

OpenAI's Codex MCP page does not name a plan for MCP servers.

Does my MCP server need to be public for Codex?

No. Codex runs on your user's computer, so it reaches what that computer reaches. Your users still need an address they can open, and production should be public HTTPS.

Can Codex change data in my app?

Only through tools you allow, and only as the user who connected it. The built-in tools are read-only by default, and a tool that needs extra scopes is hidden until the user grants them.