Codex setup

Codex setup

Codex supports MCP servers in the CLI and IDE extension. Configuration is stored in ~/.codex/config.toml Trusted projects can also use .codex/config.toml inside the repository.

Option 1: OAuth

  1. Create an OAuth application — see the OAuth application setup guide with the forms scope.
  2. Add the FormDesigner MCP server to config.toml
[mcp_servers.formdesigner]
url = "https://mcp.formdesigner.pro/v1/mcp"

Redirect URI for the OAuth application

By default, Codex uses a local callback on an ephemeral port. If the FormDesigner OAuth application needs a predefined redirect URI, pin the callback port in config.toml

mcp_oauth_callback_port = 5555

[mcp_servers.formdesigner]
url = "https://mcp.formdesigner.pro/v1/mcp"

Add http://127.0.0.1:5555/ to the FormDesigner OAuth application redirect URIs. You can also add http://localhost:5555/ If Codex shows a redirect URI with an extra path or callback ID during login, register the exact full URI shown by Codex.

Log in from the terminal:

codex mcp login formdesigner

After login, start a new Codex chat or check the connection with /mcp in Codex CLI.

Option 2: client credentials

  1. Create an OAuth application — see the OAuth application setup guide with the forms scope and enable useClientCredentials.
  2. Store client_id and client_secret in the FORMDESIGNER_CLIENT_ID and FORMDESIGNER_CLIENT_SECRET environment variables.
  3. Add configuration that sends headers from environment variables:
[mcp_servers.formdesigner]
url = "https://mcp.formdesigner.pro/v1/mcp"
env_http_headers = { "X-Client-Id" = "FORMDESIGNER_CLIENT_ID", "X-Client-Secret" = "FORMDESIGNER_CLIENT_SECRET" }

OAuth is best for personal interactive setup. Client credentials are useful for automation, containers, and team environments where browser OAuth is inconvenient.

Test prompt: ask Codex to create a test form in FormDesigner or list your forms.

Don't have time to build it yourself?

FormDesigner's specialists can design, build, and configure your form, quiz, or calculator from scratch. Let us handle the complexity while you focus on your business.

Talk to a specialist
Our specialists