Failing to login with OAuth in MCP HTTP server

Resolved 💬 3 comments Opened Oct 10, 2025 by ilmeskio Closed Oct 15, 2025
💡 Likely answer: A maintainer (gpeal, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.46.0

Which model were you using?

gpt-5-codex medium

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

Configuring todoist mcp using the experimental RMCP client

experimental_use_rmcp_client = true

[mcp_servers.todoist]
url = "https://ai.todoist.net/mcp"

and then running

codex mcp login todoist

What is the expected behavior?

  • Browser opens (I am using Arc browser)
  • Login and authorize
  • Close browser and get to terminal
  • Login in mcp confirmed

What do you see instead?

  • Browser opens (I am using Arc browser)
  • Login and authorize
  • Close browser and get to terminal

In terminal I see

Error: failed to handle OAuth callback

Caused by:
    OAuth token exchange failed: Server returned error response: Required argument is missing

Additional information

_No response_

View original on GitHub ↗

3 Comments

scottlovegrove · 10 months ago

It looks like the issue here is that Codex is ignoring what the supported token_endpoint_auth_methods_supported is on our [Todoist] well-known file.

We currently only support oauth_token_post and it seems that Codex is _only_ trying it based on oauth_token_basic, as seen in this screenshot:
<img width="1075" height="972" alt="Image" src="https://github.com/user-attachments/assets/324258aa-135e-4cff-9c53-b9c1340973f9" />

We are discussing internally around adding oauth_token_basic support on our side, which would fix the Todoist-specific error, but this may still affect other authentication servers that only support oauth_token_post.

gpeal contributor · 10 months ago

Thanks for the report and the analysis. We'll look into this on our side as well

gpeal contributor · 10 months ago

It looks like todoist added support for client_secret_basic and I can confirm that the MCP server works. I'm actually going to close this out for now because all of the other MCPs I try also support this so I no longer have a good repro server to test against.

If somebody from todoist wants to stand up a test one somewhere or if somebody find another public MCP server that this is an issue for, feel free to reopen.