`codex mcp login` fails for Kaggle MCP: OAuth authorize rejects short `client_id=codex`

Open 💬 0 comments Opened May 20, 2026 by aim9sour

What version of Codex CLI is running?

Reproduced with:

  • codex-cli 0.130.0-alpha.5 from Codex Desktop on Windows
  • codex-cli 0.132.0 via npx -y @openai/codex@latest

What subscription do you have?

ChatGPT Plus/Pro-style Codex Desktop session (not relevant to the MCP OAuth provider failure).

Which model were you using?

N/A - CLI/MCP OAuth login issue.

What platform is your computer?

Windows 11 / PowerShell

What terminal emulator and version are you using (if applicable)?

PowerShell

What issue are you seeing?

codex mcp login kaggle starts the OAuth flow for Kaggle's official remote MCP server, but Kaggle rejects the authorization request because Codex sends a very short OAuth client id:

{"error":{"code":400,"message":"ClientId too small: codex","status":"INVALID_ARGUMENT"}}

The MCP server itself is reachable and initializes correctly:

[mcp_servers.kaggle]
url = "https://www.kaggle.com/mcp"

codex mcp list shows:

Name    Url                         Bearer Token Env Var  Status   Auth
kaggle  https://www.kaggle.com/mcp  -                     enabled  Not logged in

codex mcp get kaggle shows:

kaggle
  enabled: true
  transport: streamable_http
  url: https://www.kaggle.com/mcp
  bearer_token_env_var: -
  http_headers: -
  env_http_headers: -

Calling tools before login returns unauthenticated, as expected. The blocker is specifically the OAuth authorization flow generated by codex mcp login.

Steps to reproduce

  1. Add Kaggle's official MCP endpoint:
codex mcp add kaggle --url https://www.kaggle.com/mcp

or add to ~/.codex/config.toml:

[mcp_servers.kaggle]
url = "https://www.kaggle.com/mcp"
  1. Run:
codex mcp login kaggle
  1. Open the generated browser authorization URL.

Expected behavior

Codex should complete OAuth login for Kaggle MCP, store credentials, and show Kaggle as logged in in codex mcp list.

Actual behavior

Kaggle returns:

{"error":{"code":400,"message":"ClientId too small: codex","status":"INVALID_ARGUMENT"}}

This appears to be because Codex uses client_id=codex for the OAuth request, and Kaggle rejects that client id as too short.

Additional information

Direct MCP initialize against https://www.kaggle.com/mcp succeeds and reports server info similar to:

{"serverInfo":{"name":"Kaggle.Web","version":"1.0.0.0"}}

Related but different MCP OAuth/config issues:

  • #5254: OAuth flow compatibility issue with Supabase MCP
  • #12589: OAuth provider requiring a resource parameter
  • #5011 / #19275: bearer_token_env_var vs unsupported inline bearer_token

Possible fixes might include using a longer default dynamic client id for OAuth MCP login, supporting provider-issued dynamic client registration when available, or allowing a per-MCP-server OAuth client id override in Codex config.

View original on GitHub ↗