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
- Create an OAuth application — see the OAuth application setup guide with the
formsscope. - 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
- Create an OAuth application — see the OAuth application setup guide with the
formsscope and enable useClientCredentials. - Store
client_idandclient_secretin theFORMDESIGNER_CLIENT_IDandFORMDESIGNER_CLIENT_SECRETenvironment variables. - 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.