codex - 💡(How to fix) Fix `codex mcp login` fails for Kaggle MCP: OAuth authorize rejects short `client_id=codex`

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

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

Root Cause

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:

Code Example

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

---

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

---

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

---

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

---

codex mcp add kaggle --url https://www.kaggle.com/mcp

---

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

---

codex mcp login kaggle

---

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

---

{"serverInfo":{"name":"Kaggle.Web","version":"1.0.0.0"}}
RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

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

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING